summaryrefslogtreecommitdiff
path: root/templates/default.xml
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2014-09-15 23:45:14 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2014-09-15 23:45:14 +0200
commitd8708c220afc84549e5e4feaa09f32aa46aba4b5 (patch)
tree5c5f3a2aca7de56737a739e667c5f428321d3c34 /templates/default.xml
parent2ab38412b14f38202b364558031ddb7db357f1ec (diff)
downloadcataract-d8708c220afc84549e5e4feaa09f32aa46aba4b5.tar.xz
theming: Allow themes to use different thumbnail image sizes
This change makes thumbnail image sizes more flexible by explicitly stating the particular image size is a thumbnail. And each thumbnail image size can have different squared settings. On the theme side it's now mandatory to specify which thumbnail size to use (if applicable). This allows us to have different thumbnail styles for index and album pages. This commit also removes the <squared_thumbnails> tag from setup.xml file but retains fallback for ver. 1 setup.xml files.
Diffstat (limited to 'templates/default.xml')
-rw-r--r--templates/default.xml9
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/default.xml b/templates/default.xml
index 318531c..9197519 100644
--- a/templates/default.xml
+++ b/templates/default.xml
@@ -45,7 +45,10 @@
<!-- Thumbnail section is mandatory. -->
<!-- Corresponds with optional <item thumbnail> tag in album source file.
Note that thumbnail images are always resized even for custom supplied files. -->
- <size name="thumbnail">
+ <!-- The "type" attribute has to be set to "thumbnail" to be treated as such.
+ An optional "style" attribute set to "squared" indicates the need of squared
+ thumbnails as opposed to original aspect ratio. -->
+ <size name="thumbnail" type="thumbnail" style="normal">
<landscape w="180" h="120" />
<portrait w="120" h="180" />
<square size="180" />
@@ -74,6 +77,8 @@
<index>
<template>template_index.html</template>
<target_filename>index.html</target_filename>
+ <!-- specify thumbnail image size to be used here. -->
+ <thumbnail_size>thumbnail</thumbnail_size>
</index>
<!-- This is mandatory. -->
@@ -82,6 +87,8 @@
<target_filename>index.html</target_filename>
<!-- which picture size to use for XXX tags (TODO) -->
<picture_size>preview</picture_size>
+ <!-- thumbnail_size is optional when thumbnails are not used on album pages -->
+ <thumbnail_size>thumbnail</thumbnail_size>
<!-- In case of a protected album, show special thumbnail (must be included
in supplemental_files). Comment out to use real thumbnail -->
<protected_thumbnail>emblems-readonly_120.png</protected_thumbnail>