aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets/picture.html
blob: 2cc69c1566208462d5c2dd37c4ad25051ffff9f0 (plain) (blame)
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
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;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://git.ctu.cx/ctucx/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:image" content="../medium/{{name}}.jpg" />

		<link type="text/css" rel="stylesheet" href="/style.css">
		<link rel="shortcut icon" href="favicon.ico">
	</head>
	<body>
		<header class="header header-view" style="display: flex;">
			<a class="button" href=".." id="button_close" title="Close Photo"><svg class="iconic"><use xlink:href="/iconic.svg#chevron-left"></use></svg></a>
			<a class="header-title">{{name}}<svg class="iconic "><use xlink:href="/iconic.svg#caret-bottom"></use></svg></a>

			<a class="button" href="/originals/{{orig}}" title="Download"><svg class="iconic"><use xlink:href="/iconic.svg#cloud-download"></use></svg></a>

			<a class="header-divider"></a>

			<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><span id="attr_title">{{name}}</span></td>
							</tr>
					 
							<tr>
								<td>Description</td>
								<td><span id="attr_description">{{description}}</span></td>
							</tr>
					 
						</tbody>
					</table>
				 
					<div class="sidebar-divider">
						<h1>Image</h1>
					</div>
			
					<table>
						<tbody>
							<tr>
								<td>Size</td>
								<td><span id="attr_size">{{size}}MB</span></td>
							</tr>
					 
							<tr>
								<td>Resolution</td>
								<td><span id="attr_resolution" id="resolution">-</span></td>
							</tr>
					 
						</tbody>
					</table>

					<div class="sidebar-divider">
						<h1>Camera</h1>
					</div>
				
					<table>
						<tbody>
							<tr>
								<td>Captured</td>
								<td><span id="attr_captured">-</span></td>
							</tr>

							<tr>
						 		<td>Make</td>
								<td><span id="attr_make">-</span></td>
							</tr>
					 
							<tr>
								<td>Type/Model</td>
								<td><span id="attr_type/model">-</span></td>
							</tr>

							<tr>
								<td>Shutter Speed</td>
								<td><span id="attr_shutter-speed">-</span></td>
							</tr>

							<tr>
								<td>Shutter Program</td>
								<td><span id="attr_shutter-program">-</span></td>
							</tr>
					 
							<tr>
								<td>Aperture</td>
								<td><span id="attr_aperture">-</span></td>
							</tr>
					 
							<tr>
								<td>Focal Length</td>
								<td><span id="attr_focal-length">-</span></td>
							</tr>
					 
					 		<tr>
								<td>ISO</td>
								<td><span id="attr_iso">-</span></td>
							</tr>

					 		<tr>
								<td>Flash</td>
								<td><span id="attr_flash">-</span></td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</header>

		<div id="imageview" class="fadeIn full" style="display: block;">
			<img id="image" class="" src="../medium/{{name}}.jpg">
			
			{{#hasPrev}}
			<div class="arrow_wrapper arrow_wrapper--previous">
				<a id="previous" href="../{{prev_name}}" style="background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(&quot;../thumbnails/{{prev_name}}.png&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}}" style="background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(&quot;../thumbnails/{{next_name}}.png&quot;);">
					<svg class="iconic "><use xlink:href="/iconic.svg#caret-right"></use></svg>
				</a>
			</div>
			{{/hasNext}}
		</div>
	</body>
	<script type="text/javascript" src="/exif.js"></script>
	<script type="text/javascript">
		window.onload=getExif;
		window.onkeyup = function(e) {
			if (e.keyCode == 27) window.location = "..";
			if (e.keyCode == 39) window.location = "../{{next_name}}";
			if (e.keyCode == 37) window.location = "../{{prev_name}}";
			if (e.keyCode == 32) document.getElementById("toggle").checked = true;
		}

		function getExif() {
			let image = document.getElementById("image");

			EXIF.getData(image, function() {
				document.getElementById("attr_resolution").innerHTML       = EXIF.getTag(this, "PixelXDimension") + 'x' + EXIF.getTag(this, "PixelYDimension");

				document.getElementById("attr_captured").innerHTML         = EXIF.getTag(this, "DateTimeOriginal");
				document.getElementById("attr_make").innerHTML             = EXIF.getTag(this, "Make");
				document.getElementById("attr_type/model").innerHTML       = EXIF.getTag(this, "Model");
				document.getElementById("attr_shutter-speed").innerHTML    = EXIF.getTag(this, "ExposureTime") + ' s';
				document.getElementById("attr_shutter-program").innerHTML  = EXIF.getTag(this, "ExposureProgram");
				document.getElementById("attr_aperture").innerHTML         = EXIF.getTag(this, "FNumber");
				document.getElementById("attr_focal-length").innerHTML     = EXIF.getTag(this, "FocalLength") + 'mm';
				document.getElementById("attr_iso").innerHTML              = EXIF.getTag(this, "ISOSpeedRatings");
				document.getElementById("attr_flash").innerHTML            = EXIF.getTag(this, "Flash");
    		});
		}
	</script>
</html>