You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first, I thought of creating an if/else switch to control which <img> tag to print (see PR 373).
However, that still wouldn't handle cases such as...
the user uploads @custom.white_logo_for_dark_mode but then switches the color scheme to light. Under current logic/PR 373, the dark logo would still show.
the user uploads @custom.white_logo_for_dark_mode and sets the color scheme to auto. Under current logic/PR 373, the dark logo would always show.
I think the logic needs to be more complex to handle the theme's automatic light/dark theming. Something like...
if {{#match @custom.color_scheme "Dark"}} and @custom.white_logo_for_dark_mode, print <img> for @custom.white_logo_for_dark_mode
if {{#match @custom.color_scheme "Auto"}} and @custom.white_logo_for_dark_mode, print <img> for @site.logo and @custom.white_logo_for_dark_mode and add IDs/classes and display: none CSS to control which <img> renders
else print <img> for @site.logo
The text was updated successfully, but these errors were encountered:
alexgmathews
changed the title
Alto & Dawn need if/else construct for @custom.white_logo_for_dark_mode
Alto & Dawn need additional logic for @custom.white_logo_for_dark_mode to render correctly
Nov 22, 2024
alexgmathews
changed the title
Alto & Dawn need additional logic for @custom.white_logo_for_dark_mode to render correctly
Alto & Dawn need additional logic for white_logo_for_dark_mode to render correctly
Nov 22, 2024
Alto and Dawn double-print
@site.logo
<img>
when@custom.white_logo_for_dark_mode
exists:At first, I thought of creating an if/else switch to control which
<img>
tag to print (see PR 373).However, that still wouldn't handle cases such as...
@custom.white_logo_for_dark_mode
but then switches the color scheme to light. Under current logic/PR 373, the dark logo would still show.@custom.white_logo_for_dark_mode
and sets the color scheme to auto. Under current logic/PR 373, the dark logo would always show.I think the logic needs to be more complex to handle the theme's automatic light/dark theming. Something like...
{{#match @custom.color_scheme "Dark"}}
and@custom.white_logo_for_dark_mode
, print<img>
for@custom.white_logo_for_dark_mode
{{#match @custom.color_scheme "Auto"}}
and@custom.white_logo_for_dark_mode
, print<img>
for@site.logo
and@custom.white_logo_for_dark_mode
and add IDs/classes anddisplay: none
CSS to control which<img>
renders<img>
for@site.logo
The text was updated successfully, but these errors were encountered: