Update up-down icons
This commit is contained in:
parent
b0716a65b7
commit
6bd83feafe
4 changed files with 18 additions and 8 deletions
|
@ -70,7 +70,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if m %}
|
{% if m %}
|
||||||
<td class="{% if m.sum > 0 %}p{% else %}m{% endif %}"
|
<td class="{% if m.sum > 0 %}p{% else %}m{% endif %}"
|
||||||
style="background-color: color-mix(in hsl, currentcolor {% calendar_opacity m.sum history.max.sum %}, white)"
|
style="--opacity: {% calendar_opacity m.sum history.max.sum %}"
|
||||||
title="{{ m.sum|pmrvalue }}">{% up_down_icon m.sum %}</td>
|
title="{{ m.sum|pmrvalue }}">{% up_down_icon m.sum %}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|
|
@ -30,11 +30,11 @@ def empty_calendar_cells_end(n):
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def up_down_icon(val):
|
def up_down_icon(val):
|
||||||
if val > 0:
|
if val > 0:
|
||||||
return remix("arrow-up-s", "green w")
|
return remix("arrow-up-s", "green")
|
||||||
elif val < 0:
|
elif val < 0:
|
||||||
return remix("arrow-down-s", "red w")
|
return remix("arrow-down-s", "red")
|
||||||
|
|
||||||
return ""
|
return remix("equal", "white")
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
|
|
|
@ -232,14 +232,19 @@ footer {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
||||||
&.green,
|
&.green,
|
||||||
&.red {
|
&.red,
|
||||||
color: white;
|
&.white {
|
||||||
|
color: var(--bg);
|
||||||
&.green {
|
&.green {
|
||||||
background: var(--green);
|
background: var(--green);
|
||||||
}
|
}
|
||||||
&.red {
|
&.red {
|
||||||
background: var(--red);
|
background: var(--red);
|
||||||
}
|
}
|
||||||
|
&.white {
|
||||||
|
background: var(--bg-01);
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
height: 1.5rem;
|
height: 1.5rem;
|
||||||
width: 1.5rem;
|
width: 1.5rem;
|
||||||
|
|
|
@ -101,11 +101,16 @@ table.full-width col.bar {
|
||||||
|
|
||||||
td {
|
td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
background-color: color-mix(
|
||||||
|
in hsl,
|
||||||
|
var(--td-bg, var(--bg)) var(--opacity),
|
||||||
|
var(--bg)
|
||||||
|
);
|
||||||
&.p {
|
&.p {
|
||||||
color: var(--green);
|
--td-bg: var(--green);
|
||||||
}
|
}
|
||||||
&.m {
|
&.m {
|
||||||
color: var(--red);
|
--td-bg: var(--red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue