From 75bb13e531654a561dc7baa2f2bc594aa4a8fc52 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 29 May 2011 19:00:44 +0200 Subject: 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 , and in favor of conditionals (these tags belong to theming) --- templates/Makefile.am | 7 +-- templates/default.xml | 97 ++++++++++++++++++++++++++++++++++++++ templates/template-album.tmpl | 88 ---------------------------------- templates/template-index.tmpl | 94 ------------------------------------ templates/template-view_photo.tmpl | 76 ----------------------------- templates/template_album.html | 88 ++++++++++++++++++++++++++++++++++ templates/template_index.html | 94 ++++++++++++++++++++++++++++++++++++ templates/template_picture.html | 76 +++++++++++++++++++++++++++++ 8 files changed, 359 insertions(+), 261 deletions(-) create mode 100644 templates/default.xml delete mode 100644 templates/template-album.tmpl delete mode 100644 templates/template-index.tmpl delete mode 100644 templates/template-view_photo.tmpl create mode 100644 templates/template_album.html create mode 100644 templates/template_index.html create mode 100644 templates/template_picture.html (limited to 'templates') 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + index.html + + + + + + index.html + + preview + + + + + + + %s.html + + preview + + + + + + + + + + + diff --git a/templates/template-album.tmpl b/templates/template-album.tmpl deleted file mode 100644 index 9f31fb3..0000000 --- a/templates/template-album.tmpl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - $(PAGE_TITLE) - - - - - - - - - - - - -
- -
- - - -
-
-
- - -
- - -
-
- - $(IMG_TITLE) - - -
- - -
-
- - $(IMG_TITLE) - - -
- - -
-
- - $(IMG_TITLE) - - -
- - -
-
-
- - -
-
-
- - -
- - -
-
-
-
- - - - - - - diff --git a/templates/template-index.tmpl b/templates/template-index.tmpl deleted file mode 100644 index 01de113..0000000 --- a/templates/template-index.tmpl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - $(PAGE_TITLE) - - - - - - - - - - - - -
- -
- - - -
-
-
- - -
- - - - - - - - - - - -
-
-
- - -
-
-
- - -
- - -
-
-
-
- - - - - - - diff --git a/templates/template-view_photo.tmpl b/templates/template-view_photo.tmpl deleted file mode 100644 index 7557846..0000000 --- a/templates/template-view_photo.tmpl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - $(PAGE_TITLE) - - - - - - - - - - - - -
- -
-
-
-
- - -
- - - - -
- - - -
- -
- :: Show EXIF -
-
- - - -
-
-
-
- - - - - - - diff --git a/templates/template_album.html b/templates/template_album.html new file mode 100644 index 0000000..9f31fb3 --- /dev/null +++ b/templates/template_album.html @@ -0,0 +1,88 @@ + + + + + + $(PAGE_TITLE) + + + + + + + + + + + + +
+ +
+ + + +
+
+
+ + +
+ + +
+
+ + $(IMG_TITLE) + + +
+ + +
+
+ + $(IMG_TITLE) + + +
+ + +
+
+ + $(IMG_TITLE) + + +
+ + +
+
+
+ + +
+
+
+ + +
+ + +
+
+
+
+ + + + + + + diff --git a/templates/template_index.html b/templates/template_index.html new file mode 100644 index 0000000..01de113 --- /dev/null +++ b/templates/template_index.html @@ -0,0 +1,94 @@ + + + + + + $(PAGE_TITLE) + + + + + + + + + + + + +
+ +
+ + + +
+
+
+ + +
+ + + + + + + + + + + +
+
+
+ + +
+
+
+ + +
+ + +
+
+
+
+ + + + + + + diff --git a/templates/template_picture.html b/templates/template_picture.html new file mode 100644 index 0000000..413d348 --- /dev/null +++ b/templates/template_picture.html @@ -0,0 +1,76 @@ + + + + + + $(PAGE_TITLE) + + + + + + + + + + + + +
+ +
+
+
+
+ + +
+ + + + +
+ + + +
+ +
+ :: Show EXIF +
+
+ + + +
+
+
+
+ + + + + + + -- cgit v1.2.3