~chambln/cosine.blue

f16497ebf95e4aa5baee9a1eeeefdeba27966cc5 — Gregory Chamberlain a month ago 8de1641
Show cover photos in recent posts on index.html
1 files changed, 16 insertions(+), 6 deletions(-)

M src/index.html.sh
M src/index.html.sh => src/index.html.sh +16 -6
@@ 21,6 21,12 @@

. share/lib.sh

x h2 Resources

cmark <<EOF
- [Recommended Hardware And Software](/recommended.html)
EOF

x h2 Recently

find src/article -type f | sort -r | head -n3 | while IFS= read -r item


@@ 38,13 44,17 @@ do
        . env/"$basename".sh
        x "a href=\"$href\"" "$title" | x h2
        [ "$description" ] && x p "$description"

        if [ -n "${cover_img_src-}" ]; then
            {
                # shellcheck disable=SC2154
                alt=${cover_img_alt:+ alt=\"Cover image: $cover_img_alt\"}
                x "img src=\"$cover_img_src\"$alt"
                [ -n "${cover_img_caption-}" ] &&
                    x figcaption "$cover_img_caption" | x small
            } | x figure
        fi
    ) | x li
done | x 'ol id="recently" reversed'

x 'a href="/archive.html"' 'More posts →' | x 'p id="archive"'

x h2 Resources

cmark <<EOF
- [Recommended Hardware And Software](/recommended.html)
EOF