[CI] pgitBot
·
2026-02-26
base.layout.tmpl
Cheetah
1{{define "base"}}
2<!doctype html>
3<html lang="en">
4 <head>
5 <meta charset='utf-8'>
6 <meta name="viewport" content="width=device-width, initial-scale=1" />
7 <title>{{template "title" .}}</title>
8 <meta name="description" content="{{.Repo.Desc}}">
9 <meta name="keywords" content="git, code, forge, repo, repository, {{.Repo.Label}}" />
10
11 {{template "meta" .}}
12
13 <link rel="stylesheet" href="{{.Repo.RootRelative}}vars.css" />
14 <link rel="stylesheet" href="{{.Repo.RootRelative}}smol.css" />
15 <link rel="stylesheet" href="{{.Repo.RootRelative}}main.css" />
16 </head>
17 <body>
18 <header class="box">{{template "header" .}}</header>
19 <hr class="my" />
20 <main>{{template "content" .}}</main>
21 <hr class="my" />
22 <footer>{{template "footer" .}}</footer>
23
24 {{if .Repo.IssuesEnabled}}
25 <!-- New Issue Modal -->
26 <div id="new-issue-modal" class="modal" style="display:none;">
27 <div class="modal-content">
28 <span class="close-btn" data-modal="new-issue-modal">×</span>
29 <h3>Create New Issue</h3>
30 <input type="text" id="new-issue-title" placeholder="Title">
31 <textarea id="new-issue-body" placeholder="Leave a comment..."></textarea>
32 <div class="flex justify-end mt">
33 <button id="submit-new-issue-btn" class="btn">Submit new issue</button>
34 </div>
35 </div>
36 </div>
37
38 <!-- Generic Error Modal -->
39 <div id="error-modal" class="modal" style="display:none;">
40 <div class="modal-content">
41 <span class="close-btn" data-modal="error-modal">×</span>
42 <h3>Error</h3>
43 <p id="error-modal-message"></p>
44 <div class="flex justify-end mt">
45 <button class="btn close-btn" data-modal="error-modal">OK</button>
46 </div>
47 </div>
48 </div>
49
50 <!-- Confirmation Modal -->
51 <div id="confirm-modal" class="modal" style="display:none;">
52 <div class="modal-content">
53 <span class="close-btn" data-modal="confirm-modal">×</span>
54 <h3 id="confirm-modal-title">Confirmation</h3>
55 <p id="confirm-modal-message"></p>
56 <div class="flex justify-end mt">
57 <button id="confirm-modal-cancel-btn" class="btn btn-secondary" data-modal="confirm-modal">Cancel</button>
58 <button id="confirm-modal-ok-btn" class="btn">OK</button>
59 </div>
60 </div>
61 </div>
62
63 <!-- This script block provides necessary data from Go to JavaScript -->
64 <script>
65 const PGB_REACTIONS = {
66 {{with .Repo.IssueDB}}{{range $key, $value := .Reactions}}
67 "{{$key}}": "{{$value}}",
68 {{end}}{{end}}
69 };
70 const PGB_EMAIL_ADDR = "{{with .Repo.IssueDB}}{{.IssuesEmail}}{{end}}";
71 const PGB_SUBJECT_TAG = "{{with .Repo.IssueDB}}{{.SubjectTag}}{{end}}";
72 </script>
73 <script src="{{.Repo.RootRelative}}pgit.js" defer></script>
74 {{end}}
75 <script src="{{.Repo.RootRelative}}search.js" defer></script>
76 </body>
77</html>
78{{end}}