github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vtheme/Mockup.html.go (about) 1 // Code generated by qtc from "Mockup.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/Mockup.html:2 7 package vtheme 8 9 //line views/vtheme/Mockup.html:2 10 import ( 11 "fmt" 12 13 "github.com/kyleu/dbaudit/app/controller/cutil" 14 "github.com/kyleu/dbaudit/app/lib/theme" 15 "github.com/kyleu/dbaudit/app/util" 16 "github.com/kyleu/dbaudit/views/components" 17 ) 18 19 //line views/vtheme/Mockup.html:11 20 import ( 21 qtio422016 "io" 22 23 qt422016 "github.com/valyala/quicktemplate" 24 ) 25 26 //line views/vtheme/Mockup.html:11 27 var ( 28 _ = qtio422016.Copy 29 _ = qt422016.AcquireByteBuffer 30 ) 31 32 //line views/vtheme/Mockup.html:11 33 func StreamMockupTheme(qw422016 *qt422016.Writer, t *theme.Theme, pointer bool, icon string, indent int, ps *cutil.PageState) { 34 //line views/vtheme/Mockup.html:11 35 qw422016.N().S(`<div class="title small-text">`) 36 //line views/vtheme/Mockup.html:12 37 qw422016.E().S(t.Key) 38 //line views/vtheme/Mockup.html:12 39 qw422016.N().S(`</div>`) 40 //line views/vtheme/Mockup.html:13 41 StreamMockupColors(qw422016, util.AppName, "light", t.Light, pointer, icon, indent, ps) 42 //line views/vtheme/Mockup.html:14 43 StreamMockupColors(qw422016, util.AppName, "dark", t.Dark, pointer, icon, indent, ps) 44 //line views/vtheme/Mockup.html:15 45 } 46 47 //line views/vtheme/Mockup.html:15 48 func WriteMockupTheme(qq422016 qtio422016.Writer, t *theme.Theme, pointer bool, icon string, indent int, ps *cutil.PageState) { 49 //line views/vtheme/Mockup.html:15 50 qw422016 := qt422016.AcquireWriter(qq422016) 51 //line views/vtheme/Mockup.html:15 52 StreamMockupTheme(qw422016, t, pointer, icon, indent, ps) 53 //line views/vtheme/Mockup.html:15 54 qt422016.ReleaseWriter(qw422016) 55 //line views/vtheme/Mockup.html:15 56 } 57 58 //line views/vtheme/Mockup.html:15 59 func MockupTheme(t *theme.Theme, pointer bool, icon string, indent int, ps *cutil.PageState) string { 60 //line views/vtheme/Mockup.html:15 61 qb422016 := qt422016.AcquireByteBuffer() 62 //line views/vtheme/Mockup.html:15 63 WriteMockupTheme(qb422016, t, pointer, icon, indent, ps) 64 //line views/vtheme/Mockup.html:15 65 qs422016 := string(qb422016.B) 66 //line views/vtheme/Mockup.html:15 67 qt422016.ReleaseByteBuffer(qb422016) 68 //line views/vtheme/Mockup.html:15 69 return qs422016 70 //line views/vtheme/Mockup.html:15 71 } 72 73 //line views/vtheme/Mockup.html:17 74 func StreamMockupColors(qw422016 *qt422016.Writer, navTitle string, mode string, c *theme.Colors, pointer bool, icon string, indent int, ps *cutil.PageState) { 75 //line views/vtheme/Mockup.html:19 76 navStyle := fmt.Sprintf("color: %s; background-color: %s;", c.NavForeground, c.NavBackground) 77 78 menuStyle := fmt.Sprintf("color: %s; background-color: %s;", c.MenuForeground, c.MenuBackground) 79 menuLinkStyle := fmt.Sprintf("color: %s;", c.MenuForeground) 80 menuLinkSelectedStyle := fmt.Sprintf("color: %s; background-color: %s;", c.MenuSelectedForeground, c.MenuSelectedBackground) 81 82 mainStyle := fmt.Sprintf("color: %s; background-color: %s;", c.Foreground, c.Background) 83 mutedStyle := fmt.Sprintf("color: %s; background-color: %s;", c.ForegroundMuted, c.BackgroundMuted) 84 linkStyle := fmt.Sprintf("color: %s;", c.LinkForeground) 85 linkVisitedStyle := fmt.Sprintf("color: %s;", c.LinkVisitedForeground) 86 87 cls := "mockup" 88 if mode != "" { 89 cls += " only-" + mode + "-theme" 90 } 91 if pointer { 92 cls += " pointer" 93 } 94 95 //line views/vtheme/Mockup.html:38 96 components.StreamIndent(qw422016, true, indent) 97 //line views/vtheme/Mockup.html:38 98 qw422016.N().S(`<div class="`) 99 //line views/vtheme/Mockup.html:39 100 qw422016.E().S(cls) 101 //line views/vtheme/Mockup.html:39 102 qw422016.N().S(`"><div class="mock-nav" style="`) 103 //line views/vtheme/Mockup.html:40 104 qw422016.E().S(navStyle) 105 //line views/vtheme/Mockup.html:40 106 qw422016.N().S(`">`) 107 //line views/vtheme/Mockup.html:40 108 components.StreamSVGRef(qw422016, icon, 12, 12, `icon`, ps) 109 //line views/vtheme/Mockup.html:40 110 qw422016.E().S(navTitle) 111 //line views/vtheme/Mockup.html:40 112 qw422016.N().S(`</div><div class="mock-menu" style="`) 113 //line views/vtheme/Mockup.html:41 114 qw422016.E().S(menuStyle) 115 //line views/vtheme/Mockup.html:41 116 qw422016.N().S(`"><div class="mock-link" style="`) 117 //line views/vtheme/Mockup.html:42 118 qw422016.E().S(menuLinkStyle) 119 //line views/vtheme/Mockup.html:42 120 qw422016.N().S(`">A</div><div class="mock-link-selected" style="`) 121 //line views/vtheme/Mockup.html:43 122 qw422016.E().S(menuLinkSelectedStyle) 123 //line views/vtheme/Mockup.html:43 124 qw422016.N().S(`">B</div><div class="mock-link" style="`) 125 //line views/vtheme/Mockup.html:44 126 qw422016.E().S(menuLinkStyle) 127 //line views/vtheme/Mockup.html:44 128 qw422016.N().S(`">C</div><div class="mock-link" style="`) 129 //line views/vtheme/Mockup.html:45 130 qw422016.E().S(menuLinkStyle) 131 //line views/vtheme/Mockup.html:45 132 qw422016.N().S(`">D</div></div><div class="mock-main" style="`) 133 //line views/vtheme/Mockup.html:47 134 qw422016.E().S(mainStyle) 135 //line views/vtheme/Mockup.html:47 136 qw422016.N().S(`"><div class="mock-muted" style="`) 137 //line views/vtheme/Mockup.html:48 138 qw422016.E().S(mutedStyle) 139 //line views/vtheme/Mockup.html:48 140 qw422016.N().S(`">Welcome!</div><div><div class="mock-list">Here's some links:</div><ul><li class="mock-link" style="`) 141 //line views/vtheme/Mockup.html:52 142 qw422016.E().S(linkStyle) 143 //line views/vtheme/Mockup.html:52 144 qw422016.N().S(`">New</li><li class="mock-link" style="`) 145 //line views/vtheme/Mockup.html:53 146 qw422016.E().S(linkStyle) 147 //line views/vtheme/Mockup.html:53 148 qw422016.N().S(`">Also New</li><li class="mock-link-visited" style="`) 149 //line views/vtheme/Mockup.html:54 150 qw422016.E().S(linkVisitedStyle) 151 //line views/vtheme/Mockup.html:54 152 qw422016.N().S(`">Visited</li></ul></div></div></div>`) 153 //line views/vtheme/Mockup.html:59 154 } 155 156 //line views/vtheme/Mockup.html:59 157 func WriteMockupColors(qq422016 qtio422016.Writer, navTitle string, mode string, c *theme.Colors, pointer bool, icon string, indent int, ps *cutil.PageState) { 158 //line views/vtheme/Mockup.html:59 159 qw422016 := qt422016.AcquireWriter(qq422016) 160 //line views/vtheme/Mockup.html:59 161 StreamMockupColors(qw422016, navTitle, mode, c, pointer, icon, indent, ps) 162 //line views/vtheme/Mockup.html:59 163 qt422016.ReleaseWriter(qw422016) 164 //line views/vtheme/Mockup.html:59 165 } 166 167 //line views/vtheme/Mockup.html:59 168 func MockupColors(navTitle string, mode string, c *theme.Colors, pointer bool, icon string, indent int, ps *cutil.PageState) string { 169 //line views/vtheme/Mockup.html:59 170 qb422016 := qt422016.AcquireByteBuffer() 171 //line views/vtheme/Mockup.html:59 172 WriteMockupColors(qb422016, navTitle, mode, c, pointer, icon, indent, ps) 173 //line views/vtheme/Mockup.html:59 174 qs422016 := string(qb422016.B) 175 //line views/vtheme/Mockup.html:59 176 qt422016.ReleaseByteBuffer(qb422016) 177 //line views/vtheme/Mockup.html:59 178 return qs422016 179 //line views/vtheme/Mockup.html:59 180 }