mirror of
https://codeberg.org/teddit/teddit.git
synced 2026-04-18 21:45:06 -04:00
add dark theme and preferences
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ html
|
||||
head
|
||||
title about - teddit
|
||||
include includes/head.pug
|
||||
body
|
||||
body(class=""+ user_preferences.theme +"")
|
||||
include includes/topbar.pug
|
||||
.container
|
||||
.content
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ html
|
||||
head
|
||||
title teddit
|
||||
include includes/head.pug
|
||||
body
|
||||
body(class=""+ user_preferences.theme +"")
|
||||
include includes/topbar.pug
|
||||
if json === null
|
||||
h2 error
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ html
|
||||
head
|
||||
title #{post.title} : #{subreddit}
|
||||
include includes/head.pug
|
||||
body
|
||||
body(class=""+ user_preferences.theme +"")
|
||||
include includes/topbar.pug
|
||||
if post === null
|
||||
h1 Error occured
|
||||
|
||||
+14
-2
@@ -3,9 +3,21 @@ html
|
||||
head
|
||||
title preferences - teddit
|
||||
include includes/head.pug
|
||||
body
|
||||
body(class=""+ user_preferences.theme +"")
|
||||
include includes/topbar.pug
|
||||
.container
|
||||
.content
|
||||
h1 Preferences
|
||||
p nothing here yet
|
||||
form(action="/saveprefs", method="POST")
|
||||
legend Display
|
||||
label(for="theme") Theme:
|
||||
select(id="theme", name="theme")
|
||||
if(!user_preferences.theme || user_preferences.theme == '')
|
||||
option(value="", selected="selected") White
|
||||
option(value="dark") Dark
|
||||
if(user_preferences.theme === 'dark')
|
||||
option(value="") White
|
||||
option(value="dark", selected="selected") Dark
|
||||
p(class="notice") Preferences are stored client-side using cookies without any personal information.
|
||||
input(type="submit", value="Save preferences")
|
||||
a(href="/resetprefs", class="btn") Reset preferences
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ html
|
||||
head
|
||||
title search results for #{q}
|
||||
include includes/head.pug
|
||||
body
|
||||
body(class=""+ user_preferences.theme +"")
|
||||
include includes/topbar.pug
|
||||
#search
|
||||
form(action="/r/" + subreddit + "/search", method="GET")
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ html
|
||||
head
|
||||
title /r/#{subreddit}
|
||||
include includes/head.pug
|
||||
body
|
||||
body(class=""+ user_preferences.theme +"")
|
||||
include includes/topbar.pug
|
||||
if json === null
|
||||
h1 Error occured
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ html
|
||||
head
|
||||
title overview for #{data.username}
|
||||
include includes/head.pug
|
||||
body
|
||||
body(class=""+ user_preferences.theme +"")
|
||||
include includes/topbar.pug
|
||||
if user === null
|
||||
h1 Error occured
|
||||
|
||||
Reference in New Issue
Block a user