detached 27fb45f

Split html templates into fragments

commit
27fb45fcf710a6803e2e623a81f8eb518d23f2f3
author
bnema · · 2023-09-19 18:39 UTC
parent
4c3a95f
signature
unsigned
3 files · +43 -0
A internal/gotemplate/models/html/fragments/footer.gohtml +0 -0

no textual change.

A internal/gotemplate/models/html/fragments/header.gohtml +11 -0
@@ -0,0 +1,11 @@
1+<head>
2+ <meta charset="UTF-8" />
3+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4+ <title>{{ .header.meta.title }}</title>
5+ <link rel="stylesheet" href="/assets/css/tailwind.css" />
6+ <link rel="stylesheet" href="/libs/iconoir.css" />
7+ <script src="/libs/alpine.min.js"></script>
8+ <script src="/libs/htmx.min.js"></script>
9+ <script src="/libs/htmx-sse.js"></script>
10+ <script src="assets/js/custom.js"></script>
11+</head>⏎̸
@@ -0,0 +1,11 @@
1+<head>
2+ <meta charset="UTF-8" />
3+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4+ <title>{{ .header.meta.title }}</title>
5+ <link rel="stylesheet" href="/assets/css/tailwind.css" />
6+ <link rel="stylesheet" href="/libs/iconoir.css" />
7+ <script src="/libs/alpine.min.js"></script>
8+ <script src="/libs/htmx.min.js"></script>
9+ <script src="/libs/htmx-sse.js"></script>
10+ <script src="assets/js/custom.js"></script>
11+</head>⏎̸
A internal/gotemplate/models/html/fragments/leftmenu.gohtml +32 -0
@@ -0,0 +1,32 @@
1+<div class="w-full md:w-1/5 flex flex-col space-evenly p-4 md:p-0">
2+ <div class="hidden md:flex justify-center p-4">
3+ <img src="/assets/imgs/gordon-mascot-hq-trsp.png" alt="logo" class="h-32" />
4+ </div>
5+ <div class="p-4 flex flex-col bg-gordonmascot-lblue rounded-lg shadow space-y-4">
6+ <div class="w-full flex justify-center">
7+ <h1 class="gordon-title text-4xl xl:text-5xl text-gordonmascot-hblue tracking-tighter">Gordon</h1>
8+ <span class="text-gordonmascot-mblue text-sm">{{ .BuildVersion }}</span>
9+ </div>
10+ <div class="w-full">
11+ <ul
12+ class="flex flex-wrap md:flex-col md:space-y-6 md:py-8 font-semibold text-gray-100 text-lg md:text-2xl md:pl-4 min-w-fit">
13+ <li class="flex items-center w-1/2 md:w-full">
14+ <i class="iconoir-dashboard-speed mr-2 md:text-3xl"></i>
15+ <a href="#">Dashboard</a>
16+ </li>
17+ <li class="flex items-center w-1/2 md:w-full">
18+ <i class="iconoir-server mr-2 md:text-3xl"></i>
19+ <a href="#manager">Manager</a>
20+ </li>
21+ <li class="flex items-center w-1/2 md:w-full">
22+ <i class="iconoir-community mr-2 md:text-3xl"></i>
23+ <a href="#users">Users</a>
24+ </li>
25+ <li class="flex items-center w-1/2 md:w-full">
26+ <i class="iconoir-database-settings mr-2 md:text-3xl"></i>
27+ <a href="#gordon-settings">Settings</a>
28+ </li>
29+ </ul>
30+ </div>
31+ </div>
32+</div>⏎̸
@@ -0,0 +1,32 @@
1+<div class="w-full md:w-1/5 flex flex-col space-evenly p-4 md:p-0">
2+ <div class="hidden md:flex justify-center p-4">
3+ <img src="/assets/imgs/gordon-mascot-hq-trsp.png" alt="logo" class="h-32" />
4+ </div>
5+ <div class="p-4 flex flex-col bg-gordonmascot-lblue rounded-lg shadow space-y-4">
6+ <div class="w-full flex justify-center">
7+ <h1 class="gordon-title text-4xl xl:text-5xl text-gordonmascot-hblue tracking-tighter">Gordon</h1>
8+ <span class="text-gordonmascot-mblue text-sm">{{ .BuildVersion }}</span>
9+ </div>
10+ <div class="w-full">
11+ <ul
12+ class="flex flex-wrap md:flex-col md:space-y-6 md:py-8 font-semibold text-gray-100 text-lg md:text-2xl md:pl-4 min-w-fit">
13+ <li class="flex items-center w-1/2 md:w-full">
14+ <i class="iconoir-dashboard-speed mr-2 md:text-3xl"></i>
15+ <a href="#">Dashboard</a>
16+ </li>
17+ <li class="flex items-center w-1/2 md:w-full">
18+ <i class="iconoir-server mr-2 md:text-3xl"></i>
19+ <a href="#manager">Manager</a>
20+ </li>
21+ <li class="flex items-center w-1/2 md:w-full">
22+ <i class="iconoir-community mr-2 md:text-3xl"></i>
23+ <a href="#users">Users</a>
24+ </li>
25+ <li class="flex items-center w-1/2 md:w-full">
26+ <i class="iconoir-database-settings mr-2 md:text-3xl"></i>
27+ <a href="#gordon-settings">Settings</a>
28+ </li>
29+ </ul>
30+ </div>
31+ </div>
32+</div>⏎̸

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close