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

     1  // Code generated by qtc from "Head.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/layout/Head.html:2
     7  package layout
     8  
     9  //line views/layout/Head.html:2
    10  import (
    11  	"github.com/kyleu/dbaudit/app"
    12  	"github.com/kyleu/dbaudit/app/controller/cutil"
    13  	"github.com/kyleu/dbaudit/app/util"
    14  	"github.com/kyleu/dbaudit/assets"
    15  )
    16  
    17  //line views/layout/Head.html:9
    18  import (
    19  	qtio422016 "io"
    20  
    21  	qt422016 "github.com/valyala/quicktemplate"
    22  )
    23  
    24  //line views/layout/Head.html:9
    25  var (
    26  	_ = qtio422016.Copy
    27  	_ = qt422016.AcquireByteBuffer
    28  )
    29  
    30  //line views/layout/Head.html:9
    31  func StreamHead(qw422016 *qt422016.Writer, as *app.State, ps *cutil.PageState) {
    32  //line views/layout/Head.html:9
    33  	qw422016.N().S(`
    34  `)
    35  //line views/layout/Head.html:10
    36  	thm := as.Themes.Get(ps.Profile.Theme, ps.Logger)
    37  
    38  //line views/layout/Head.html:10
    39  	qw422016.N().S(`  <meta charset="UTF-8">
    40    <title>`)
    41  //line views/layout/Head.html:12
    42  	qw422016.E().S(ps.TitleString())
    43  //line views/layout/Head.html:12
    44  	qw422016.N().S(`</title>
    45    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
    46    `)
    47  //line views/layout/Head.html:14
    48  	if ps.Description != "" {
    49  //line views/layout/Head.html:14
    50  		qw422016.N().S(`<meta property="description" content="`)
    51  //line views/layout/Head.html:14
    52  		qw422016.E().S(ps.Description)
    53  //line views/layout/Head.html:14
    54  		qw422016.N().S(`">
    55    `)
    56  //line views/layout/Head.html:15
    57  	}
    58  //line views/layout/Head.html:15
    59  	qw422016.N().S(`<meta property="og:title" content="`)
    60  //line views/layout/Head.html:15
    61  	qw422016.E().S(ps.TitleString())
    62  //line views/layout/Head.html:15
    63  	qw422016.N().S(`">
    64    <meta property="og:type" content="website">
    65    <meta property="og:image" content="/assets/`)
    66  //line views/layout/Head.html:17
    67  	qw422016.N().U(util.AppKey)
    68  //line views/layout/Head.html:17
    69  	qw422016.N().S(`.svg">
    70    <meta property="og:locale" content="en_US">
    71    <meta name="theme-color" content="`)
    72  //line views/layout/Head.html:19
    73  	qw422016.E().S(thm.Light.NavBackground)
    74  //line views/layout/Head.html:19
    75  	qw422016.N().S(`" media="(prefers-color-scheme: light)">
    76    <meta name="theme-color" content="`)
    77  //line views/layout/Head.html:20
    78  	qw422016.E().S(thm.Dark.NavBackground)
    79  //line views/layout/Head.html:20
    80  	qw422016.N().S(`" media="(prefers-color-scheme: dark)">`)
    81  //line views/layout/Head.html:20
    82  	qw422016.N().S(ps.HeaderContent)
    83  //line views/layout/Head.html:20
    84  	qw422016.N().S(`
    85    <link rel="icon" href="`)
    86  //line views/layout/Head.html:21
    87  	qw422016.E().S(assets.URL(`logo.svg`))
    88  //line views/layout/Head.html:21
    89  	qw422016.N().S(`" type="image/svg+xml">
    90    <style>
    91      `)
    92  //line views/layout/Head.html:23
    93  	qw422016.N().S(thm.CSS(2))
    94  //line views/layout/Head.html:23
    95  	qw422016.N().S(`  </style>
    96    <link rel="stylesheet" media="screen" href="`)
    97  //line views/layout/Head.html:24
    98  	qw422016.E().S(assets.URL(`client.css`))
    99  //line views/layout/Head.html:24
   100  	qw422016.N().S(`">
   101    <script type="text/javascript" src="`)
   102  //line views/layout/Head.html:25
   103  	qw422016.E().S(assets.URL(`client.js`))
   104  //line views/layout/Head.html:25
   105  	qw422016.N().S(`"></script>
   106  `)
   107  //line views/layout/Head.html:26
   108  }
   109  
   110  //line views/layout/Head.html:26
   111  func WriteHead(qq422016 qtio422016.Writer, as *app.State, ps *cutil.PageState) {
   112  //line views/layout/Head.html:26
   113  	qw422016 := qt422016.AcquireWriter(qq422016)
   114  //line views/layout/Head.html:26
   115  	StreamHead(qw422016, as, ps)
   116  //line views/layout/Head.html:26
   117  	qt422016.ReleaseWriter(qw422016)
   118  //line views/layout/Head.html:26
   119  }
   120  
   121  //line views/layout/Head.html:26
   122  func Head(as *app.State, ps *cutil.PageState) string {
   123  //line views/layout/Head.html:26
   124  	qb422016 := qt422016.AcquireByteBuffer()
   125  //line views/layout/Head.html:26
   126  	WriteHead(qb422016, as, ps)
   127  //line views/layout/Head.html:26
   128  	qs422016 := string(qb422016.B)
   129  //line views/layout/Head.html:26
   130  	qt422016.ReleaseByteBuffer(qb422016)
   131  //line views/layout/Head.html:26
   132  	return qs422016
   133  //line views/layout/Head.html:26
   134  }