mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-03-02 02:31:35 +00:00
Add theme support, light theme, and edgeless light
This commit is contained in:
parent
4e1f2b3607
commit
0d23d66700
45 changed files with 433 additions and 212 deletions
|
|
@ -3,7 +3,8 @@ html
|
|||
head
|
||||
meta(charset="utf-8")
|
||||
meta(name="viewport" content="width=device-width, initial-scale=1")
|
||||
link(rel="stylesheet" type="text/css" href=getStaticURL("sass", "/main.sass"))
|
||||
- const theme = settings && ["dark", "light", "edgeless-light"][settings.theme] || "dark"
|
||||
link(rel="stylesheet" type="text/css" href=getStaticURL("sass", `/${theme}.sass`))
|
||||
script(type="module" src=getStaticURL("html", "/static/js/focus.js"))
|
||||
block head
|
||||
|
||||
|
|
@ -15,13 +16,9 @@ html
|
|||
.links
|
||||
a(href="/").link.home CloudTube
|
||||
a(href="/subscriptions" title="Subscriptions").link.icon-link
|
||||
svg(width=30 height=25)
|
||||
image(href=getStaticURL("html", "/static/images/subscriptions.svg") alt="Subscriptions.").icon
|
||||
title Subscriptions
|
||||
!= icons.get("subscriptions")
|
||||
a(href="/settings" title="Settings").link.icon-link
|
||||
svg(width=25 height=25)
|
||||
image(href=getStaticURL("html", "/static/images/settings.svg") alt="Settings.").icon
|
||||
title Settings
|
||||
!= icons.get("settings")
|
||||
form(method="get" action="/search").search-form
|
||||
input(type="text" placeholder="Search" aria-label="Search a video" name="q" autocomplete="off" value=query).search
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,16 @@ block content
|
|||
form(method="post" action="/settings")
|
||||
+fieldset("Settings")
|
||||
|
||||
+select({
|
||||
id: "theme",
|
||||
label: "Theme",
|
||||
options: [
|
||||
{value: "0", text: "Standard dark"},
|
||||
{value: "1", text: "Standard light"},
|
||||
{value: "2", text: "Edgeless light"}
|
||||
]
|
||||
})
|
||||
|
||||
+input({
|
||||
id: "instance",
|
||||
label: "Instance",
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ block content
|
|||
|
||||
if settings.save_history
|
||||
input(type="checkbox" id="watched-videos-display")
|
||||
.watched-videos-display-container
|
||||
label(for="watched-videos-display").watched-videos-display-label Hide watched videos
|
||||
.checkbox-hider__container
|
||||
label(for="watched-videos-display").checkbox-hider__label Hide watched videos
|
||||
|
||||
each video in videos
|
||||
+video_list_item("subscriptions-video", video, instanceOrigin, {showMarkWatched: settings.save_history && !video.watched})
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ block content
|
|||
noscript
|
||||
meta(http-equiv="refresh" content=`${video.lengthSeconds+5};url=/watch?v=${first.videoId}&continuous=1&session-watched=${sessionWatchedNext}`)
|
||||
.video-page(class={
|
||||
"video-page--recommended-side": settings.recommended_mode === 0,
|
||||
"video-page--recommended-below": settings.recommended_mode === 1,
|
||||
"video-page--recommended-hidden": settings.recommended_mode === 2
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue