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 36 37 38 39 40 41 42 43 44 45
| {% import ( "{{{ .Package }}}/app" "{{{ .Package }}}/app/controller/cutil" "{{{ .Package }}}/app/lib/theme" "{{{ .Package }}}/views/layout" ) %}
{% code type List struct { layout.Basic Themes theme.Themes } %}
{% func (p *List) Body(as *app.State, ps *cutil.PageState) %} <div class="card"> <h3>Add Theme</h3> <div class="mt"> <a href="/theme/new" title="add new theme"><button>New Theme</button></a>{{{ if .HasModule "themecatalog" }}} <a href="/theme/palette/crayola" title="add new theme"><button>Choose from Crayola colors</button></a> <a href="/theme/palette/css" title="add new theme"><button>Choose from CSS colors</button></a> <a href="/theme/palette/wikipedia" title="add new theme"><button>Choose from Wikipedia colors</button></a> <hr /> <form action="/theme/color/edit" method="get"> <div class="mt"> <input class="left mrs" type="color" name="color" value="{%s theme.Default.Light.NavBackground %}" /> <button type="submit">Custom Color Theme</button> </div> </form>{{{ end }}} </div> </div> <div class="card"> <h3>Current Themes</h3>{{{ if .HasModule "filesystem" }}}{{{ else }}} <em>Warning: changes to modules will not be saved between server restarts</em>{{{ end }}} <div class="overflow full-width"> <div class="theme-container mt"> {%- for _, t := range p.Themes -%} <div class="theme-item"> <a href="/theme/{%u t.Key %}"> {%= MockupTheme(t, true, "app", 5, ps) %} </a> </div> {%- endfor -%} </div> </div> </div> {% endfunc %}
|