all repos — site @ e036d8b92db7417ed55119a6962943bc1f64015a

source for my site, found at icyphox.sh

bin/photos.sh (view raw)

 1#!/usr/bin/env bash
 2#
 3# usage: printf "<bunch of photos>" | ./bin/photos.sh | pages/photos.md
 4
 5prefix="$1"
 6printf '<div class="image-grid">\n'
 7while IFS=$'\n' read -r line; do
 8    printf '  <a href="https://cdn.icyphox.sh/film/%s">\n' "$prefix/$line"
 9    printf '    <img src="https://cdn.icyphox.sh/fit?file=%s&width=1000&height=1000" />\n' "$prefix/$line"
10    printf '  </a>\n'
11done < /dev/stdin
12printf '</div>'