ctucx.git: gallery

static-site-generator for image-galleries [used @ photos.ctu.cx]

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 
174 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
<!DOCTYPE HTML>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>{{name}} | {{siteName}}</title>

		<meta name="description" content="{{siteDescription}}">
		<meta name="keywords" content="{{siteTags}}">
		<meta name="author" content="{{siteAuthor}}">

        <meta name="generator" content="https://cgit.ctu.cx/gallery">
		<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">

		<meta property="og:title" content="{{name}}" />
		<meta property="og:description" content="Image {{name}}{{#takestamp}} taken on {{takestamp}}{{/takestamp}}" />
		<meta property="og:image" content="medium/{{filename}}" />
		<meta property="og:image:type" content="image/jpeg" />
		<meta property="og:image:width" content="{{thumbWidth}}" />
		<meta property="og:image:height" content="{{thumbHeight}}" />
		{{#description}}
		<meta property="og:image:alt" content="{{description}}" />
		{{/description}}

		<meta name="twitter:card" content="summary">
		<meta property="twitter:title" content="{{name}}" />
		<meta property="twitter:description" content="Image {{name}}{{#takestamp}} taken on {{takestamp}}{{/takestamp}}" />
		<meta property="twitter:image" content="medium/{{filename}}" />
		<meta property="twitter:creator" content="{{siteAuthor}}" />

		<link type="text/css" rel="stylesheet" href="/style.css">
		<link rel="shortcut icon" href="favicon.ico">

		{{#hasNext}}
		<link rel="prefetch" href="thumbnails/medium/{{next_filename}}" as="image">
		{{/hasNext}}
		{{#hasPrev}}
		<link rel="prefetch" href="thumbnails/medium/{{prev_filename}}" as="image">
		{{/hasPrev}}
	</head>
	<body>
		<header class="transparent">
			<div class="flex">
				<a class="button" href="./" title="Close Photo"><svg class="iconic"><use xlink:href="/iconic.svg#chevron-left"></use></svg></a>

				<a class="title">{{name}}</a>

				{{#showOriginalsButton}}
				<a class="button" href="{{orig}}" title="Download"><svg class="iconic"><use xlink:href="/iconic.svg#cloud-download"></use></svg></a>
				{{/showOriginalsButton}}
	
				<input type="checkbox" id="toggle">
				<label for="toggle" style="display: block;" class="button button-info" title="Info">
					<svg class="iconic"><use xlink:href="/iconic.svg#info"></use></svg>
				</label>

				<div class="sidebar">
					<div class="sidebar-header">
						<h1>About</h1>
					</div>

					<div class="sidebar-wrapper">
						<div class="sidebar-divider">
							<h1>Basics</h1>
						</div>

						<table>
							<tbody>
								<tr>
									<td>Title</td>
									<td>{{name}}</td>
								</tr>
						 
								<tr>
									<td>Description</td>
									<td>{{description}}</td>
								</tr>
						 
							</tbody>
						</table>
					 
						<div class="sidebar-divider">
							<h1>Image</h1>
						</div>
				
						<table>
							<tbody>
								<tr>
									<td>Size</td>
									<td>{{filesize}} MiB</td>
								</tr>
						 
								<tr>
									<td>Resolution</td>
									<td>{{width}} x {{height}}</td>
								</tr>
						 
							</tbody>
						</table>

						<div class="sidebar-divider">
							<h1>Camera</h1>
						</div>
					
						<table>
							<tbody>
								<tr>
									<td>Captured</td>
									<td>{{takestamp}}</td>
								</tr>

								<tr>
							 		<td>Make</td>
									<td>{{make}}</td>
								</tr>
						 
								<tr>
									<td>Type/Model</td>
									<td>{{model}}</td>
								</tr>

								<tr>
									<td>Lens Model</td>
									<td>{{lensModel}}</td>
								</tr>

								<tr>
									<td>Shutter Speed</td>
									<td>{{shutterSpeed}}</td>
								</tr>

								<tr>
									<td>Shutter Program</td>
									<td>{{shutterProgram}}</td>
								</tr>
						 
								<tr>
									<td>Aperture</td>
									<td>{{aperture}}</td>
								</tr>
						 
								<tr>
									<td>Focal Length</td>
									<td>{{focalLength}}{{#focalLength35mm}} (<i>f</i><sub>35</sub> = {{focalLength35mm}}){{/focalLength35mm}}</td>
								</tr>
						 
						 		<tr>
									<td>ISO</td>
									<td>{{iso}}</td>
								</tr>

						 		<tr>
									<td>Flash</td>
									<td>{{flash}}</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</header>

		<div id="imageview" class="fadeIn full" style="display: block;">
			<img id="image" class="" src="thumbnails/medium/{{filename}}">
			
			{{#hasPrev}}
			<div class="arrow_wrapper arrow_wrapper--previous">
				<a id="previous" href="{{prev_name}}.html" style="background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(&quot;thumbnails/small/{{prev_name}}.jpg&quot;);">
					<svg class="iconic "><use xlink:href="/iconic.svg#caret-left"></use></svg>
				</a>
			</div>
			{{/hasPrev}}

			{{#hasNext}}
			<div class="arrow_wrapper arrow_wrapper--next">
				<a id="next" href="{{next_name}}.html" style="background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(&quot;thumbnails/small/{{next_name}}.jpg&quot;);">
					<svg class="iconic "><use xlink:href="/iconic.svg#caret-right"></use></svg>
				</a>
			</div>
			{{/hasNext}}
		</div>
		{{#enableJS}}
		<script type="text/javascript">
			document.addEventListener('keyup', (event) => {
				if (event.ctrlKey === true || event.altKey === true) return;
				switch (event.key) {
					case "Escape":
						window.location = "./";
						break;

					case "ArrowLeft":
						document.getElementById("previous").click();
						break;

					case "ArrowRight":
						document.getElementById("next").click();
						break;

					case " ":
						const element = document.getElementById("toggle");
						element.checked = !element.checked;
						break;
				};
			});
		</script>
		{{/enableJS}}
	</body>
</html>