Skip to content

Make logo path and button icon computed() properties#162

Merged
idlip merged 4 commits intofossunited:developfrom
agriyakhetarpal:logo-computed
Nov 17, 2025
Merged

Make logo path and button icon computed() properties#162
idlip merged 4 commits intofossunited:developfrom
agriyakhetarpal:logo-computed

Conversation

@agriyakhetarpal
Copy link
Copy Markdown
Contributor

@agriyakhetarpal agriyakhetarpal commented Nov 14, 2025

This PR closes #161 and renders logos/logo_dark.svg on the initial load of the website in light mode, so that it uses the black-text logo instead of the sage green one (which is intended for dark mode).

Before After
image The website loads with the sage green logo, and the theme switcher button indicates a . instead of the moon icon image The website loads with the black-font logo and the theme switcher button indicates the moon icon correctly

I do not usually work with Vue.js; please verify if this is the correct approach before merging. Thank you!

Noting this here, in case it helps any other maintainers in the future: I ran into nuxt-modules/color-mode#262 for a bit, and the idea is to always load the page with caches disabled; otherwise, localStorage interferes with the preference value.

@idlip
Copy link
Copy Markdown
Collaborator

idlip commented Nov 17, 2025

Just one nitpick, can we please have dark as preferred color...

That is the color that defined forklore theme mostly, so yeah!

LGTM, just dark as first choice !

@agriyakhetarpal
Copy link
Copy Markdown
Contributor Author

Sure, that's fine with me!

Suggested-by: Dilip <igoldlip@gmail.com>
@idlip idlip merged commit f603016 into fossunited:develop Nov 17, 2025
1 check passed
@agriyakhetarpal agriyakhetarpal deleted the logo-computed branch November 17, 2025 08:02
@idlip
Copy link
Copy Markdown
Collaborator

idlip commented Nov 17, 2025

Okay, after looking at site I still saw svg issue.

So explored docs here: https://color-mode.nuxtjs.org/advanced/migration#_3-read-only-color-mode-value

So I'm setting preference to system and fallback to dark

Should be fixed and good to go.

Thank you for bringing this up to attention, thanks to that I also read up to understand how it worked.

@agriyakhetarpal
Copy link
Copy Markdown
Contributor Author

Oops, thanks for the catch!

idlip added a commit to idlip/forklore that referenced this pull request Nov 17, 2025
- complements thanks to fossunited#162

- doc: https://color-mode.nuxtjs.org/advanced/migration#_3-read-only-color-mode-value
- value is read only meant to be used for code, but we can simply use preference to adjust changes
- set preference to system (default in nuxt) and fallback to dark
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.

"folklore_" logo displayed in its dark mode colour on light mode on first contentful load

2 participants