Skip to main content
Banterability

Weeknotes 69: That’s Hypertext!

New York

  • Home alone most of the week. Always weird how I do a reverse-Risky Business and somehow forget to turn on any music at all. Just silently roaming the halls, supervising my unruly ward.

  • At least my tongue has already mostly healed. Bodies are truly wild.

  • Starting to tinker with the site again, and accidentally turned a minor change into a whole saga: When I reference a point from a previous week, I like to link back – that’s hypertext, baby! – but I’m currently just linking to the post and it feels like we can do better. What I want: when you follow one of these links, the page loads with the relevant bullet in the viewport, something draws your attention to the specific text I’m referencing, and things gradually return to normal so you can read easily.

  • First idea was the simplest thing I could think of: toss an ID on the bullet in question and link directly to it with a fragment (i.e. /posts/weeknote#clever-joke-bullet). The rub is that under the hood, I write these posts in Markdown, and adding an arbitrary attribute to an element requires me to drop down into HTML, which sort of spoils the “folder full of text files” I want to work with.

  • Next idea was text fragments, a newish syntax designed to let you deep link to content in a way that’s resistant to changing markup. These are kind of perfect: I can link to any text on another page and the browser will scroll there and (usually) highlight it. Try this one – pretty cool, right? There’s even a pseudo-element you can target for styling.

  • The good news is browser support is there for every user agent I care about. The bad news is the experience is wildly inconsistent. Chrome lets me style the highlight effect, but ignores any animations or transitions I put on it. Safari does a whole animation all on its own that I actually like, but either partially or entirely ignores any styles I provide. I haven’t even bothered checking what Firefox does.

  • It’s still an improvement from where we started, so I went back and updated all internal links to this format, but despite all efforts to use the platform and not write a bunch of JavaScript, looks like once again the only way to get what I want is to write a bunch of JavaScript.

  • I’ve already got a proof-of-concept change to my Markdown renderer on a branch that automatically adds an ID to every <li>. Once I have an animation I like working in all browsers, I guess I’ll go back and replace all the internal links again and be right back at my first idea: just tossing an ID on things.

  • Spent the weekend tidying up and packing our bags for a quick trip to New York. A friend from out-of-town had a business meeting in the middle of the week, and a variety of scheming transformed that into a good enough excuse for us all to get away for a few days.

  • Not really sure why I’ve gone so long without visiting again. There but for a slightly different coin flip, my adult life would have started in Manhattan, and every visit makes me think about what would have really been different and what would have worked out exactly the same.

  • Case in point: tonight we accidentally wandered into the same restaurant where we started dating all those years ago. Meant to be.

  • Settled in to the East Village and enjoying a nightcap at The Raines Law Room as I try to prepare my feet for what I’m sure will be a truly preposterous amount of walking.

-30-