Theme Catalog

/views/vtheme/Add.html (1.2 KB)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% import (
"{{{ .Package }}}/app"
"{{{ .Package }}}/app/controller/cutil"
"{{{ .Package }}}/app/lib/theme"
"{{{ .Package }}}/app/util"
"{{{ .Package }}}/views/layout"
) %}

{% code type Add struct {
layout.Basic
Palette string
Themes theme.Themes
} %}

{% func (p *Add) Body(as *app.State, ps *cutil.PageState) %}
<div class="card">
<h3>Choose Theme</h3>
<form action="/theme" method="post">
<input type="hidden" name="palette" value="{%s p.Palette %}" />
<div class="overflow full-width">
<table class="mt">
<tbody>
{%- for _, t := range p.Themes -%}
<tr>
<th><a href="/theme/palette/{%s p.Palette %}/{%s t.Key %}">{%s t.Key %}</a></th>
<th class="shrink" style="background-color: #ffffff; padding: 12px 36px;">{%= MockupColors(util.AppName, "", t.Light, true, "app", 5, ps) %}</th>
<th class="shrink" style="background-color: #121212; padding: 12px 36px;">{%= MockupColors(util.AppName, "", t.Dark, true, "app", 5, ps) %}</th>
</tr>
{%- endfor -%}
</tbody>
</table>
</div>
</form>
</div>
{% endfunc %}