summaryrefslogtreecommitdiff
path: root/sample/src/setup.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 /sample/src/setup.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 'sample/src/setup.xml')
-rw-r--r--sample/src/setup.xml51
1 files changed, 6 insertions, 45 deletions
diff --git a/sample/src/setup.xml b/sample/src/setup.xml
index 72ce9dd..63f9caf 100644
--- a/sample/src/setup.xml
+++ b/sample/src/setup.xml
@@ -1,44 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<gallery_setup>
- <templates>
- <!-- path to templates (design) -->
- <path>../../templates</path>
-
- <!-- index: top level page -->
- <index>template-index.tmpl</index>
- <!-- album: list of photos in directory -->
- <album>template-album.tmpl</album>
- <!-- photo: single photo page -->
- <photo>template-view_photo.tmpl</photo>
-
- <!-- support files for selected theme (templates) -->
- <!-- should include all used CSS styles, images, scripts... -->
- <!-- subdirectories are allowed and will be mirrored to destination -->
- <template_files><![CDATA[
- styles.css
- scripts-general.js
- ]]></template_files>
-
- <!-- specify index file name to use (default = index.html) -->
- <!-- e.g. you may want 'index.php' if your templates are server-side dynamic -->
- <!-- filename extension is also used for separate image files -->
- <index_file>index.html</index_file>
+ <design>
+ <!-- path to the design setup xml file -->
+ <setup_file>../../templates/default.xml</setup_file>
<!-- use root gallery directory to store all support files -->
<!-- and relative paths in sub-albums -->
<!-- default = no (old behaviour) -->
- <support_files_use_common_root value="yes" />
- </templates>
-
+ <supplemental_files_use_common_root value="yes" />
+ </design>
+
<images>
- <!-- default sizes of thumbnail and preview images -->
- <thumbnail landscape_w="180" landscape_h="120"
- portrait_w="120" portrait_h="180"
- square="180"
- quality="80" />
- <preview landscape_w="900" landscape_h="600"
- portrait_w="500" portrait_h="750"
- quality="95" />
<!-- preview image border style - use your custom CSS style to display frame around image -->
<border style="border_single" />
<!-- preload next image (allowed values: "yes", "no") default = yes -->
@@ -61,17 +33,6 @@
<!-- - override with <fullsize/> for album or for separate image -->
<!-- <nofullsize /> -->
- <!-- target image directories -->
- <thumbnail_dir>_thumb</thumbnail_dir>
- <preview_dir>_big</preview_dir>
- <original_dir>_orig</original_dir>
-
- <!-- printf() format-style string of thumbnail file names -->
- <!-- %s is mandatory, represents file name (with ext.) -->
- <!-- %d is optional, denotes item index in the album -->
- <!-- this also avoids conflicts with identical names -->
- <thumbnail_name_format>thn_%d_%s</thumbnail_name_format>
-
<!-- Make thumbnails squared, crop in different ways: -->
<!-- none - no squared thumbnails, retain previous behaviour (default) -->
<!-- simple - crop from center, shave 5% from borders -->