WrenHavoc

joined 2 years ago
[–] WrenHavoc@lemmy.dbzer0.com 0 points 1 month ago* (last edited 1 month ago) (2 children)

Yeah, its running a website. All ports are on default deny except 22, 80, 443, and 9050. 9050 is for the onion version of the site, and 80 auto-redirects to the https version of the site. 22 is rate limited to help protect against brute-force attacks. The requests are coming from multiple IPs, some of them are 117.72.47.192, 172.71.184.89, and 162.158.87.100. the one that sent that specific packet is 82.147.85.33 and no user agent is provided. Most of the malicious packets have user agents attached, but that specific one doesn't I also am seeing another weird one sent by 138.197.16.14

"238\x00ll|'|'|SGFjS2VkX0Q3NUU2QUFB|'|'|WIN-QZN7FJ7D1O|'|'|Administrator|'|'|19-11-28|'|'||'|'|Win 10 Pro x64|'|'|No|'|'|S17|'|'|..|'|'|SW5ib3ggLSBPdXRsb29rIERhdGEgRmlsZSAtIE1pY3Jvc29mdCBPdXRsb29rAA==|'|'|" 400 166 "-" "-"
 

So I'm the server admin and web developer for my school's robotics team. I look through the servers access logs every once in a while just to check on things. I keep seeing requests that look like someone's scanning for vulns. But I'm seeing something I've never seen before. It looks like someone is sending requests in machine code and I have no idea why or what it would do???

here's the request:

"\x03\x00\x00\x13\x0E\xE0\x00\x00\x00\x00\x00\x01\x00\x08\x00\x02\x00\x00\x00" 400 166 "-" "-"
[–] WrenHavoc@lemmy.dbzer0.com 1 points 2 months ago (1 children)

You can, its just a little unstable I'll occasionally switch to Wayland and tinker

[–] WrenHavoc@lemmy.dbzer0.com 2 points 2 months ago (1 children)

ok, I have a new problem, it doesn't work when I try to use the class for example

.content:has(#theme-toggle:checked) {
  color: #4c4f69;
}

won't work :[

[–] WrenHavoc@lemmy.dbzer0.com 0 points 2 months ago (7 children)

I got a piece of code from c/programming that works Using body:has(#theme-toggle:checked)

I prefer doing it that way because I use a browser with anti-fingerprinting which hides the preferred theme so prefers-color-scheme doesn't work as well

[–] WrenHavoc@lemmy.dbzer0.com 6 points 2 months ago (3 children)

Thanks, it's working perfectly!

[–] WrenHavoc@lemmy.dbzer0.com 2 points 2 months ago* (last edited 2 months ago) (5 children)

I already have a dark theme set, I'm using catppuccin's colors What I'm trying to have it do is when a button is pressed, it switches to the light version of it

currently my code looks something like this:

#theme-toggle:checked ~ body {
  background-color: #eff1f5;
  color: #fff;
}

#theme-toggle:checked ~ html {
  background-color: #eff1f5;
}

#theme-toggle:checked ~ .content {
  background-color: #eff1f5;
}

the button itself is a checkbox that has display set to none and the label set as an svg so when you click the icon, it gets checked.

<input style="display: none;" type="checkbox" id="theme-toggle">
                <label for="theme-toggle" class="theme-button">
                    <img class="theme-button-svg" src="./icons/half-moon.svg">
                </label>

I used a similar strategy when making the menu for the site so I know it should work

18
submitted 2 months ago* (last edited 2 months ago) by WrenHavoc@lemmy.dbzer0.com to c/programming@programming.dev
 

cross-posted from: https://lemmy.dbzer0.com/post/62659556

Edit: I managed to get it working by using :has and nesting css classes!

body:has(#theme-toggle:checked) {
  background-color: #eff1f5;
  .content {
    color: #4c4f69;
  }
  .header {
    color: #8839ef
  }
  .nav {
    background-color: #dce0e8;
    color: #4c4f69;
  }
}

I'm making a website for my school's robotics team and I'm trying to create a dark theme toggle but it's just not working. I'm trying to avoid javascript and I've seen this kind of thing done with only css and html before so I know it's possible. any advice?

repo: https://github.com/WrenHavoc/JudgeMent-Call-Website

edit: currently my code looks something like this:

#theme-toggle:checked ~ body {
  background-color: #eff1f5;
  color: #fff;
}

#theme-toggle:checked ~ html {
  background-color: #eff1f5;
}

#theme-toggle:checked ~ .content {
  background-color: #eff1f5;
}

the button itself is a checkbox that has display set to none and the label set as an svg so when you click the icon, it gets checked.

<input style="display: none;" type="checkbox" id="theme-toggle">
                <label for="theme-toggle" class="theme-button">
                    <img class="theme-button-svg" src="./icons/half-moon.svg">
                </label>

I used a similar strategy when making the menu for the site so I know it should work

