2018-11-06 09:28:50 +00:00
component SettingsStyle(user *arn.User)
2018-10-26 02:13:03 +00:00
SettingsTabs
2018-11-06 09:28:50 +00:00
h1.page-title Style settings
2018-10-26 02:13:03 +00:00
.settings
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("font")
2018-11-06 09:28:50 +00:00
span Style
2018-10-26 02:13:03 +00:00
.widget-section
label(for="Theme")= "Theme:"
select.widget-ui-element.action(id="Theme", data-field="Theme", value=user.Settings().Theme, title="Language of anime titles", data-action="save", data-trigger="change")
option(value="light") Light
option(value="dark") Dark
.widget-section
label(for="TitleLanguage")= "Title language:"
select.widget-ui-element.action(id="TitleLanguage", data-field="TitleLanguage", value=user.Settings().TitleLanguage, title="Language of anime titles", data-action="save", data-trigger="change")
option(value="canonical") Canonical
option(value="english") English
option(value="romaji") Romaji
option(value="japanese") 日本語
2018-11-23 10:11:46 +00:00
InputNumber("Format.RatingsPrecision", float64(user.Settings().Format.RatingsPrecision), "Ratings precision", "How many decimals after the comma would you like to display in ratings on anime pages?", "0", "2", "1")
if arn.IsDevelopment()
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("paint-brush")
span= stringutils.Capitalize(user.Settings().Theme)
2018-11-23 10:35:11 +00:00
InputColor("TextColor", "text-color", "Text color:")
InputColor("LinkColor", "link-color", "Link color:")
InputColor("UIBackground", "ui-background", "UI background:")
InputColor("BackgroundColor", "bg-color", "Background color:")