1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-15 02:45:09 +00:00

Refactor sass for theming

This commit is contained in:
Cadence Ember
2020-05-09 21:34:00 +12:00
parent 710400c4f1
commit 23e2ffecbf
14 changed files with 226 additions and 128 deletions

View File

@@ -1,5 +1,8 @@
meta(charset="utf-8")
link(rel="stylesheet" type="text/css" href=getStaticURL("sass", "main.sass"))
- let theme = settings ? settings.theme : "classic"
link(rel="stylesheet" type="text/css" href=getStaticURL("sass", `${theme}.sass`))
meta(name="viewport" content="width=device-width, initial-scale=1")
link(rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png")
link(rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png")

View File

@@ -6,10 +6,10 @@ mixin fieldset(name)
.fieldset-contents
block
mixin input(id, description, disabled)
mixin input(id, description, placeholder, disabled)
.field-row
label.description(for=id)= description
input(type="text" id=id name=id value=settings[id] disabled=disabled)
input(type="text" id=id name=id value=settings[id] placeholder=placeholder disabled=disabled)
mixin checkbox(id, description, label, disabled)
.field-row.checkbox-row
@@ -45,6 +45,17 @@ html
{value: "en-us", text: "English (US)"}
])
+select("save_data", "Save data", true, [
{value: "automatic", text: "Automatic"},
{value: "off", text: "Off"},
{value: "lazy_load", text: "Lazy load"},
{value: "full", text: "Full"}
])
+input("rewrite_youtube", "Rewrite YouTube domain", "youtube.com", true)
+input("rewrite_twitter", "Rewrite Twitter domain", "twitter.com", true)
+checkbox("show_comments", "Display comments", "Display", true)
+checkbox("link_hashtags", "Clickable hashtags", "Clickable", true)
@@ -52,8 +63,9 @@ html
+checkbox("spa", "Fast navigation", "Enabled", false)
+fieldset("Appearance")
+select("theme", "Theme", true, [
{value: "classic", text: "Classic"}
+select("theme", "Theme", false, [
{value: "classic", text: "Classic"},
{value: "blue", text: "Classic blue"}
])
+checkbox("display_top_nav", "Display top bar", "Always", false)