Use generic InputColor component
This commit is contained in:
parent
667eea7c8e
commit
5668c66b31
@ -64,3 +64,12 @@ component InputTags(id string, value []string, label string, tooltip string)
|
||||
|
||||
p!= tooltip
|
||||
|
||||
component InputColor(id string, variable string, label string)
|
||||
.widget-section
|
||||
label(for=id)= label
|
||||
|
||||
.color-picker-container
|
||||
.widget-ui-element.color-picker.color-box.action(data-color="var(--" + variable + ")", data-variable=variable, data-action="pickColor", data-trigger="click")
|
||||
|
||||
button.tip(aria-label="Reset", disabled)
|
||||
RawIcon("power-off")
|
||||
|
@ -31,20 +31,7 @@ component SettingsStyle(user *arn.User)
|
||||
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")
|
||||
InputColor("TextColor", "text-color", "Text color:")
|
||||
InputColor("LinkColor", "link-color", "Link color:")
|
||||
InputColor("UIBackground", "ui-background", "UI background:")
|
||||
InputColor("BackgroundColor", "bg-color", "Background color:")
|
||||
|
Loading…
Reference in New Issue
Block a user