Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@waifu how about something like
#!/bin/bash
html=$(cat template.html)
img_tags=""
for image in images/*; do
if [ -f "$image" ]; then
basename=$(basename "$image")
img_tags+="<img src=\"$image\" alt=\"$basename\">"
fi
done
echo "$html" | sed "s#{{{GALLERY}}}#$img_tags#" > output.html
where your template.html is
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pleroma-tan Art</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Pleroma-tan Art</h1>
</header>
<main>
<div class="gallery">
{{{GALLERY}}}
</div>
</main>
<footer>
<p></p>
</footer>
</body>
</html>