github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vtheme/List.html.go (about)

     1  // Code generated by qtc from "List.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/List.html:2
     7  package vtheme
     8  
     9  //line views/vtheme/List.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/views/layout"
    15  )
    16  
    17  //line views/vtheme/List.html:9
    18  import (
    19  	qtio422016 "io"
    20  
    21  	qt422016 "github.com/valyala/quicktemplate"
    22  )
    23  
    24  //line views/vtheme/List.html:9
    25  var (
    26  	_ = qtio422016.Copy
    27  	_ = qt422016.AcquireByteBuffer
    28  )
    29  
    30  //line views/vtheme/List.html:9
    31  type List struct {
    32  	layout.Basic
    33  	Themes theme.Themes
    34  }
    35  
    36  //line views/vtheme/List.html:14
    37  func (p *List) StreamBody(qw422016 *qt422016.Writer, as *app.State, ps *cutil.PageState) {
    38  //line views/vtheme/List.html:14
    39  	qw422016.N().S(`
    40    <div class="card">
    41      <h3>Add Theme</h3>
    42      <div class="mt">
    43        <a href="/theme/new" title="add new theme"><button>New Theme</button></a>
    44        <a href="/theme/palette/crayola" title="add new theme"><button>Choose from Crayola colors</button></a>
    45        <a href="/theme/palette/css" title="add new theme"><button>Choose from CSS colors</button></a>
    46        <a href="/theme/palette/wikipedia" title="add new theme"><button>Choose from Wikipedia colors</button></a>
    47        <hr />
    48        <form action="/theme/color/edit" method="get">
    49          <div class="mt">
    50            <input class="left mrs" type="color" name="color" value="`)
    51  //line views/vtheme/List.html:25
    52  	qw422016.E().S(theme.Default.Light.NavBackground)
    53  //line views/vtheme/List.html:25
    54  	qw422016.N().S(`" />
    55            <button type="submit">Custom Color Theme</button>
    56          </div>
    57        </form>
    58      </div>
    59    </div>
    60    <div class="card">
    61      <h3>Current Themes</h3>
    62      <div class="overflow full-width">
    63        <div class="theme-container mt">
    64  `)
    65  //line views/vtheme/List.html:35
    66  	for _, t := range p.Themes {
    67  //line views/vtheme/List.html:35
    68  		qw422016.N().S(`        <div class="theme-item">
    69            <a href="/theme/`)
    70  //line views/vtheme/List.html:37
    71  		qw422016.N().U(t.Key)
    72  //line views/vtheme/List.html:37
    73  		qw422016.N().S(`">
    74              `)
    75  //line views/vtheme/List.html:38
    76  		StreamMockupTheme(qw422016, t, true, "app", 5, ps)
    77  //line views/vtheme/List.html:38
    78  		qw422016.N().S(`
    79            </a>
    80          </div>
    81  `)
    82  //line views/vtheme/List.html:41
    83  	}
    84  //line views/vtheme/List.html:41
    85  	qw422016.N().S(`      </div>
    86      </div>
    87    </div>
    88  `)
    89  //line views/vtheme/List.html:45
    90  }
    91  
    92  //line views/vtheme/List.html:45
    93  func (p *List) WriteBody(qq422016 qtio422016.Writer, as *app.State, ps *cutil.PageState) {
    94  //line views/vtheme/List.html:45
    95  	qw422016 := qt422016.AcquireWriter(qq422016)
    96  //line views/vtheme/List.html:45
    97  	p.StreamBody(qw422016, as, ps)
    98  //line views/vtheme/List.html:45
    99  	qt422016.ReleaseWriter(qw422016)
   100  //line views/vtheme/List.html:45
   101  }
   102  
   103  //line views/vtheme/List.html:45
   104  func (p *List) Body(as *app.State, ps *cutil.PageState) string {
   105  //line views/vtheme/List.html:45
   106  	qb422016 := qt422016.AcquireByteBuffer()
   107  //line views/vtheme/List.html:45
   108  	p.WriteBody(qb422016, as, ps)
   109  //line views/vtheme/List.html:45
   110  	qs422016 := string(qb422016.B)
   111  //line views/vtheme/List.html:45
   112  	qt422016.ReleaseByteBuffer(qb422016)
   113  //line views/vtheme/List.html:45
   114  	return qs422016
   115  //line views/vtheme/List.html:45
   116  }