github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vtheme/Add.html (about) 1 <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 2 {% import ( 3 "github.com/kyleu/dbaudit/app" 4 "github.com/kyleu/dbaudit/app/controller/cutil" 5 "github.com/kyleu/dbaudit/app/lib/theme" 6 "github.com/kyleu/dbaudit/app/util" 7 "github.com/kyleu/dbaudit/views/layout" 8 ) %} 9 10 {% code type Add struct { 11 layout.Basic 12 Palette string 13 Themes theme.Themes 14 } %} 15 16 {% func (p *Add) Body(as *app.State, ps *cutil.PageState) %} 17 <div class="card"> 18 <h3>Choose Theme</h3> 19 <form action="/theme" method="post"> 20 <input type="hidden" name="palette" value="{%s p.Palette %}" /> 21 <div class="overflow full-width"> 22 <table class="mt"> 23 <tbody> 24 {%- for _, t := range p.Themes -%} 25 <tr> 26 <th><a href="/theme/palette/{%s p.Palette %}/{%s t.Key %}">{%s t.Key %}</a></th> 27 <th class="shrink" style="background-color: #ffffff; padding: 12px 36px;">{%= MockupColors(util.AppName, "", t.Light, true, "app", 5, ps) %}</th> 28 <th class="shrink" style="background-color: #121212; padding: 12px 36px;">{%= MockupColors(util.AppName, "", t.Dark, true, "app", 5, ps) %}</th> 29 </tr> 30 {%- endfor -%} 31 </tbody> 32 </table> 33 </div> 34 </form> 35 </div> 36 {% endfunc %}