41 lines
2.7 KiB
HTML
41 lines
2.7 KiB
HTML
<div class="widget widget-type-{{ .GetType }}{{ if ne "" .CSSClass }} {{ .CSSClass }}{{ end }}">
|
|
{{- if not .HideHeader}}
|
|
<div class="widget-header">
|
|
{{- if ne "" .TitleURL }}
|
|
<h2><a href="{{ .TitleURL | safeURL }}" target="_blank" rel="noreferrer" class="uppercase">{{ .Title }}</a></h2>
|
|
{{- else }}
|
|
<h2 class="uppercase">{{ .Title }}</h2>
|
|
{{- end }}
|
|
{{- if .IsWIP }}
|
|
<div data-popover-type="html" data-popover-position="above">
|
|
<div data-popover-html>
|
|
<p class="size-h5">WORK IN PROGRESS</p>
|
|
<p class="margin-block-10 color-paragraph">This widget is still in development, certain features may not work as expected or may change drastically.</p>
|
|
<a class="color-primary visited-indicator" href="https://github.com/glanceapp/glance/issues" target="_blank" rel="noreferrer">Report issue</a>
|
|
</div>
|
|
<svg class="widget-beta-icon cursor-help" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
|
|
<path fill-rule="evenodd" d="M19 5.5a4.5 4.5 0 0 1-4.791 4.49c-.873-.055-1.808.128-2.368.8l-6.024 7.23a2.724 2.724 0 1 1-3.837-3.837L9.21 8.16c.672-.56.855-1.495.8-2.368a4.5 4.5 0 0 1 5.873-4.575c.324.105.39.51.15.752L13.34 4.66a.455.455 0 0 0-.11.494 3.01 3.01 0 0 0 1.617 1.617c.17.07.363.02.493-.111l2.692-2.692c.241-.241.647-.174.752.15.14.435.216.9.216 1.382ZM4 17a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
|
|
</svg>
|
|
</div>
|
|
{{- end }}
|
|
{{- if and .Error .ContentAvailable }}
|
|
<div class="notice-icon notice-icon-major" title="{{ .Error }}"></div>
|
|
{{- else if .Notice }}
|
|
<div class="notice-icon notice-icon-minor" title="{{ .Notice }}"></div>
|
|
{{- end }}
|
|
</div>
|
|
{{- end }}
|
|
<div class="widget-content{{ if .ContentAvailable }} {{ block "widget-content-classes" . }}{{ end }}{{ end }}">
|
|
{{- if .ContentAvailable }}
|
|
{{ block "widget-content" . }}{{ end }}
|
|
{{- else }}
|
|
<div class="widget-error-header">
|
|
<div class="color-negative size-h3">ERROR</div>
|
|
<svg class="widget-error-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z" />
|
|
</svg>
|
|
</div>
|
|
<p class="break-all">{{ if .Error }}{{ .Error }}{{ else }}No error information provided{{ end }}</p>
|
|
{{- end}}
|
|
</div>
|
|
</div>
|