github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vtheme/Editor.html.go (about) 1 // Code generated by qtc from "Editor.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/Editor.html:2 7 package vtheme 8 9 //line views/vtheme/Editor.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 ) 15 16 //line views/vtheme/Editor.html:8 17 import ( 18 qtio422016 "io" 19 20 qt422016 "github.com/valyala/quicktemplate" 21 ) 22 23 //line views/vtheme/Editor.html:8 24 var ( 25 _ = qtio422016.Copy 26 _ = qt422016.AcquireByteBuffer 27 ) 28 29 //line views/vtheme/Editor.html:8 30 func StreamEditor(qw422016 *qt422016.Writer, title string, navTitle string, t *theme.Theme, icon string, as *app.State, ps *cutil.PageState) { 31 //line views/vtheme/Editor.html:8 32 qw422016.N().S(` 33 <div class="card" id="theme"> 34 <div class="overflow full-width"> 35 <table class="centered min-200"> 36 <thead> 37 <tr> 38 <th class="left-align shrink">`) 39 //line views/vtheme/Editor.html:14 40 qw422016.E().S(title) 41 //line views/vtheme/Editor.html:14 42 qw422016.N().S(`</th> 43 <th class="bl" colspan="2"> 44 <div>Light</div> 45 <div id="mockup-light">`) 46 //line views/vtheme/Editor.html:17 47 StreamMockupColors(qw422016, navTitle, "", t.Light, false, icon, 5, ps) 48 //line views/vtheme/Editor.html:17 49 qw422016.N().S(`</div> 50 </th> 51 <th class="bl" colspan="2"> 52 <div>Dark</div> 53 <div id="mockup-dark">`) 54 //line views/vtheme/Editor.html:21 55 StreamMockupColors(qw422016, navTitle, "", t.Dark, false, icon, 5, ps) 56 //line views/vtheme/Editor.html:21 57 qw422016.N().S(`</div> 58 </th> 59 </tr> 60 <tr> 61 <th></th> 62 <th class="bl">Background</th> 63 <th>Foreground</th> 64 <th class="bl">Background</th> 65 <th>Foreground</th> 66 </tr> 67 </thead> 68 `) 69 //line views/vtheme/Editor.html:33 70 const lp = "light" 71 const dp = "dark" 72 73 //line views/vtheme/Editor.html:35 74 qw422016.N().S(` <tbody> 75 <tr> 76 <th class="left-align shrink">Main Content</th> 77 <td class="bl">`) 78 //line views/vtheme/Editor.html:39 79 streamcinput(qw422016, lp, "background", t.Light.Background) 80 //line views/vtheme/Editor.html:39 81 qw422016.N().S(`</td> 82 <td>`) 83 //line views/vtheme/Editor.html:40 84 streamcinput(qw422016, lp, "foreground", t.Light.Foreground) 85 //line views/vtheme/Editor.html:40 86 qw422016.N().S(`</td> 87 <td class="bl">`) 88 //line views/vtheme/Editor.html:41 89 streamcinput(qw422016, dp, "background", t.Dark.Background) 90 //line views/vtheme/Editor.html:41 91 qw422016.N().S(`</td> 92 <td>`) 93 //line views/vtheme/Editor.html:42 94 streamcinput(qw422016, dp, "foreground", t.Dark.Foreground) 95 //line views/vtheme/Editor.html:42 96 qw422016.N().S(`</td> 97 </tr> 98 <tr> 99 <th class="left-align shrink">Muted</th> 100 <td class="bl">`) 101 //line views/vtheme/Editor.html:46 102 streamcinput(qw422016, lp, "background-muted", t.Light.BackgroundMuted) 103 //line views/vtheme/Editor.html:46 104 qw422016.N().S(`</td> 105 <td>`) 106 //line views/vtheme/Editor.html:47 107 streamcinput(qw422016, lp, "foreground-muted", t.Light.ForegroundMuted) 108 //line views/vtheme/Editor.html:47 109 qw422016.N().S(`</td> 110 <td class="bl">`) 111 //line views/vtheme/Editor.html:48 112 streamcinput(qw422016, dp, "background-muted", t.Dark.BackgroundMuted) 113 //line views/vtheme/Editor.html:48 114 qw422016.N().S(`</td> 115 <td>`) 116 //line views/vtheme/Editor.html:49 117 streamcinput(qw422016, dp, "foreground-muted", t.Dark.ForegroundMuted) 118 //line views/vtheme/Editor.html:49 119 qw422016.N().S(`</td> 120 </tr> 121 <tr> 122 <th class="left-align shrink">Link</th> 123 <td class="bl"></td> 124 <td>`) 125 //line views/vtheme/Editor.html:54 126 streamcinput(qw422016, lp, "link-foreground", t.Light.LinkForeground) 127 //line views/vtheme/Editor.html:54 128 qw422016.N().S(`</td> 129 <td class="bl"></td> 130 <td>`) 131 //line views/vtheme/Editor.html:56 132 streamcinput(qw422016, dp, "link-foreground", t.Dark.LinkForeground) 133 //line views/vtheme/Editor.html:56 134 qw422016.N().S(`</td> 135 </tr> 136 <tr> 137 <th class="left-align shrink">Visited Link</th> 138 <td class="bl"></td> 139 <td>`) 140 //line views/vtheme/Editor.html:61 141 streamcinput(qw422016, lp, "link-visited-foreground", t.Light.LinkVisitedForeground) 142 //line views/vtheme/Editor.html:61 143 qw422016.N().S(`</td> 144 <td class="bl"></td> 145 <td>`) 146 //line views/vtheme/Editor.html:63 147 streamcinput(qw422016, dp, "link-visited-foreground", t.Dark.LinkVisitedForeground) 148 //line views/vtheme/Editor.html:63 149 qw422016.N().S(`</td> 150 </tr> 151 <tr> 152 <th class="left-align shrink">Navigation</th> 153 <td class="bl">`) 154 //line views/vtheme/Editor.html:67 155 streamcinput(qw422016, lp, "nav-background", t.Light.NavBackground) 156 //line views/vtheme/Editor.html:67 157 qw422016.N().S(`</td> 158 <td>`) 159 //line views/vtheme/Editor.html:68 160 streamcinput(qw422016, lp, "nav-foreground", t.Light.NavForeground) 161 //line views/vtheme/Editor.html:68 162 qw422016.N().S(`</td> 163 <td class="bl">`) 164 //line views/vtheme/Editor.html:69 165 streamcinput(qw422016, dp, "nav-background", t.Dark.NavBackground) 166 //line views/vtheme/Editor.html:69 167 qw422016.N().S(`</td> 168 <td>`) 169 //line views/vtheme/Editor.html:70 170 streamcinput(qw422016, dp, "nav-foreground", t.Dark.NavForeground) 171 //line views/vtheme/Editor.html:70 172 qw422016.N().S(`</td> 173 </tr> 174 <tr> 175 <th class="left-align shrink">Menu</th> 176 <td class="bl">`) 177 //line views/vtheme/Editor.html:74 178 streamcinput(qw422016, lp, "menu-background", t.Light.MenuBackground) 179 //line views/vtheme/Editor.html:74 180 qw422016.N().S(`</td> 181 <td>`) 182 //line views/vtheme/Editor.html:75 183 streamcinput(qw422016, lp, "menu-foreground", t.Light.MenuForeground) 184 //line views/vtheme/Editor.html:75 185 qw422016.N().S(`</td> 186 <td class="bl">`) 187 //line views/vtheme/Editor.html:76 188 streamcinput(qw422016, dp, "menu-background", t.Dark.MenuBackground) 189 //line views/vtheme/Editor.html:76 190 qw422016.N().S(`</td> 191 <td>`) 192 //line views/vtheme/Editor.html:77 193 streamcinput(qw422016, dp, "menu-foreground", t.Dark.MenuForeground) 194 //line views/vtheme/Editor.html:77 195 qw422016.N().S(`</td> 196 </tr> 197 <tr> 198 <th class="left-align shrink">Selected Menu</th> 199 <td class="bl">`) 200 //line views/vtheme/Editor.html:81 201 streamcinput(qw422016, lp, "menu-selected-background", t.Light.MenuSelectedBackground) 202 //line views/vtheme/Editor.html:81 203 qw422016.N().S(`</td> 204 <td>`) 205 //line views/vtheme/Editor.html:82 206 streamcinput(qw422016, lp, "menu-selected-foreground", t.Light.MenuSelectedForeground) 207 //line views/vtheme/Editor.html:82 208 qw422016.N().S(`</td> 209 <td class="bl">`) 210 //line views/vtheme/Editor.html:83 211 streamcinput(qw422016, dp, "menu-selected-background", t.Dark.MenuSelectedBackground) 212 //line views/vtheme/Editor.html:83 213 qw422016.N().S(`</td> 214 <td>`) 215 //line views/vtheme/Editor.html:84 216 streamcinput(qw422016, dp, "menu-selected-foreground", t.Dark.MenuSelectedForeground) 217 //line views/vtheme/Editor.html:84 218 qw422016.N().S(`</td> 219 </tr> 220 </tbody> 221 </table> 222 </div> 223 </div> 224 `) 225 //line views/vtheme/Editor.html:90 226 } 227 228 //line views/vtheme/Editor.html:90 229 func WriteEditor(qq422016 qtio422016.Writer, title string, navTitle string, t *theme.Theme, icon string, as *app.State, ps *cutil.PageState) { 230 //line views/vtheme/Editor.html:90 231 qw422016 := qt422016.AcquireWriter(qq422016) 232 //line views/vtheme/Editor.html:90 233 StreamEditor(qw422016, title, navTitle, t, icon, as, ps) 234 //line views/vtheme/Editor.html:90 235 qt422016.ReleaseWriter(qw422016) 236 //line views/vtheme/Editor.html:90 237 } 238 239 //line views/vtheme/Editor.html:90 240 func Editor(title string, navTitle string, t *theme.Theme, icon string, as *app.State, ps *cutil.PageState) string { 241 //line views/vtheme/Editor.html:90 242 qb422016 := qt422016.AcquireByteBuffer() 243 //line views/vtheme/Editor.html:90 244 WriteEditor(qb422016, title, navTitle, t, icon, as, ps) 245 //line views/vtheme/Editor.html:90 246 qs422016 := string(qb422016.B) 247 //line views/vtheme/Editor.html:90 248 qt422016.ReleaseByteBuffer(qb422016) 249 //line views/vtheme/Editor.html:90 250 return qs422016 251 //line views/vtheme/Editor.html:90 252 } 253 254 //line views/vtheme/Editor.html:92 255 func streamcinput(qw422016 *qt422016.Writer, mode string, k string, v string) { 256 //line views/vtheme/Editor.html:92 257 qw422016.N().S(`<input class="color-var" data-mode="`) 258 //line views/vtheme/Editor.html:93 259 qw422016.E().S(mode) 260 //line views/vtheme/Editor.html:93 261 qw422016.N().S(`" data-var="color-`) 262 //line views/vtheme/Editor.html:93 263 qw422016.E().S(k) 264 //line views/vtheme/Editor.html:93 265 qw422016.N().S(`" type="color" id="`) 266 //line views/vtheme/Editor.html:93 267 qw422016.E().S(mode) 268 //line views/vtheme/Editor.html:93 269 qw422016.N().S(`-`) 270 //line views/vtheme/Editor.html:93 271 qw422016.E().S(k) 272 //line views/vtheme/Editor.html:93 273 qw422016.N().S(`" name="`) 274 //line views/vtheme/Editor.html:93 275 qw422016.E().S(mode) 276 //line views/vtheme/Editor.html:93 277 qw422016.N().S(`-`) 278 //line views/vtheme/Editor.html:93 279 qw422016.E().S(k) 280 //line views/vtheme/Editor.html:93 281 qw422016.N().S(`" value="`) 282 //line views/vtheme/Editor.html:93 283 qw422016.E().S(v) 284 //line views/vtheme/Editor.html:93 285 qw422016.N().S(`" autocomplete="off" />`) 286 //line views/vtheme/Editor.html:94 287 } 288 289 //line views/vtheme/Editor.html:94 290 func writecinput(qq422016 qtio422016.Writer, mode string, k string, v string) { 291 //line views/vtheme/Editor.html:94 292 qw422016 := qt422016.AcquireWriter(qq422016) 293 //line views/vtheme/Editor.html:94 294 streamcinput(qw422016, mode, k, v) 295 //line views/vtheme/Editor.html:94 296 qt422016.ReleaseWriter(qw422016) 297 //line views/vtheme/Editor.html:94 298 } 299 300 //line views/vtheme/Editor.html:94 301 func cinput(mode string, k string, v string) string { 302 //line views/vtheme/Editor.html:94 303 qb422016 := qt422016.AcquireByteBuffer() 304 //line views/vtheme/Editor.html:94 305 writecinput(qb422016, mode, k, v) 306 //line views/vtheme/Editor.html:94 307 qs422016 := string(qb422016.B) 308 //line views/vtheme/Editor.html:94 309 qt422016.ReleaseByteBuffer(qb422016) 310 //line views/vtheme/Editor.html:94 311 return qs422016 312 //line views/vtheme/Editor.html:94 313 }