summaryrefslogtreecommitdiff
path: root/templates/default.xml
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2011-05-29 19:00:44 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2011-05-29 19:00:44 +0200
commit75bb13e531654a561dc7baa2f2bc594aa4a8fc52 (patch)
tree0b80f48e53d969292b2ffd401cb06470a1156bff /templates/default.xml
parenteb3092f8bd30d065c4e6f4bf0159309e1a960156 (diff)
downloadcataract-75bb13e531654a561dc7baa2f2bc594aa4a8fc52.tar.xz
Introduce new theming system
This extends current templating system to another dimension, bringing the possibility to have multiple themes generated at once. The purpose is to be able to switch between multiple designs, from PC to mobile, classic vs. flat view, slideshow, etc. For the moment, only the classic theme is available. Rules: * for switching between themes, place a link inside your template manually - it's not a cgg concern, only your theming infrastructure * don't forget to define different file names for index and album pages across different themes * it's recommended to keep default theme named as "index.*" to avoid showing directory listing on webserver Notes: * some TODOs will be fixed when we have new theme using these advanced features (e.g. pictures in album pages) * TODO: introduce tag/block conditional system, allow custom user defines for each theme/page * TODO: deprecate <show_go_up>, <show_exif_table> and <border style> in favor of conditionals (these tags belong to theming)
Diffstat (limited to 'templates/default.xml')
-rw-r--r--templates/default.xml97
1 files changed, 97 insertions, 0 deletions
diff --git a/templates/default.xml b/templates/default.xml
new file mode 100644
index 0000000..67470c0
--- /dev/null
+++ b/templates/default.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<design_setup>
+
+ <!-- image size definitions -->
+ <image_sizes>
+ <!-- "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. -->
+
+ <!-- Meaning of "original" is shifted here from previous versions;
+ it's considered more like a bigger preview size for large screens now. -->
+ <!-- corresponds with mandatory <item src> tag in album source file -->
+ <size name="original">
+ <landscape w="1200" h="800" />
+ <portrait w="1024" h="1024" />
+ <quality value="97" />
+ <!-- With presence of the "no_resize" tag, no resizing will be done and
+ image file will be copied as is (this is a default for backwards
+ compatibility). -->
+ <no_resize />
+ </size>
+
+ <!-- corresponds with optional <item preview> tag in album source file -->
+ <size name="preview">
+ <landscape w="1067" h="600" />
+ <portrait w="800" h="800" />
+ <quality value="95" />
+ </size>
+
+ <!-- Thumbnail section is mandatory. -->
+ <!-- corresponds with optional <item thumbnail> tag in album source file -->
+ <size name="thumbnail">
+ <landscape w="180" h="120" />
+ <portrait w="120" h="180" />
+ <square size="180" />
+ <quality value="80" />
+ </size>
+
+ <!-- Here you can define custom sizes which will be generated from the file
+ defined in <item src> tag. Currently, there's no way how to supply custom
+ sized images from album source file (might be changed in the future). -->
+ <size name="mobile">
+ <landscape w="320" h="240" />
+ <portrait w="240" h="320" />
+ <quality value="90" />
+ </size>
+ </image_sizes>
+
+ <!-- Global support files, common files used by several themes. -->
+ <supplemental_files><![CDATA[
+ ]]></supplemental_files>
+
+
+ <!-- particular design setup -->
+ <theme enabled="yes">
+ <!-- When the <index> structure is missing, album design will be used for
+ both list of albums and list of pictures. -->
+ <index>
+ <template>template_index.html</template>
+ <target_filename>index.html</target_filename>
+ </index>
+
+ <!-- This is mandatory. -->
+ <album>
+ <template>template_album.html</template>
+ <target_filename>index.html</target_filename>
+ <!-- which picture size to use for XXX tags (TODO) -->
+ <picture_size>preview</picture_size>
+ </album>
+
+ <!-- When the <picture> structure is missing, no pages for the particular
+ images will be generated. Images are processed in either case, for use
+ with album alone. -->
+ <picture>
+ <template>template_picture.html</template>
+ <!-- '%s' will be replaced with actual picture filename -->
+ <target_filename>%s.html</target_filename>
+ <!-- which picture size to use -->
+ <picture_size>preview</picture_size>
+ </picture>
+
+ <!-- support files for current theme -->
+ <!-- should include all used CSS styles, images, scripts... -->
+ <!-- subdirectories are allowed and will be mirrored to destination -->
+ <supplemental_files><![CDATA[
+ styles.css
+ scripts-general.js
+ ]]></supplemental_files>
+ </theme>
+
+ <!-- Here you can define another theme, with different templates etc.
+ The purpose is to allow switching between them or as a result of
+ device capabilities autodetection. Don't forget to change target
+ filenames to avoid conflicts. -->
+
+</design_setup>