fjdk
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
testeronious@lemmy.world to Programming@programming.dev · 1 年前

The Unreasonable Effectiveness of Simple Websites

fd93.me

external-link
message-square
62
fedilink
213
external-link

The Unreasonable Effectiveness of Simple Websites

fd93.me

testeronious@lemmy.world to Programming@programming.dev · 1 年前
message-square
62
fedilink
Simple websites are better than beautiful ones. I'll repeat that for the folks in the back. Simple websites are better than beautiful ones. Let me be clear what I mean by a simple website. I don't mean a Wordpress site with a minimalist theme. I also don't mean a Substack …
  • snowe@programming.devM
    link
    fedilink
    arrow-up
    19
    ·
    1 年前

    I’ve been saying this for years. My site only has a few lines of javascript. the rest is pure html and css, and it’s very simple. https://tylerthrailkill.com

    • im sorry i broke the code@sh.itjust.works
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      1 年前

      Your theme toggle is confusing, it shows the sun when the dark mode is enabled and vice versa

      • jadero@programming.dev
        link
        fedilink
        arrow-up
        20
        arrow-down
        1
        ·
        1 年前

        There was a thread elsewhere asking whether a toggle should show current state or the state desired. There was enough disagreement that it quickly became apparent that, whatever else the toggle does, there should be something external to the toggle showing the possible states, indicating which way to move the toggle regardless of toggle appearance.

        • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 年前

          The disagreement was actually all over whether the question was about a switch or a button, and so some people were answering as though it was a switch, and some people were answering as though it was a button - switches and buttons do indeed have opposite approaches usually (a switch usually shows the current state - such as “on” - but a button shows what action will be triggered by pressing it, such as “play”).

          • jadero@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            1 年前

            Oops! I guess I wasn’t paying close enough attention.

            • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
              link
              fedilink
              English
              arrow-up
              3
              ·
              1 年前

              That’s ok - a lot of people weren’t.

        • starman@programming.dev
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          1 年前

          There was a thread elsewhere asking whether a toggle should show current state or the state desired.

          there it is

        • snowe@programming.devM
          link
          fedilink
          arrow-up
          4
          ·
          1 年前

          that post is about toggle buttons, not switches. e.g. a play pause button, when pressed, does it show play, or does it show pause?

          • jadero@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            1 年前

            Oops! I guess I wasn’t paying close enough attention.

            • snowe@programming.devM
              link
              fedilink
              arrow-up
              2
              ·
              1 年前

              still, people are clearly confused by the button. I’m just gonna make it an animation and prefers-color-scheme since that’s so widely supported now.

        • im sorry i broke the code@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          1 年前

          The designer team once did a toggle button with the inverse logic and I was so confused when I had to implement that. It must be my antithesis.

        • Feathercrown@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 年前

          It really depends on the type of control and what it’s controlling. As this is a switch, you’d expect the current state to be what’s shown on the same side as the slider-- in this case, the slider is a sun in dark mode and a moon in light mode, which is the opposite way.

      • qaz@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        1 年前

        It did nothing when clicking it the first time and only changed the second time I clicked it

        • snowe@programming.devM
          link
          fedilink
          arrow-up
          6
          ·
          1 年前

          I’ve wondered what this problem was for years but never cared to figure it out, because it always resolved after the first button press (just refresh the page and it all works properly). turns out it is something wrong with my use of local storage to save your theme state. if you don’t have the key in local storage then it does what you mentioned. I just need to switch this to prefers-color-scheme anyway.

      • 𝙲𝚑𝚊𝚒𝚛𝚖𝚊𝚗 𝙼𝚎𝚘𝚠@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        1 年前

        Strange, it’s the exact opposite for me. Moon in dark mode, sun in light mode.

      • fd93@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 年前

        Hey - the poster isn’t actually the author. That would be me! Thanks for the feedback though. I normally just use Dark Reader for switching theme.

      • snowe@programming.devM
        link
        fedilink
        arrow-up
        2
        ·
        1 年前

        Hm. what browser are you on? It is showing sun for me on light mode.

        • im sorry i broke the code@sh.itjust.works
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          1 年前

          It works if you visited the website already but the first time it breaks: reloading fixes this while emptying the caches breaks it again. As another user pointed out the first click after emptying the cache doesn’t do anything at all even though the animation plays out just fine

          EDIT: I’m on safari ios, latest stable (17.3.1 if I’m not mistaken)

      • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 年前

        In dark mode you press it to go light mode, and in light mode you press it to go dark mode, but yeah, strictly speaking should’ve used a button rather than a switch for that usage.

        • snowe@programming.devM
          link
          fedilink
          arrow-up
          1
          ·
          1 年前

          It shouldn’t be like that. on my computer it shows the sun when it’s in light mode, moon in dark mode.

          • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 年前

            It comes up like that the first time, but then changes once you hit the switch a few times

    • owenfromcanada@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 年前

      Same–I use a line or two of PHP to avoid duplicating common header/footer elements, but it’s otherwise HTML and CSS (no JS at all).

      https://owenfromcanada.com

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 124 users / day
  • 1.08K users / week
  • 2.96K users / month
  • 7.16K users / 6 months
  • 1 local subscriber
  • 20.1K subscribers
  • 2.15K Posts
  • 30.6K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • MaungaHikoi@lemmy.nz
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org