Tag: optimization
Just fixed the flickering issue by inlining the required JavaScript, which is a really small snippet. If you’re curious about the code I’m using to toggle between the dark and light themes, following the user’s choice and falling back to the OS settings, here it is:
const mql = window.matchMedia('(prefers-color-scheme: dark)');
function toggleT (to) {
localStorage.setItem('t', to);
theme(mql);
}
function theme (query) {
const userOption = localStorage.getItem('t');
document.body.id = userOption === null
? (query.matches ? 'dark' : '')
: (userOption === 'd' ? 'dark' : '');
}
mql.addListener(theme);
theme(mql);
I enjoy showing the webmention and the context (reply to what? repost of what? like of what?) because, as you know, the content on the Internet is ephemeral and if I don’t store it, I don’t have assurance that it will remain available. And that’s the main reason why I show the webmentions.
In any case, it’s not the webmentions that worry me, but the post contexts that I show on replies, likes and reposts… Need to decide on that: either remove the pictures, or store them.
Just made a few updates to my website:
- Removed Tachyons.
- New roomy header: took some inspiration from @jlelse’s and from a previous version of my website.
- Added two new pages that have no information yet: now and use. You can find them on the header.
- I now have a blogroll that you can find here.
- If you look at the bottom of the page, you now have links for all the categories too.
This seems to be a small update. Maybe some won’t like the new design as much as the previous one, but I assure you: it’s at least 70 KB smaller! At least! I didn’t actually measure it 😋
I may make some updates in the future, but for now I have some interesting plans for the now page!