Scroll to top

27/03/2024


2024/03/27#p1

2 comments: click to read or leave your own

I do hope this isn't accurate:

Downloading

# Started working on the RSS feed for Carousel. All the basics are done but I need to work out how I'm going to handle permalinks seeing as there is only one page and different posts are just items in a list. 🤔

Well, that didn't take long to work out with a little help from CoPilot and GPT-4. A simple matter of ensuring each post item has an ID attribute then using scrollIntoView({ behavior: 'instant', inline: 'center' }) on the element indicated by a URL hash.

avatar
Dunk says: Reply to Dunk

@colinwalker Would scrollIntoView also work when searching for text which currently finds and highlights the text but it can be hidden on the ‘page’ several panes around the carousel?

Also what is Sparks? I ruled out the band and Marks & Spencers 🤷‍♂️

avatar
Colin Walker replied:

Sparks was an idea I had for a note-taking site using text files where the archive/vault was a carousel - see here.

scrollIntoView needs an element to work on so you could just use the post containing the term or do something like dynamically surrounding the term with a span and use that. Interesting idea.

Leave a reply



You can also:

Click here to reply using email Reply by email Send a webmention Send a Webmention



Close