swyxio / swyxkit

An opinionated blog starter for SvelteKit + Tailwind + Netlify. Refreshed for SvelteKit 1.0!
https://swyxkit.netlify.app/
MIT License
675 stars 88 forks source link

add TOC component #162

Closed swyxio closed 1 year ago

swyxio commented 1 year ago

adds @janosh's https://toc.janosh.dev

the design is not super yet (it should probably float on desktop?) so idk but i like the UX

references #112

image

image

janosh commented 1 year ago

@sw-yx Thanks for the ping. Definitely agree the CSS could be improved. Happy to take suggestions! 👍

swyxio commented 1 year ago

performance gets hits by 12 points

image

mobile styling not worked out yet

image

swyxio commented 1 year ago

dont think its worth it yet. closing for now.

swyxio commented 1 year ago

fwiw i belatedly realized that there were some conflicting factors (netlify injects some js inthe deploy preview by default that severely hits perf, have to turn off) that made the above comparison unfair. anyway i didnt like the styling so the second attempt with svelte-put was better for me https://github.com/sw-yx/swyxkit/issues/165