summaryrefslogtreecommitdiff
path: root/share/templates/default
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-04 10:38:52 +0300
committerPaul Buetow <paul@buetow.org>2026-06-04 10:38:52 +0300
commit89946d35517fb0f530b343956cdb42089ae07dcc (patch)
tree29a64fbaf676d4b36eb9992f35fb7030a023ed05 /share/templates/default
parent841af2b63b7f38b9d4d172412150a0381e8761b4 (diff)
Reduce template render coupling (vi0)
Diffstat (limited to 'share/templates/default')
-rw-r--r--share/templates/default/footer.tmpl4
-rw-r--r--share/templates/default/header.tmpl14
-rw-r--r--share/templates/default/next.tmpl4
-rw-r--r--share/templates/default/prev.tmpl4
-rw-r--r--share/templates/default/preview.tmpl4
-rw-r--r--share/templates/default/redirect.tmpl2
-rw-r--r--share/templates/default/view.tmpl16
7 files changed, 24 insertions, 24 deletions
diff --git a/share/templates/default/footer.tmpl b/share/templates/default/footer.tmpl
index 6eb4ed5..c9906a5 100644
--- a/share/templates/default/footer.tmpl
+++ b/share/templates/default/footer.tmpl
@@ -1,7 +1,7 @@
-if [ "${TARBALL_INCLUDE}" = 'yes' ]; then
+if [ "${render_tarball_include}" = 'yes' ]; then
cat <<END
<div class="footer">
- Download all photos in original size <a href='${backhref_html}/${tarball_name_html}'>here</a><br /><br />
+ Download all photos in original size <a href='${render_backhref_html}/${render_tarball_name_html}'>here</a><br /><br />
</div>
END
fi
diff --git a/share/templates/default/header.tmpl b/share/templates/default/header.tmpl
index fb1009f..adbe3b1 100644
--- a/share/templates/default/header.tmpl
+++ b/share/templates/default/header.tmpl
@@ -1,12 +1,12 @@
cat <<END
<html>
<head>
- <title>${title_html}</title>
+ <title>${render_title_html}</title>
<style type="text/css">
body {
background-color: #000000;
color: #ffffff;
- background-image: url("${backhref_css}/${blurs_dir_css}/${background_image_css}");
+ background-image: url("${render_backhref_css}/${render_blurs_dir_css}/${render_background_image_css}");
background-size: cover;
background-repeat: no-repeat;
text-align: center;
@@ -43,8 +43,8 @@ cat <<END
}
img.thumb {
- height: ${thumbheight_html}px;
- width: ${thumbheight_html}px;
+ height: ${render_thumbheight_html}px;
+ width: ${render_thumbheight_html}px;
object-fit: cover;
}
@@ -57,7 +57,7 @@ cat <<END
}
img.view {
- max-height: ${height_html}px;
+ max-height: ${render_height_html}px;
width: 95%;
height: 80%;
object-fit: contain;
@@ -129,10 +129,10 @@ cat <<END
<body>
END
-if [ "${show_header_bar}" = 'yes' ]; then
+if [ "${render_show_header_bar}" = 'yes' ]; then
cat <<END
<div class="header animate-opacity">
- Site generated at $(date) with <a href="https://codeberg.org/snonux/photoalbum">codeberg.org/snonux/photoalbum</a>
+ Site generated at ${render_current_date_text} with <a href="https://codeberg.org/snonux/photoalbum">codeberg.org/snonux/photoalbum</a>
-
&copy; by Paul Buetow
</div>
diff --git a/share/templates/default/next.tmpl b/share/templates/default/next.tmpl
index e588b5b..c5aa5c9 100644
--- a/share/templates/default/next.tmpl
+++ b/share/templates/default/next.tmpl
@@ -1,6 +1,6 @@
cat <<END
<div class="navigator">
- <a href='${next_html}.html'>Next ${maxpreviews_html} pictures</a>
- <a href="${prev_html}.html" class="arrow">&rArr;</a>
+ <a href='${render_next_html}.html'>Next ${render_maxpreviews_html} pictures</a>
+ <a href="${render_prev_html}.html" class="arrow">&rArr;</a>
</div>
END
diff --git a/share/templates/default/prev.tmpl b/share/templates/default/prev.tmpl
index c5f5922..e54850c 100644
--- a/share/templates/default/prev.tmpl
+++ b/share/templates/default/prev.tmpl
@@ -1,6 +1,6 @@
cat <<END
<div class="navigator">
- <a href="${prev_html}.html" class="arrow">&lArr;</a>
- <a href='${prev_html}.html'>Previous ${maxpreviews_html} pictures</a>
+ <a href="${render_prev_html}.html" class="arrow">&lArr;</a>
+ <a href='${render_prev_html}.html'>Previous ${render_maxpreviews_html} pictures</a>
</div>
END
diff --git a/share/templates/default/preview.tmpl b/share/templates/default/preview.tmpl
index e0eb945..93df112 100644
--- a/share/templates/default/preview.tmpl
+++ b/share/templates/default/preview.tmpl
@@ -1,5 +1,5 @@
cat <<END
-<a name='${photo_html}' href='${backhref_html}/${html_dir_html}/${num}-${i}.html'>
- <img class='thumb ${animation_class_html}' src='${backhref_html}/${thumbs_dir_html}/${photo_html}' />
+<a name='${render_photo_html}' href='${render_backhref_html}/${render_html_dir_html}/${render_page_num_html}-${render_preview_num_html}.html'>
+ <img class='thumb ${render_animation_class_html}' src='${render_backhref_html}/${render_thumbs_dir_html}/${render_photo_html}' />
</a>
END
diff --git a/share/templates/default/redirect.tmpl b/share/templates/default/redirect.tmpl
index d863830..866aa38 100644
--- a/share/templates/default/redirect.tmpl
+++ b/share/templates/default/redirect.tmpl
@@ -1,7 +1,7 @@
cat <<END
<html>
<head>
- <meta http-equiv='refresh' content='0; url=${redirect_page_html}.html'>
+ <meta http-equiv='refresh' content='0; url=${render_redirect_page_html}.html'>
</head>
<body>
</body>
diff --git a/share/templates/default/view.tmpl b/share/templates/default/view.tmpl
index 2ffb4c7..02a4c07 100644
--- a/share/templates/default/view.tmpl
+++ b/share/templates/default/view.tmpl
@@ -1,21 +1,21 @@
cat <<END
<div class='view'>
- <a href="${num}-$((i+1)).html">
- <img class='view ${animation_class_html}' border='0' src='${backhref_html}/${photos_dir_html}/${photo_html}' />
+ <a href="${render_page_num_html}-${render_view_next_html}.html">
+ <img class='view ${render_animation_class_html}' border='0' src='${render_backhref_html}/${render_photos_dir_html}/${render_photo_html}' />
</a>
<div class="navigator">
- <a href="${num}-$((i-1)).html" class="arrow">&lArr;</a>
- <a href="page-${num}.html#${photo_html}">Thumbnails</a> |
- <a href ='${backhref_html}/${photos_dir_html}/${photo_html}'>Direct link</a>
- <a href="${num}-$((i+1)).html" class="arrow">&rArr;</a>
+ <a href="${render_page_num_html}-${render_view_prev_html}.html" class="arrow">&lArr;</a>
+ <a href="page-${render_page_num_html}.html#${render_photo_html}">Thumbnails</a> |
+ <a href ='${render_backhref_html}/${render_photos_dir_html}/${render_photo_html}'>Direct link</a>
+ <a href="${render_page_num_html}-${render_view_next_html}.html" class="arrow">&rArr;</a>
</div>
</div>
END
-if [ "${ORIGINAL_BASEPATH}x" != x ]; then
+if [ "${render_original_basepath_is_set}" = 'yes' ]; then
cat <<END
<p>
- <a href="${original_basepath_html}/${photo_html}">Original</a>
+ <a href="${render_original_basepath_html}/${render_photo_html}">Original</a>
</p>
END
fi