-
-
Notifications
You must be signed in to change notification settings - Fork 170
Expand file tree
/
Copy pathshell.handlebars
More file actions
173 lines (167 loc) · 9.06 KB
/
shell.handlebars
File metadata and controls
173 lines (167 loc) · 9.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="{{language}}" style="font-size: {{default font_size 18}}px" {{#if class}}class="{{class}}"{{/if}}>
<head>
<meta charset="utf-8"/>
<title>{{default title "SQLPage"}}</title>
<link rel="icon" href="{{#if favicon}}{{favicon}}{{else}}{{static_path 'favicon.svg'}}{{/if}}">
{{#if manifest}}
<link rel="manifest" href="{{manifest}}">
{{/if}}
<link rel="stylesheet" href="{{static_path 'sqlpage.css'}}">
{{#each (to_array css)}}
{{#if this}}
<link rel="stylesheet" href="{{this}}">
{{/if}}
{{/each}}
{{#if font}}
{{#if (starts_with font "/")}}
<style>
@font-face {
font-family: 'LocalFont';
src: url('{{font}}') format('woff2');
font-weight: normal;
font-style: normal;
}
:root {
--tblr-font-sans-serif: 'LocalFont', Arial, sans-serif;
}
</style>
{{else}}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family={{font}}&display=fallback">
<style>:root { --tblr-font-sans-serif: '{{font}}', Arial, sans-serif;}</style>
{{/if}}
{{/if}}
<script src="{{static_path 'sqlpage.js'}}" defer></script>
{{#each (to_array javascript)}}
{{#if this}}
<script src="{{this}}" defer></script>
{{/if}}
{{/each}}
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="{{description}}"/>
{{#if norobot}}
<meta name="robots" content="noindex,nofollow">
{{/if}}
{{#if refresh}}
<meta http-equiv="refresh" content="{{refresh}}">
{{/if}}
{{#if rss}}
<link rel="alternate" type="application/rss+xml" title="{{title}}" href="{{rss}}">
{{/if}}
<meta name="generator" content="SQLPage"/>
{{#if social_image}}
<meta property="og:image" content="{{social_image}}"/>
{{/if}}
</head>
<body class="layout-{{default layout 'boxed'}}" {{#if theme}}data-bs-theme="{{theme}}"{{/if}}>
<div class="page">
{{#if title}}
<header id="sqlpage_header">
<nav class="navbar navbar-expand-md navbar-light{{#if fixed_top_menu}} fixed-top{{/if}}">
<div class="container-fluid">
<a class="navbar-brand flex-grow-1 overflow-hidden" href="{{#if link}}{{link}}{{else}}/{{/if}}">
{{#if image}}
<img src="{{image}}" alt="{{title}}" width="32" height="32"
class="navbar-brand-image">
{{/if}}
{{#if icon}}
{{~icon_img icon~}}
{{/if}}
<h1 class="mb-0 w-0 fs-2">{{title}}</h1>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbar-menu">
<ul class="navbar-nav ms-auto">
{{~#each (to_array menu_item)~}}
{{~#if (or (eq (typeof this) 'object') (and (eq (typeof this) 'string') (starts_with this '{')))}}
{{~#with (parse_json this)}}
{{#if (or (gt (len this.title) 0) (gt (len this.icon) 0) (gt (len this.image) 0))}}
<li class="nav-item{{#if this.submenu}} dropdown{{/if}}">
<a class="nav-link {{#if this.submenu}}dropdown-toggle{{/if}}" href="{{#if this.link}}{{this.link}}{{else}}#{{/if}}"
{{~#if this.submenu}} data-bs-toggle="dropdown" data-bs-auto-close="outside" {{/if~}}
role="button"
>
{{~#if this.image~}}
<span {{~#if this.title}} class="me-1"{{/if}}>
{{~#if (eq this.size 'sm')}}
<img width=16 height=16 src="{{this.image}}">
{{~else~}}
<img width=24 height=24 src="{{this.image}}">
{{~/if~}}
</span>
{{~/if~}}
{{#if this.icon}}
{{#if this.title}}<span class="me-1">{{/if}}
{{~icon_img this.icon~}}
{{#if this.title}}</span>{{/if}}
{{/if}}
{{~this.title~}}
</a>
{{~#if this.submenu~}}
<div class="dropdown-menu dropdown-menu-end{{#if this.class}} {{this.class}}{{/if}}" data-bs-popper="static">
{{~#each this.submenu~}}
{{#if (or (gt (len this.title) 0) (gt (len this.icon) 0) (gt (len this.image) 0))}}
<a class="dropdown-item{{#if ../this.class}} {{../this.class}}{{/if}}" href="{{this.link}}">
{{~#if this.image~}}
<span {{~#if this.title}} class="me-1"{{/if}}>
{{~#if (eq ../this.size 'sm')}}
<img width=16 height=16 src="{{this.image}}">
{{~else~}}
<img width=24 height=24 src="{{this.image}}">
{{~/if~}}
</span>
{{~/if~}}
{{#if this.icon}}
{{#if this.title}}<span class="me-1">{{/if}}
{{~icon_img this.icon~}}
{{#if this.title}}</span>{{/if}}
{{/if}}
{{~this.title~}}
</a>
{{~/if~}}
{{~/each~}}
</div>
{{/if}}
</li>
{{/if}}
{{/with}}
{{~else}}
{{~#if (gt (len this) 0)~}}
<li class="nav-item">
<a class="nav-link text-capitalize" href="{{this}}.sql">{{this}}</a>
</li>
{{~/if~}}
{{~/if~}}
{{~/each}}
</ul>
{{#if search_target}}
<form class="d-flex" role="search" action="{{search_target}}">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" name="search" value="{{search_value}}">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
{{/if}}
</div>
</div>
</nav>
</header>
{{/if}}
<main class="page-wrapper container-xl pt-3 px-md-5 px-sm-3 {{#if fixed_top_menu}} mt-5{{#unless (eq layout 'boxed')}} pt-5{{/unless}}{{/if}}" id="sqlpage_main_wrapper">
{{~#each_row~}}{{~/each_row~}}
</main>
</div>
<footer class="w-100 text-center fs-6 my-2 text-secondary" id="sqlpage_footer">
{{#if footer}}
{{{markdown footer}}}
{{else}}
<!-- You can change this footer using the 'footer' parameter of the 'shell' component -->
Built with <a class="text-reset" href="https://sql.ophir.dev" title="SQLPage v{{buildinfo 'CARGO_PKG_VERSION'}}">SQLPage</a>
{{/if}}
</footer>
</body>
</html>