2024-04-27 21:10:24 +02:00
|
|
|
{{ template "widget-base.html" . }}
|
|
|
|
|
|
|
|
{{ define "widget-content" }}
|
|
|
|
<ul class="list list-gap-20 list-with-separator">
|
|
|
|
{{ range .Stocks }}
|
|
|
|
<li class="flex items-center gap-15">
|
|
|
|
<div class="shrink min-width-0">
|
|
|
|
<div class="color-highlight size-h3 text-truncate">{{ .Symbol }}</div>
|
|
|
|
<div class="text-truncate">{{ .Name }}</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<svg class="stock-chart shrink-0" viewBox="0 0 100 50">
|
|
|
|
<polyline fill="none" stroke="var(--color-text-subdue)" stroke-width="1.5px" points="{{ .SvgChartPoints }}" vector-effect="non-scaling-stroke"></polyline>
|
|
|
|
</svg>
|
|
|
|
|
|
|
|
<div class="stock-values shrink-0">
|
|
|
|
<div class="size-h3 text-right {{ if eq .PercentChange 0.0 }}{{ else if gt .PercentChange 0.0 }}color-positive{{ else }}color-negative{{ end }}">{{ printf "%+.2f" .PercentChange }}%</div>
|
2024-04-29 23:32:46 +02:00
|
|
|
<div class="text-right">{{ .Currency }}{{ .Price | formatPrice }}</div>
|
2024-04-27 21:10:24 +02:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|