Skip to content

Made selected theme load much sooner, cached themes locally#2

Merged
DamiDoop merged 2 commits intoDamiDoop:mainfrom
NinjaCheetah:local-themes
Jan 31, 2025
Merged

Made selected theme load much sooner, cached themes locally#2
DamiDoop merged 2 commits intoDamiDoop:mainfrom
NinjaCheetah:local-themes

Conversation

@NinjaCheetah
Copy link
Copy Markdown
Collaborator

Switched to setting a listener on DOMContentLoaded rather than load, which causes the JS to run much sooner and prevent the page from having to fully load the default theme before loading the correct one. DOMContentLoaded triggers when the actual HTML is done loading and is fully parsed, whereas load triggers when 100% of the page content (including heavy stuff like images) has finished loading.

I also added the CSS to /assets/css/theme so that they load faster (it was also essential to being able to test things reasonably quickly on school WiFi).

@DamiDoop DamiDoop merged commit 98246be into DamiDoop:main Jan 31, 2025
@NinjaCheetah NinjaCheetah deleted the local-themes branch January 31, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants