2021-09-07 21:39:22 +02:00
|
|
|
// Code generated by qtc from "header.qtpl". DO NOT EDIT.
|
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:1
|
2021-09-07 21:39:22 +02:00
|
|
|
package tpl
|
|
|
|
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:1
|
2021-09-07 21:39:22 +02:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:1
|
2021-09-07 21:39:22 +02:00
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:1
|
2021-09-07 21:39:22 +02:00
|
|
|
func StreamHeader(qw422016 *qt422016.Writer, title string, pages []NavItem) {
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:1
|
2021-09-07 21:39:22 +02:00
|
|
|
qw422016.N().S(`
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<title>vmalert`)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:5
|
2021-09-07 21:39:22 +02:00
|
|
|
if title != "" {
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:5
|
2021-09-07 21:39:22 +02:00
|
|
|
qw422016.N().S(` - `)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:5
|
2021-09-07 21:39:22 +02:00
|
|
|
qw422016.E().S(title)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:5
|
2021-09-07 21:39:22 +02:00
|
|
|
}
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:5
|
2021-09-07 21:39:22 +02:00
|
|
|
qw422016.N().S(`</title>
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
|
|
|
<style>
|
|
|
|
body{
|
|
|
|
min-height: 75rem;
|
|
|
|
padding-top: 4.5rem;
|
|
|
|
}
|
|
|
|
.group-heading {
|
|
|
|
cursor: pointer;
|
|
|
|
padding: 5px;
|
|
|
|
margin-top: 5px;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
.group-heading .anchor {
|
|
|
|
position:absolute;
|
|
|
|
top:-60px;
|
|
|
|
}
|
|
|
|
.group-heading span {
|
|
|
|
float: right;
|
|
|
|
margin-left: 5px;
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
|
|
|
.group-heading:hover {
|
|
|
|
background-color: #f8f9fa!important;
|
|
|
|
}
|
|
|
|
.table .error-cell{
|
|
|
|
word-break: break-word;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
`)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:36
|
2021-09-07 21:39:22 +02:00
|
|
|
StreamPrintNavItems(qw422016, title, pages)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:36
|
2021-09-07 21:39:22 +02:00
|
|
|
qw422016.N().S(`
|
|
|
|
<main class="px-2">
|
|
|
|
`)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
}
|
|
|
|
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
func WriteHeader(qq422016 qtio422016.Writer, title string, pages []NavItem) {
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
StreamHeader(qw422016, title, pages)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
}
|
|
|
|
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
func Header(title string, pages []NavItem) string {
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
WriteHeader(qb422016, title, pages)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
return qs422016
|
2022-05-02 14:16:27 +02:00
|
|
|
//line app/vmalert/tpl/header.qtpl:38
|
2021-09-07 21:39:22 +02:00
|
|
|
}
|