mirror of
https://github.com/glanceapp/glance.git
synced 2024-12-26 00:49:32 +01:00
24 lines
1010 B
HTML
24 lines
1010 B
HTML
{{ 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>
|
|
<div class="text-right">{{ .Currency }}{{ .Price | formatPrice }}</div>
|
|
</div>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|