janky solution to cache images

This commit is contained in:
leah 2022-03-24 15:59:28 +00:00
parent 008e0cc5af
commit e8084a1771
3 changed files with 11 additions and 1 deletions

10
scripts/shoot.fish Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/fish
# tip! use a systemd timer or cronjob on this one
for user in /home/*/public_html
set user (string replace "/home/" "" $user)
set user (string replace "/public_html" "" $user)
echo shooting $user
SITE_DIR=. wget "https://screens.southlondon.cc/https%3A%2F%2Fsouthlondon.cc%2F~$user%2F" -O $SITE_DIR/static/shots/$user.png
end

BIN
static/shots/leah.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -5,7 +5,7 @@
{% for u in user_data.all -%}
<a href="/~{{ u }}/">
<li><span class="text">~{{ u }}</span></li>
<img loading="lazy" src="https://screens.southlondon.cc/https%3A%2F%2Fsouthlondon.cc%2F~{{ u }}%2F">
<img loading="lazy" src="/shots/{{u}}.png">
</a>
{%- endfor %}