.menu {
  position:absolute;
  margin:0%;
  right:20px;
  top:20px;
}

.menu-button {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 2; /* above menu */
}

.menu-button span {
  display: block;
  height: 4px;
  background-color: #cba6f7;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-items {
  top: 30px;
  right: -20px;
  width: 200px;
  background-color: #181825;
  position: absolute;
  display: none;
}

.menu-items li {
  margin: 20px 0;
}

.menu-items a {
  text-decoration: none;
  color: #cba6f7;
  font-size: 18px;
  padding:5px;
}

.menu-items a:hover {
  text-decoration: none;
  background-color: #cba6f7;
  color: #181825;
  font-size: 18px;
}

.menu-selected {
  text-decoration: underline;
  text-decoration-color: #cdd6f4;
  text-decoration-thickness: 3px;
}

.menu-selected:hover {
  text-decoration-color: #181825;
}

#menu:checked ~ .menu-items {
  display: inline;
}

#menu:checked + .menu-button span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 7.5px);
}
#menu:checked + .menu-button span:nth-child(2) {
  opacity: 0;
}
#menu:checked + .menu-button span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -7.5px);
}
<input style="display: none;" type="checkbox" id="menu">
                <label for="menu" class="menu-button">
                    <span></span>
                    <span></span>
                    <span></span>
                </label>
1
submitted 2 months ago* (last edited 2 months ago) by WrenHavoc@lemmy.dbzer0.com to c/webdev@programming.dev
 

Edit: I managed to get it working by using :has and nesting css classes!

body:has(#theme-toggle:checked) {
  background-color: #eff1f5;
  .content {
    color: #4c4f69;
  }
  .header {
    color: #8839ef
  }
  .nav {
    background-color: #dce0e8;
    color: #4c4f69;
  }
}

I'm making a website for my school's robotics team and I'm trying to create a dark theme toggle but it's just not working. I'm trying to avoid javascript and I've seen this kind of thing done with only css and html before so I know it's possible. any advice?

repo: https://github.com/WrenHavoc/JudgeMent-Call-Website

edit: currently my code looks something like this:

#theme-toggle:checked ~ body {
  background-color: #eff1f5;
  color: #fff;
}

#theme-toggle:checked ~ html {
  background-color: #eff1f5;
}

#theme-toggle:checked ~ .content {
  background-color: #eff1f5;
}

the button itself is a checkbox that has display set to none and the label set as an svg so when you click the icon, it gets checked.

<input style="display: none;" type="checkbox" id="theme-toggle">
                <label for="theme-toggle" class="theme-button">
                    <img class="theme-button-svg" src="./icons/half-moon.svg">
                </label>

I used a similar strategy when making the menu for the site so I know it should work

.menu {
  position:absolute;
  margin:0%;
  right:20px;
  top:20px;
}

.menu-button {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 2; /* above menu */
}

.menu-button span {
  display: block;
  height: 4px;
  background-color: #cba6f7;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-items {
  top: 30px;
  right: -20px;
  width: 200px;
  background-color: #181825;
  position: absolute;
  display: none;
}

.menu-items li {
  margin: 20px 0;
}

.menu-items a {
  text-decoration: none;
  color: #cba6f7;
  font-size: 18px;
  padding:5px;
}

.menu-items a:hover {
  text-decoration: none;
  background-color: #cba6f7;
  color: #181825;
  font-size: 18px;
}

.menu-selected {
  text-decoration: underline;
  text-decoration-color: #cdd6f4;
  text-decoration-thickness: 3px;
}

.menu-selected:hover {
  text-decoration-color: #181825;
}

#menu:checked ~ .menu-items {
  display: inline;
}

#menu:checked + .menu-button span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 7.5px);
}
#menu:checked + .menu-button span:nth-child(2) {
  opacity: 0;
}
#menu:checked + .menu-button span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -7.5px);
}
<input style="display: none;" type="checkbox" id="menu">
                <label for="menu" class="menu-button">
                    <span></span>
                    <span></span>
                    <span></span>
                </label>
 

I borrowed this pick from a friend and I love this thing so much. What kind is it so I can get one of my own?

[–] WrenHavoc@lemmy.dbzer0.com 1 points 7 months ago* (last edited 7 months ago)

I personally use LibreOffice as an alternative to docs and sheets. It took me a second to figure everything out, but it works well enough.

I don't really like their slideshow or drawing programs though. They don't work well

Edit: I took a quick look at Cryptpad and they also seem like a good option

[–] WrenHavoc@lemmy.dbzer0.com 1 points 7 months ago* (last edited 7 months ago)

Really they all work the same as long as they're based on the same OS. I've done a lot of distro hopping and the only real difference I've seen is the desktop environment, package managers(sometimes), and pre-installed applications.

Even then, all of these can be changed. I would suggest picking a distro that best suits your needs by default and then add what you need from there.

I personally have been really happy with Linux Mint.