Added experimental theme color picker
This commit is contained in:
@ -4,7 +4,7 @@ component ExploreColor(animes []*arn.Anime, nextIndex int, totalCount int, color
|
||||
for saturation := 0.75; saturation >= 0.25; saturation -= 0.25
|
||||
.tabs.color-stripes
|
||||
for hue := 0.0; hue < 1.0; hue += 0.05
|
||||
a.tab.color-stripe.action(href=fmt.Sprintf("/explore/color/hsl:%.3f,%.2f,0.5/anime", hue, saturation), data-action="diff", data-trigger="click", data-color=fmt.Sprintf("hsl(%.0f, %.0f%%, 50%%)", hue * 360, saturation * 100))
|
||||
a.tab.color-stripe.color-box.action(href=fmt.Sprintf("/explore/color/hsl:%.3f,%.2f,0.5/anime", hue, saturation), data-action="diff", data-trigger="click", data-color=fmt.Sprintf("hsl(%.0f, %.0f%%, 50%%)", hue * 360, saturation * 100))
|
||||
|
||||
.explore-anime
|
||||
if totalCount == 0
|
||||
|
@ -23,4 +23,28 @@ component SettingsStyle(user *arn.User)
|
||||
option(value="romaji") Romaji
|
||||
option(value="japanese") 日本語
|
||||
|
||||
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")
|
||||
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)
|
||||
|
||||
.widget-section
|
||||
label(for="LinkColor")= "Link color:"
|
||||
|
||||
.color-picker-container
|
||||
.widget-ui-element.color-picker.color-box.action(data-color="var(--link-color)", data-variable="link-color", data-action="pickColor", data-trigger="click")
|
||||
|
||||
button.tip(aria-label="Reset", disabled)
|
||||
RawIcon("power-off")
|
||||
|
||||
.widget-section
|
||||
label(for="BackgroundColor")= "Background color:"
|
||||
|
||||
.color-picker-container
|
||||
.widget-ui-element.color-picker.color-box.action(data-color="var(--bg-color)", data-variable="bg-color", data-action="pickColor", data-trigger="click")
|
||||
|
||||
button.tip(aria-label="Reset", disabled)
|
||||
RawIcon("power-off")
|
Reference in New Issue
Block a user