summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-07 13:06:29 +0200
committerPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-07 13:06:29 +0200
commitd39d8c4c71a413003ed396607875fbe4c70a2f5f (patch)
treec6e4bddcc95cc5894850dda633a14b9fe4d902b3 /share
parentfc5a23185523e67d9d3b6dc08dc692898823d258 (diff)
can create sub albums
Diffstat (limited to 'share')
-rw-r--r--share/templates/default/footer.tmpl4
-rw-r--r--share/templates/default/header.tmpl31
-rw-r--r--share/templates/default/index.tmpl2
-rw-r--r--share/templates/default/preview.tmpl4
-rw-r--r--share/templates/default/view.tmpl6
-rw-r--r--share/templates/minimal/footer.tmpl4
-rw-r--r--share/templates/minimal/header-first-add.tmpl3
-rw-r--r--share/templates/minimal/header.tmpl22
-rw-r--r--share/templates/minimal/index.tmpl12
-rw-r--r--share/templates/minimal/next.tmpl4
-rw-r--r--share/templates/minimal/prev.tmpl3
-rw-r--r--share/templates/minimal/preview.tmpl3
-rw-r--r--share/templates/minimal/redirect.tmpl9
-rw-r--r--share/templates/minimal/view.tmpl3
14 files changed, 27 insertions, 83 deletions
diff --git a/share/templates/default/footer.tmpl b/share/templates/default/footer.tmpl
index 0de72ce..18e3512 100644
--- a/share/templates/default/footer.tmpl
+++ b/share/templates/default/footer.tmpl
@@ -5,12 +5,12 @@ END
if [ "${TARBALL_INCLUDE}" = 'yes' ]; then
cat <<END
-Download all photos in original size <a href='../${TARBALL_NAME}'>here</a><br /><br />
+Download all photos in original size <a href='${BACKHREF}/${TARBALL_NAME}'>here</a><br /><br />
END
fi
cat <<END
-Page generated at $(date) using Bash, ImageMagick and Git at $(uname); &lt;photoalbum@mx.buetow.org&gt;
+Page generated at $(date) using Bash and ImageMagick at $(uname); &lt;photoalbum@mx.buetow.org&gt;
</body>
</html>
END
diff --git a/share/templates/default/header.tmpl b/share/templates/default/header.tmpl
index b21a200..3c0a2e7 100644
--- a/share/templates/default/header.tmpl
+++ b/share/templates/default/header.tmpl
@@ -1,24 +1,27 @@
+if [ "$IS_SUB" = yes ]; then
+ TOP="<br /><a href='${BACKHREF}/index.html'>Go to top</a>"
+fi
cat <<END
<html>
<head>
<title>$TITLE</title>
<style type="text/css">
- body {
- background-color: #000000;
- color: #FFFFFF;
- font-family: verdana, sans-serif;
- }
- a {
- color: #FFFFFF;
- }
- hr {
- color: #FFFFFF;
- background-color: #FFFFFF;
- height: 1px;
- }
+ body {
+ background-color: #000000;
+ color: #FFFFFF;
+ font-family: verdana, sans-serif;
+ }
+ a {
+ color: #FFFFFF;
+ }
+ hr {
+ color: #FFFFFF;
+ background-color: #FFFFFF;
+ height: 1px;
+ }
</style>
</head>
<body>
-$TITLE
+$TITLE $TOP
<hr />
END
diff --git a/share/templates/default/index.tmpl b/share/templates/default/index.tmpl
index 2ec99d7..ecfb9f6 100644
--- a/share/templates/default/index.tmpl
+++ b/share/templates/default/index.tmpl
@@ -3,7 +3,7 @@ cat <<END
<head>
<title>$TITLE</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
-<meta http-equiv="refresh" content="0; URL=./html/page-1.html">
+<meta http-equiv="refresh" content="0; URL=./${html}/page-1.html">
</head>
<body>
Redirecting to Page 1
diff --git a/share/templates/default/preview.tmpl b/share/templates/default/preview.tmpl
index a5e4bdc..646fc5c 100644
--- a/share/templates/default/preview.tmpl
+++ b/share/templates/default/preview.tmpl
@@ -1,3 +1,5 @@
cat <<END
-<a name='$photo' href='../html/${num}-${i}.html'><img border='0' src='../thumbs/$photo' /></a>
+<a name='$photo' href='${BACKHREF}/${HTML_DIR}/${num}-${i}.html'>
+ <img border='0' src='${BACKHREF}/${THUMBS_DIR}/$photo' />
+</a>
END
diff --git a/share/templates/default/view.tmpl b/share/templates/default/view.tmpl
index abf577a..43930de 100644
--- a/share/templates/default/view.tmpl
+++ b/share/templates/default/view.tmpl
@@ -4,9 +4,11 @@ cat <<END
<a href="${num}-$((i+1)).html">&gt;&gt;&gt;</a>
<br />
<br />
-<a href="${num}-$((i+1)).html"><img border='0' src='../photos/$photo' /></a>
+<a href="${num}-$((i+1)).html">
+ <img border='0' src='${BACKHREF}/${PHOTOS_DIR}/$photo' />
+</a>
<br />
<br />
-<a href="../photos/$photo">Direct link</a>
+<a href="${BACKHREF}/${PHOTOS_DIR}/$photo">Direct link</a>
<h3>$photo</h3>
END
diff --git a/share/templates/minimal/footer.tmpl b/share/templates/minimal/footer.tmpl
deleted file mode 100644
index 6473552..0000000
--- a/share/templates/minimal/footer.tmpl
+++ /dev/null
@@ -1,4 +0,0 @@
-cat <<END
-</body>
-</html>
-END
diff --git a/share/templates/minimal/header-first-add.tmpl b/share/templates/minimal/header-first-add.tmpl
deleted file mode 100644
index f11a346..0000000
--- a/share/templates/minimal/header-first-add.tmpl
+++ /dev/null
@@ -1,3 +0,0 @@
-cat <<END
-<p align='left'>
-END
diff --git a/share/templates/minimal/header.tmpl b/share/templates/minimal/header.tmpl
deleted file mode 100644
index 8b20b53..0000000
--- a/share/templates/minimal/header.tmpl
+++ /dev/null
@@ -1,22 +0,0 @@
-cat <<END
-<html>
-<head>
-<title>$TITLE</title>
-<style type="text/css">
- body {
- background-color: #000000;
- color: #FFFFFF;
- font-family: verdana, sans-serif;
- }
- a {
- color: #FFFFFF;
- }
- hr {
- color: #FFFFFF;
- background-color: #FFFFFF;
- height: 1px;
- }
-</style>
-</head>
-<body>
-END
diff --git a/share/templates/minimal/index.tmpl b/share/templates/minimal/index.tmpl
deleted file mode 100644
index 2ec99d7..0000000
--- a/share/templates/minimal/index.tmpl
+++ /dev/null
@@ -1,12 +0,0 @@
-cat <<END
-<html>
-<head>
-<title>$TITLE</title>
-<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
-<meta http-equiv="refresh" content="0; URL=./html/page-1.html">
-</head>
-<body>
-Redirecting to Page 1
-</body>
-</html>
-END
diff --git a/share/templates/minimal/next.tmpl b/share/templates/minimal/next.tmpl
deleted file mode 100644
index a7f7c76..0000000
--- a/share/templates/minimal/next.tmpl
+++ /dev/null
@@ -1,4 +0,0 @@
-cat <<END
-<br />
-<a href='${next}.html'>Next $MAXPREVIEWS pictures</a>
-END
diff --git a/share/templates/minimal/prev.tmpl b/share/templates/minimal/prev.tmpl
deleted file mode 100644
index 64d15d8..0000000
--- a/share/templates/minimal/prev.tmpl
+++ /dev/null
@@ -1,3 +0,0 @@
-cat <<END
-<a href='${prev}.html'>Previous $MAXPREVIEWS pictures</a>
-END
diff --git a/share/templates/minimal/preview.tmpl b/share/templates/minimal/preview.tmpl
deleted file mode 100644
index a5e4bdc..0000000
--- a/share/templates/minimal/preview.tmpl
+++ /dev/null
@@ -1,3 +0,0 @@
-cat <<END
-<a name='$photo' href='../html/${num}-${i}.html'><img border='0' src='../thumbs/$photo' /></a>
-END
diff --git a/share/templates/minimal/redirect.tmpl b/share/templates/minimal/redirect.tmpl
deleted file mode 100644
index 8edfe1c..0000000
--- a/share/templates/minimal/redirect.tmpl
+++ /dev/null
@@ -1,9 +0,0 @@
-cat <<END
-<html>
-<head>
-<meta http-equiv='refresh' content='0; url=${redirectpage}.html'>
-</head>
-<body>
-</body>
-</html>
-END
diff --git a/share/templates/minimal/view.tmpl b/share/templates/minimal/view.tmpl
deleted file mode 100644
index c93a82b..0000000
--- a/share/templates/minimal/view.tmpl
+++ /dev/null
@@ -1,3 +0,0 @@
-cat <<END
-<a href="${num}-$((i+1)).html"><img border='0' src='../photos/$photo' /></a>
-END