photos.escobar.life

Unnamed repository; edit this file 'description' to name the repository.

commit f2c24b03edf505ef42e74f45515c277343a78e3f
Author: Pablo Emilio Escobar Gaviria <pablo-escobar@riseup.net>
Date:   Tue,  1 Dec 2020 16:20:44 -0300

Initial commit

Diffstat:
AMakefile | 12++++++++++++
AREADME.adoc | 5+++++
Aphotos/1.png | 0
Aphotos/10.jpg | 0
Aphotos/11.jpg | 0
Aphotos/12.jpg | 0
Aphotos/2.jpg | 0
Aphotos/3.jpg | 0
Aphotos/4.jpg | 0
Aphotos/5.jpg | 0
Aphotos/6.jpg | 0
Aphotos/7.jpg | 0
Aphotos/8.jpg | 0
Aphotos/9.png | 0
Atheme/SHARED_default.css | 48++++++++++++++++++++++++++++++++++++++++++++++++
Atheme/browse.thtml | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atheme/dirindex.thtml | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atheme/image.thtml | 18++++++++++++++++++
Atheme/thumb.thtml | 10++++++++++
Atheme/thumb_fixed.thtml | 10++++++++++
Atheme/video.thtml | 7+++++++
21 files changed, 227 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -0,0 +1,12 @@
+.PHONY: install runserver compress-images build
+
+build:
+	lazygal photos/ \
+					-o _site/\
+					-t "$$(pwd)/theme" \
+					-T 150x150 \
+					-s default=800x800 \
+					--pic-sort-by=numeric
+
+deploy: build
+	rsync -rtv _site/ root@pablo.escobar.life:/var/www/photos
diff --git a/README.adoc b/README.adoc
@@ -0,0 +1,5 @@
+= photos.escobar.life
+
+This is the repository for the code used in generationg the
+https://photos.escobar.life website.
+
diff --git a/photos/1.png b/photos/1.png
Binary files differ.
diff --git a/photos/10.jpg b/photos/10.jpg
Binary files differ.
diff --git a/photos/11.jpg b/photos/11.jpg
Binary files differ.
diff --git a/photos/12.jpg b/photos/12.jpg
Binary files differ.
diff --git a/photos/2.jpg b/photos/2.jpg
Binary files differ.
diff --git a/photos/3.jpg b/photos/3.jpg
Binary files differ.
diff --git a/photos/4.jpg b/photos/4.jpg
Binary files differ.
diff --git a/photos/5.jpg b/photos/5.jpg
Binary files differ.
diff --git a/photos/6.jpg b/photos/6.jpg
Binary files differ.
diff --git a/photos/7.jpg b/photos/7.jpg
Binary files differ.
diff --git a/photos/8.jpg b/photos/8.jpg
Binary files differ.
diff --git a/photos/9.png b/photos/9.png
Binary files differ.
diff --git a/theme/SHARED_default.css b/theme/SHARED_default.css
@@ -0,0 +1,48 @@
+@import url('https://pablo.escobar.life/css/styles.css');
+
+#prev_link, #next_link {
+    display: none;
+    position: absolute;
+    top: 50%;
+}
+
+@media (min-width: 800px) {
+  #prev_link, #next_link {
+    display: block;
+  }
+}
+
+#prev_link {
+    left: 0;
+}
+
+#next_link {
+    right: 0;
+}
+
+#prev_link img, #next_link img {
+    margin: 1em;
+}
+
+#image img {
+  max-height: 80vh;
+  width: 100%;
+  object-fit: contain;
+}
+
+#gallery {
+  margin: 1em 0;
+  display: grid;
+  grid-template-columns: repeat(auto-fit, 100px);
+  justify-content: center;
+  gap: 1em;
+}
+
+#gallery figure {
+  margin: 0;
+}
+
+#gallery figure img {
+  object-fit: cover;
+}
+
diff --git a/theme/browse.thtml b/theme/browse.thtml
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
+    xmlns:py="http://genshi.edgewall.org/"
+    xmlns:xi="http://www.w3.org/2001/XInclude">
+<head>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+  <title>Photos</title>
+  <meta name="author" content="Pablo Emilio Escobar Gaviria"/>
+  <meta name="copyright" content="GPLv2"/>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <link py:for="style in styles" type="text/css"
+        rel="$style.rel" media="screen,projection" title="$style.name"
+        href="${rel_root}shared/${style.filename}.css" />
+  <link py:if="feed_url" 
+        rel="alternate" 
+        type="application/rss+xml" 
+        title="Recent galleries" 
+        href="$feed_url" />
+  <link rel="icon" 
+        type="image/svg+xml" 
+        sizes="16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512"
+        href="https://pablo.escobar.life/images/icons/favicon.svg" />
+
+  <meta property="twitter:url" content="https:/photos.escobar.life" />
+  <meta property="twitter:title" content="Photos" />
+  <meta property="twitter:description" content="Some of the photos I took." />
+  <meta property="twitter:image" content="index.png" />
+  <meta property="twitter:card" content="summary_large_image" />
+  
+  <meta property="og:title" content="Photos"/>
+  <meta property="og:image" content="index.png"/>
+  <meta property="og:image:type" content="image/png"/>
+  <meta property="og:url" content="http://localhost:4000/"/>
+  <meta property="og:description" content="Some of the photos I took."/>
+  <meta property="og:locale" content="en_US"/>
+  <meta property="og:type" content="website"/>
+</head>
+
+<body>
+  <nav role="navigation">
+    <a href="https://photos.escobar.life">photos 📸️</a>
+    <a href="https://pablo.escobar.life">@pablo 🚬️</a>
+  </nav>
+
+  <main>
+    <xi:include href="${mediatype}.thtml" />
+    
+    <div py:if="prev_link" id="prev_link">
+      <xi:include href="thumb.thtml" py:with="media=prev_link" />
+    </div>
+    
+    <div py:if="next_link" id="next_link">
+      <xi:include href="thumb.thtml" py:with="media=next_link" />
+    </div>
+  </main>
+
+  <footer>Pablo Emilio Escobar Gaviria © 2020</footer>
+</body>
+</html>
diff --git a/theme/dirindex.thtml b/theme/dirindex.thtml
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
+      xmlns:py="http://genshi.edgewall.org/"
+      xmlns:xi="http://www.w3.org/2001/XInclude">
+<head>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+  <title>Photos</title>
+  <meta name="author" content="Pablo Emilio Escobar Gaviria"/>
+  <meta name="copyright" content="GPLv2"/>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <link py:for="style in styles" type="text/css"
+        rel="$style.rel" media="screen,projection" title="$style.name"
+        href="${rel_root}shared/${style.filename}.css" />
+  <link py:if="feed_url" 
+        rel="alternate" 
+        type="application/rss+xml" 
+        title="Recent galleries" 
+        href="$feed_url" />
+  <link rel="icon" 
+        type="image/svg+xml" 
+        sizes="16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512"
+        href="https://pablo.escobar.life/images/icons/favicon.svg" />
+
+  <meta property="twitter:url" content="https:/photos.escobar.life" />
+  <meta property="twitter:title" content="Photos" />
+  <meta property="twitter:description" content="Some of the photos I took." />
+  <meta property="twitter:image" content="index.png" />
+  <meta property="twitter:card" content="summary_large_image" />
+  
+  <meta property="og:title" content="Photos"/>
+  <meta property="og:image" content="index.png"/>
+  <meta property="og:image:type" content="image/png"/>
+  <meta property="og:url" content="http://localhost:4000/"/>
+  <meta property="og:description" content="Some of the photos I took."/>
+  <meta property="og:locale" content="en_US"/>
+  <meta property="og:type" content="website"/>
+</head>
+<body>
+  <nav role="navigation">
+    <a href="https://photos.escobar.life">photos 📸️</a>
+    <a href="https://pablo.escobar.life">@pablo 🚬️</a>
+  </nav>
+
+  <main>
+    <h1>Photos</h1>
+
+    <section id="preamble">
+      <p>Some of the photos I took.</p>
+    </section>
+
+    <div py:for="subdir, medias in medias" py:if="medias" id="gallery">
+      <xi:include href="thumb_fixed.thtml" py:for="media in medias" />
+    </div>
+  </main>
+
+  <footer>Pablo Emilio Escobar Gaviria © 2020</footer>
+</body>
+</html>
diff --git a/theme/image.thtml b/theme/image.thtml
@@ -0,0 +1,18 @@
+<div xmlns:py="http://genshi.edgewall.org/" id="image">
+    <figure>
+        <img src="$img_src" alt="$image_name"/>
+    </figure>
+    <em py:if="comment">$comment</em>
+    <dl>
+        <dt py:if="exposure">Exposure</dt>
+        <dd py:if="exposure">$exposure</dd>
+        <dt py:if="iso">ISO</dt>
+        <dd py:if="iso">$iso</dd>
+        <dt py:if="fnumber">Aperture</dt>
+        <dd py:if="fnumber">$fnumber</dd>
+        <dt py:if="flash">Flash</dt>
+        <dd py:if="flash">$flash</dd>
+        <dt py:if="focal_length">Focal length</dt>
+        <dd py:if="focal_length">$focal_length</dd>
+    </dl>
+</div>
diff --git a/theme/thumb.thtml b/theme/thumb.thtml
@@ -0,0 +1,10 @@
+<figure xmlns:py="http://genshi.edgewall.org/">
+    <a href="$media.link">
+      <img src="$media.thumb"
+           width="$media.thumb_width"
+           height="$media.thumb_height"
+           alt="$media.thumb_name thumb"/>
+    </a>
+    <a py:if="media.type == 'video'"
+       href="$media.link"><img class="video_arrow" src="${rel_root}shared/video_arrow.svg" alt="video arrow overlay"/><span class="video_length" py:content="media.length" /></a>
+</figure>
diff --git a/theme/thumb_fixed.thtml b/theme/thumb_fixed.thtml
@@ -0,0 +1,10 @@
+<figure xmlns:py="http://genshi.edgewall.org/">
+    <a href="$media.link">
+      <img src="$media.thumb"
+           width="100"
+           height="100"
+           alt="$media.thumb_name thumb"/>
+    </a>
+    <a py:if="media.type == 'video'"
+       href="$media.link"><img class="video_arrow" src="${rel_root}shared/video_arrow.svg" alt="video arrow overlay"/><span class="video_length" py:content="media.length" /></a>
+</figure>
diff --git a/theme/video.thtml b/theme/video.thtml
@@ -0,0 +1,7 @@
+<div xmlns:py="http://genshi.edgewall.org/" id="video">
+  <figure>
+    <video src="$video_src" controls>
+        Your browser does not support the video tag
+    </video>
+  </figure>
+</div>