diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/Makefile.am | 7 | ||||
| -rw-r--r-- | templates/default.xml | 97 | ||||
| -rw-r--r-- | templates/template_album.html (renamed from templates/template-album.tmpl) | 0 | ||||
| -rw-r--r-- | templates/template_index.html (renamed from templates/template-index.tmpl) | 0 | ||||
| -rw-r--r-- | templates/template_picture.html (renamed from templates/template-view_photo.tmpl) | 2 |
5 files changed, 102 insertions, 4 deletions
diff --git a/templates/Makefile.am b/templates/Makefile.am index 45c3baf..8826487 100644 --- a/templates/Makefile.am +++ b/templates/Makefile.am @@ -3,11 +3,12 @@ NULL = templatesdir = $(datadir)/cgg templates_DATA = \ + default.xml \ + template_album.html \ + template_index.html \ + template_picture.html \ scripts-general.js \ styles.css \ - template-album.tmpl \ - template-index.tmpl \ - template-view_photo.tmpl \ $(NULL) EXTRA_DIST = $(templates_DATA) 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> diff --git a/templates/template-album.tmpl b/templates/template_album.html index 9f31fb3..9f31fb3 100644 --- a/templates/template-album.tmpl +++ b/templates/template_album.html diff --git a/templates/template-index.tmpl b/templates/template_index.html index 01de113..01de113 100644 --- a/templates/template-index.tmpl +++ b/templates/template_index.html diff --git a/templates/template-view_photo.tmpl b/templates/template_picture.html index 7557846..413d348 100644 --- a/templates/template-view_photo.tmpl +++ b/templates/template_picture.html @@ -33,7 +33,7 @@ <!-- ## Image --> <div class="img_preview"> - <a href="$(LINK_NEXT)"><img src="$(IMG_SRC_BIG)" width="$(IMG_SIZE_BIG_W)" height="$(IMG_SIZE_BIG_H)" alt="" id="$(IMG_BORDER_STYLE)" /></a> + <a href="$(LINK_NEXT)"><img src="$(IMG_SRC)" width="$(IMG_SIZE_W)" height="$(IMG_SIZE_H)" alt="" id="$(IMG_BORDER_STYLE)" /></a> <!-- $(BEGIN_IMG_FULLSIZE_LINK) --> <div class="img_preview_full"> <a href="$(IMG_SRC_FULL)">See original size (<!-- $(IMG_SIZE_ORIG_W) -->x<!-- $(IMG_SIZE_ORIG_H) -->)</a> |
