Invert logo colour based on current theme #9
No reviewers
Labels
No Label
WIP
bug
docs done
docs needed
duplicate
enhancement
feature
gemini
invalid
legal-ish
needs help
onionz
proposal
question
resolved
security
spam
todo
upstream-related
wontfix
No Milestone
No project
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: dotya.ml/gitea-templates#9
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "dynamic-logo-color"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
impacts visibility.
on light navbar inverts the logo colour (originally white) adding inline
style="filter: invert(.8);"
.screenshot light:
screenshot dark:
@dalahast please review an merge if ok.
@ -2,3 +2,3 @@
<div class="item brand" style="justify-content: space-between;">
<a href="/">
<img class="ui mini image" src="/img/logo.svg" alt="git.dotya.ml icon">
<img class="ui mini image" {{if .SignedUser}}{{if not (eq .SignedUser.Theme "arc-green" "42l-dark" "42l-light")}}style="filter: invert(.8);"{{end}}{{else if not (eq DefaultTheme "arc-green" "42l-dark" "42l-light")}}style="filter: invert(.8);"{{end}} src="/img/logo.svg" alt="git.dotya.ml icon">
Isn't there a dark/light parameter that could be used instead of an excplicit theme name? This is by all means ok for the current theme selection, but it would be better if this could be "set and forget".
this would of course be better served as part of each theme but that would require maintaining a fork for each theme whereas this is not too elegant but still easier - at least as a hotfix.
Right, the themes are not expected to change for the foreseeable future so this is perfectly fine and indeed certainly better than maintaining a fork of each theme.
it is kind of hacky but for now it's still better than the other solution :D or at least quicker.
it might take its toll on the server, since it needs to evaluate
DefaultTheme
and.SignedUser.Theme
for each request, but that would be a bigger problem under different loads..it's good to know what potential bottlenecks are, though.