hmn/src/templates/src/project.css

142 lines
3.6 KiB
CSS
Raw Permalink Normal View History

2021-04-24 04:27:45 +00:00
{{ $c := hex2color .Color }}
2021-08-28 12:14:49 +00:00
{{/* Theme "dim" colors tend more toward the background value (lighter or darker) */}}
2021-04-24 04:27:45 +00:00
{{ $themeDim := eq .Theme "dark" | ternary (lightness 0.35 $c) (lightness 0.75 $c) | color2css }}
{{ $themeDimmer := eq .Theme "dark" | ternary (lightness 0.3 $c) (lightness 0.8 $c) | color2css }}
{{ $themeDimmest := eq .Theme "dark" | ternary (lightness 0.2 $c) (lightness 0.85 $c) | color2css }}
2021-03-14 20:49:58 +00:00
2022-08-13 19:15:00 +00:00
{{/* Theme "dark" and "light" colors are always darker or lighter in value, regardless of theme. */}}
2021-08-28 12:14:49 +00:00
{{ $themeDark := eq .Theme "dark" | ternary (lightness 0.30 $c) (lightness 0.35 $c) | color2css }}
2022-08-13 19:15:00 +00:00
{{ $themeLight := eq .Theme "dark" | ternary (lightness 0.55 $c) (lightness 0.55 $c) | color2css }}
2021-08-28 12:14:49 +00:00
2021-04-24 04:27:45 +00:00
{{ $linkColor := eq .Theme "dark" | ternary (lightness 0.55 $c) (lightness 0.35 $c) | color2css }}
{{ $linkHoverColor := eq .Theme "dark" | ternary (lightness 0.65 $c) (lightness 0.45 $c) | color2css }}
2021-03-14 20:49:58 +00:00
:root {
2021-04-24 04:27:45 +00:00
--theme-color: {{ $c | color2css }};
--theme-color-dim: {{ $themeDim }};
--theme-color-dimmer: {{ $themeDimmer }};
--theme-color-dimmest: {{ $themeDimmest }};
2021-03-14 20:49:58 +00:00
2021-08-28 12:14:49 +00:00
--theme-color-dark: {{ $themeDark }};
2022-08-13 19:15:00 +00:00
--theme-color-light: {{ $themeLight }};
2021-08-28 12:14:49 +00:00
2021-04-24 04:27:45 +00:00
--link-color: {{ $linkColor }};
2021-08-28 12:14:49 +00:00
--link-hover-color: {{ $linkHoverColor }};
--input-lite-border: {{ $linkColor }};
2021-03-14 20:49:58 +00:00
}
.accent {
2021-04-24 04:27:45 +00:00
background-color: {{ $themeDim }};
2021-03-14 20:49:58 +00:00
background-color: var(--theme-dim);
}
.user-bar {
2021-04-24 04:27:45 +00:00
border-bottom-color: {{ $themeDim }};
2021-03-14 20:49:58 +00:00
border-bottom-color: var(--theme-dim);
}
header .content-title .subtitle {
2021-04-24 04:27:45 +00:00
border-top-color: {{ $themeDim }};
2021-03-14 20:49:58 +00:00
border-top-color: var(--theme-dim);
}
a, .thread:before, button, .button, input[type=button] {
2021-04-24 04:27:45 +00:00
color: {{ $linkColor }};
2021-03-14 20:49:58 +00:00
color: var(--link-color);
}
.submit, input[type=submit] {
color: white;
}
a.submit:hover, .submit:hover, input[type=submit]:hover {
color: white;
}
a:hover, button:hover, .button:hover, input[type=button]:hover {
2021-04-24 04:27:45 +00:00
color: {{ $linkHoverColor }};
2021-03-14 20:49:58 +00:00
color: var(--link-hover-color);
}
.unread .avatar-icon {
2021-04-24 04:27:45 +00:00
border: 2px solid {{ $linkColor }};
2021-03-14 20:49:58 +00:00
border: 2px solid var(--link-color);
}
.post-list-bg-odd:nth-of-type(odd) {
background-color: {{ .PostBgColor }};
}
2021-08-28 12:14:49 +00:00
.bg-theme {
background-color: {{ $c | color2css }};
background-color: var(--theme-color);
}
.bg-theme-dim {
background-color: {{ $themeDim }};
background-color: var(--theme-color-dim);
}
.bg-theme-dimmer {
background-color: {{ $themeDimmer }};
background-color: var(--theme-color-dimmer);
}
.bg-theme-dimmest {
background-color: {{ $themeDimmest }};
background-color: var(--theme-color-dimmest);
}
.bg-theme-dark {
background-color: {{ $themeDark }};
background-color: var(--theme-color-dark);
}
2022-08-13 19:15:00 +00:00
.bg-theme-light {
background-color: {{ $themeLight }};
background-color: var(--theme-color-light);
}
2021-08-28 12:14:49 +00:00
.b--theme {
border-color: {{ $c | color2css }};
border-color: var(--theme-color);
}
.b--theme-dim {
border-color: {{ $themeDim }};
border-color: var(--theme-color-dim);
}
.b--theme-dimmer {
border-color: {{ $themeDimmer }};
border-color: var(--theme-color-dimmer);
}
.b--theme-dimmest {
border-color: {{ $themeDimmest }};
border-color: var(--theme-color-dimmest);
}
.b--theme-dark {
border-color: {{ $themeDark }};
border-color: var(--theme-color-dark);
}
2021-03-14 20:49:58 +00:00
2022-08-13 19:15:00 +00:00
.b--theme-light {
border-color: {{ $themeLight }};
border-color: var(--theme-color-light);
}
2021-03-14 20:49:58 +00:00
:root {
--background-even-background: {{ .PostBgColor }};
2021-03-14 20:49:58 +00:00
}
/* Assets */
.half.light {
background-image:url("{{ statictheme "light" "accent_top_a.svg" }}");
}
.half.dark {
background-image:url("{{ statictheme "dark" "accent_top_a.svg" }}");
}