mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Add theme variants
- Use CSS variables instead of inherence - Rename default theme to "Light - Serif" - Rename Black theme to "Dark - Serif" - Rename "Sans-Serif" theme to "Light - Sans Serif" - Add "System" theme that use system preferences: Dark or Light - Add Serif and Sans-Serif variants for each color theme
This commit is contained in:
parent
d610d091fe
commit
afe1faf214
18 changed files with 569 additions and 334 deletions
|
@ -241,18 +241,18 @@ func TestUserTheme(t *testing.T) {
|
|||
r, _ := http.NewRequest("GET", "http://example.org", nil)
|
||||
|
||||
result := UserTheme(r)
|
||||
expected := "default"
|
||||
expected := "light_serif"
|
||||
|
||||
if result != expected {
|
||||
t.Errorf(`Unexpected context value, got %q instead of %q`, result, expected)
|
||||
}
|
||||
|
||||
ctx := r.Context()
|
||||
ctx = context.WithValue(ctx, UserThemeContextKey, "black")
|
||||
ctx = context.WithValue(ctx, UserThemeContextKey, "dark_serif")
|
||||
r = r.WithContext(ctx)
|
||||
|
||||
result = UserTheme(r)
|
||||
expected = "black"
|
||||
expected = "dark_serif"
|
||||
|
||||
if result != expected {
|
||||
t.Errorf(`Unexpected context value, got %q instead of %q`, result, expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue