1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-14 12:27:28 +00:00
cloudtube/pug/settings.pug

46 lines
1.3 KiB
Plaintext
Raw Normal View History

2020-08-31 13:22:16 +00:00
extends includes/layout.pug
mixin fieldset(name)
fieldset
legend= name
.fieldset-contents
block
mixin input(id, description, placeholder, disabled, list)
.field-row
label.description(for=id)= description
input(type="text" id=id name=id value=settings[id] placeholder=placeholder disabled=disabled list=`${id}-list`).border-look
if list
datalist(id=`${id}-list`)
each item in list
option(value=item)
mixin select(id, description, disabled, options)
.field-row
label.description(for=id)= description
select(id=id name=id disabled=disabled).border-look
each option in options
option(value=option.value selected=(option.value === settings[id]))= option.text
block head
title Settings - CloudTube
block content
main.settings-page
form(method="post" action="/settings")
+fieldset("Settings")
+input("instance", "Instance", constants.user_settings.instance.default, false, [
"https://invidious.snopyta.org",
"https://invidious.13ad.de",
"https://watch.nettohikari.com",
"https://invidious.fdn.fr"
])
+select("save_history", "Watch history", false, [
{value: "", text: "Don't save"},
{value: "yes", text: "Save"}
])
.save-settings
button.border-look Save