Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. πŸ“ Post-mortem on my "lots of little HTML pages" approach β€” still like it.

πŸ“ Post-mortem on my "lots of little HTML pages" approach β€” still like it.

Scheduled Pinned Locked Moved Uncategorized
5 Posts 5 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jimniels@mastodon.socialJ This user is from outside of this forum
    jimniels@mastodon.socialJ This user is from outside of this forum
    jimniels@mastodon.social
    wrote last edited by
    #1

    πŸ“ Post-mortem on my "lots of little HTML pages" approach β€” still like it.

    The browser's most basic feature is following a link. What if you built a site’s interactions around just that?

    e.g. a "menu" could just be: <a href="/menu/"> and a dash of CSS view transitions for flair.

    Link Preview Image
    Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions

    Writing about the big beautiful mess that is making things for the world wide web.

    favicon

    (blog.jim-nielsen.com)

    martingwd@mastodon.socialM N cjoly@hachyderm.ioC konform@techhub.socialK 4 Replies Last reply
    1
    0
    • jimniels@mastodon.socialJ jimniels@mastodon.social

      πŸ“ Post-mortem on my "lots of little HTML pages" approach β€” still like it.

      The browser's most basic feature is following a link. What if you built a site’s interactions around just that?

      e.g. a "menu" could just be: <a href="/menu/"> and a dash of CSS view transitions for flair.

      Link Preview Image
      Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions

      Writing about the big beautiful mess that is making things for the world wide web.

      favicon

      (blog.jim-nielsen.com)

      martingwd@mastodon.socialM This user is from outside of this forum
      martingwd@mastodon.socialM This user is from outside of this forum
      martingwd@mastodon.social
      wrote last edited by
      #2

      @jimniels love this super elegant solution, thank you for sharing Jim!

      1 Reply Last reply
      0
      • jimniels@mastodon.socialJ jimniels@mastodon.social

        πŸ“ Post-mortem on my "lots of little HTML pages" approach β€” still like it.

        The browser's most basic feature is following a link. What if you built a site’s interactions around just that?

        e.g. a "menu" could just be: <a href="/menu/"> and a dash of CSS view transitions for flair.

        Link Preview Image
        Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions

        Writing about the big beautiful mess that is making things for the world wide web.

        favicon

        (blog.jim-nielsen.com)

        N This user is from outside of this forum
        N This user is from outside of this forum
        nickchomey@mastodon.social
        wrote last edited by
        #3

        @jimniels I came across this post on HN.

        it's a nice instinct to try to be js-free, but then you're just using js to manipulate your history, which is surely far more blasphemous than a sprinkling of js to show/hide a menu. Especially when you're doing a full nav for this.

        I beg you to check out Datastar. It's precisely what you're looking for. It's more powerful than htmx + alpine js, and smaller than both. You could just have a few declarative html attributes that show/hide the menu.

        1 Reply Last reply
        0
        • jimniels@mastodon.socialJ jimniels@mastodon.social

          πŸ“ Post-mortem on my "lots of little HTML pages" approach β€” still like it.

          The browser's most basic feature is following a link. What if you built a site’s interactions around just that?

          e.g. a "menu" could just be: <a href="/menu/"> and a dash of CSS view transitions for flair.

          Link Preview Image
          Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions

          Writing about the big beautiful mess that is making things for the world wide web.

          favicon

          (blog.jim-nielsen.com)

          cjoly@hachyderm.ioC This user is from outside of this forum
          cjoly@hachyderm.ioC This user is from outside of this forum
          cjoly@hachyderm.io
          wrote last edited by
          #4

          @jimniels Thanks for documenting this trick!

          I had such a menu on a separate page on my own website for a while, but I grew tired of it. I ended up just putting back 5 links at the top. Ultimately, it’s a personal website, it boils down to personal preference. I’m of course not saying your approach is wrong. I certainly wish more website adopted it instead of cascading expand on hover from hell.

          Anyway, I ended up reading a bunch of other posts and subscribing to the RSS feed. Thanks for building this blog, I really enjoy it!

          1 Reply Last reply
          0
          • jimniels@mastodon.socialJ jimniels@mastodon.social

            πŸ“ Post-mortem on my "lots of little HTML pages" approach β€” still like it.

            The browser's most basic feature is following a link. What if you built a site’s interactions around just that?

            e.g. a "menu" could just be: <a href="/menu/"> and a dash of CSS view transitions for flair.

            Link Preview Image
            Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions

            Writing about the big beautiful mess that is making things for the world wide web.

            favicon

            (blog.jim-nielsen.com)

            konform@techhub.socialK This user is from outside of this forum
            konform@techhub.socialK This user is from outside of this forum
            konform@techhub.social
            wrote last edited by
            #5

            @jimniels For simple inlineable content like a menu, I think you can do even better in pure CSS and hiding/showing it using attribute selectors. Smoother UX since you don't need to trigger navigation and can forego JS alltogether without degradation.

            https://stackoverflow.com/a/33528185

            Using a variation of this on Konform Browser front page to dynamically toggle display of installation instructions for the target selected by user with CSS only: https://konform-browser.codeberg.page/

            #nojs #css

            1 Reply Last reply
            0
            • R relay@relay.mycrowd.ca shared this topic
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups