github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vtheme/Add.html.go (about) 1 // Code generated by qtc from "Add.html". DO NOT EDIT. 2 // See https://github.com/valyala/quicktemplate for details. 3 4 // <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 5 6 //line views/vtheme/Add.html:2 7 package vtheme 8 9 //line views/vtheme/Add.html:2 10 import ( 11 "github.com/kyleu/dbaudit/app" 12 "github.com/kyleu/dbaudit/app/controller/cutil" 13 "github.com/kyleu/dbaudit/app/lib/theme" 14 "github.com/kyleu/dbaudit/app/util" 15 "github.com/kyleu/dbaudit/views/layout" 16 ) 17 18 //line views/vtheme/Add.html:10 19 import ( 20 qtio422016 "io" 21 22 qt422016 "github.com/valyala/quicktemplate" 23 ) 24 25 //line views/vtheme/Add.html:10 26 var ( 27 _ = qtio422016.Copy 28 _ = qt422016.AcquireByteBuffer 29 ) 30 31 //line views/vtheme/Add.html:10 32 type Add struct { 33 layout.Basic 34 Palette string 35 Themes theme.Themes 36 } 37 38 //line views/vtheme/Add.html:16 39 func (p *Add) StreamBody(qw422016 *qt422016.Writer, as *app.State, ps *cutil.PageState) { 40 //line views/vtheme/Add.html:16 41 qw422016.N().S(` 42 <div class="card"> 43 <h3>Choose Theme</h3> 44 <form action="/theme" method="post"> 45 <input type="hidden" name="palette" value="`) 46 //line views/vtheme/Add.html:20 47 qw422016.E().S(p.Palette) 48 //line views/vtheme/Add.html:20 49 qw422016.N().S(`" /> 50 <div class="overflow full-width"> 51 <table class="mt"> 52 <tbody> 53 `) 54 //line views/vtheme/Add.html:24 55 for _, t := range p.Themes { 56 //line views/vtheme/Add.html:24 57 qw422016.N().S(` <tr> 58 <th><a href="/theme/palette/`) 59 //line views/vtheme/Add.html:26 60 qw422016.E().S(p.Palette) 61 //line views/vtheme/Add.html:26 62 qw422016.N().S(`/`) 63 //line views/vtheme/Add.html:26 64 qw422016.E().S(t.Key) 65 //line views/vtheme/Add.html:26 66 qw422016.N().S(`">`) 67 //line views/vtheme/Add.html:26 68 qw422016.E().S(t.Key) 69 //line views/vtheme/Add.html:26 70 qw422016.N().S(`</a></th> 71 <th class="shrink" style="background-color: #ffffff; padding: 12px 36px;">`) 72 //line views/vtheme/Add.html:27 73 StreamMockupColors(qw422016, util.AppName, "", t.Light, true, "app", 5, ps) 74 //line views/vtheme/Add.html:27 75 qw422016.N().S(`</th> 76 <th class="shrink" style="background-color: #121212; padding: 12px 36px;">`) 77 //line views/vtheme/Add.html:28 78 StreamMockupColors(qw422016, util.AppName, "", t.Dark, true, "app", 5, ps) 79 //line views/vtheme/Add.html:28 80 qw422016.N().S(`</th> 81 </tr> 82 `) 83 //line views/vtheme/Add.html:30 84 } 85 //line views/vtheme/Add.html:30 86 qw422016.N().S(` </tbody> 87 </table> 88 </div> 89 </form> 90 </div> 91 `) 92 //line views/vtheme/Add.html:36 93 } 94 95 //line views/vtheme/Add.html:36 96 func (p *Add) WriteBody(qq422016 qtio422016.Writer, as *app.State, ps *cutil.PageState) { 97 //line views/vtheme/Add.html:36 98 qw422016 := qt422016.AcquireWriter(qq422016) 99 //line views/vtheme/Add.html:36 100 p.StreamBody(qw422016, as, ps) 101 //line views/vtheme/Add.html:36 102 qt422016.ReleaseWriter(qw422016) 103 //line views/vtheme/Add.html:36 104 } 105 106 //line views/vtheme/Add.html:36 107 func (p *Add) Body(as *app.State, ps *cutil.PageState) string { 108 //line views/vtheme/Add.html:36 109 qb422016 := qt422016.AcquireByteBuffer() 110 //line views/vtheme/Add.html:36 111 p.WriteBody(qb422016, as, ps) 112 //line views/vtheme/Add.html:36 113 qs422016 := string(qb422016.B) 114 //line views/vtheme/Add.html:36 115 qt422016.ReleaseByteBuffer(qb422016) 116 //line views/vtheme/Add.html:36 117 return qs422016 118 //line views/vtheme/Add.html:36 119 }