summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2015-02-01 16:23:30 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2015-02-01 16:23:30 +0100
commitb2d0c4ea27c3885d69c9067b579a075a65ff3834 (patch)
tree0d2ac06f9c32babe69a5b88e8c8604e2f5b4ba91 /templates
parent97919e37642b851af85c37f751284fd62bd74019 (diff)
downloadcataract-b2d0c4ea27c3885d69c9067b579a075a65ff3834.tar.xz
theming: Introduce image size fallback mode
This changes image size handling a little bit. An optional <fallback size="xxx" /> tag tells the generator to use different image size when an image for the current image size has not been supplied from the album XML file. This is effectively used for the legacy <nofullsize> tag fallback. More generally this is useful for templates showing additional image sizes. Also saves space as images not having the custom size supplied are not generated from the source image.
Diffstat (limited to 'templates')
-rw-r--r--templates/default.xml13
1 files changed, 10 insertions, 3 deletions
diff --git a/templates/default.xml b/templates/default.xml
index 2ac8354..8cf709e 100644
--- a/templates/default.xml
+++ b/templates/default.xml
@@ -9,9 +9,7 @@
"tagname" to override that. -->
<!-- "original", "preview" and "thumbnail" sizes are somewhat special here
- in order to keep compatibility with previous versions. In case when
- "original" size is not available due to <nofullsize> tag present,
- the "preview" size will be used instead. -->
+ in order to keep compatibility with previous versions. -->
<!-- Meaning of "original" is shifted here from previous versions;
it's considered more like a bigger preview size for large screens now.
@@ -27,6 +25,15 @@
image file will be copied as is (this is a default for backwards
compatibility). -->
<no_resize />
+ <!-- Normally an image is resized to the given dimensions from the original
+ image when an image is not supplied from the album XML file for the
+ particular image size. This tag tells the generator to use the fallback
+ image size instead when an image has not been supplied. Can be freely
+ combined with the <no_resize /> tags, in that case it only applies
+ to supplied images. -->
+ <!-- In case when the "original" size is not available due to the legacy
+ <nofullsize> tag present, the "preview" size will be used instead. -->
+ <fallback size="preview" />
</size>
<!-- The "preview" size is considered default and should be displayed