From 0bdfd296ea68a2ec796be603faba3a85586c4a4e Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 10 Feb 2013 19:28:28 +0100 Subject: Show note for password protected albums on index pages Also adds IS_PROTECTED define in local item scope. --- src/generators.c | 1 + templates/styles.css | 4 ++++ templates/template_index.html | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/generators.c b/src/generators.c index 4dec760..9c65d8e 100644 --- a/src/generators.c +++ b/src/generators.c @@ -488,6 +488,7 @@ write_html_album (TGallerySetup *setup, img_thumb_w = img_thumb_h = 0; if (album_protected && theme->album_protected_thumbnail != NULL) { + g_hash_table_replace (local_defines, g_strdup ("IS_PROTECTED"), g_strdup ("")); /* expecting both global and theme supplemental files are in place at this moment */ s2 = g_build_filename (path_info->dest_dir, templates_path, theme->album_protected_thumbnail, NULL); s3 = g_strconcat (templates_path, theme->album_protected_thumbnail, NULL); diff --git a/templates/styles.css b/templates/styles.css index ea337f9..4b5cc27 100644 --- a/templates/styles.css +++ b/templates/styles.css @@ -401,6 +401,10 @@ div.index_item img { bottom: 1.9em; } +.album_protected_note { + color: #c8bc00; + font-size: 65%; +} /****** IMAGE BORDER STYLES ******/ img#border_single { diff --git a/templates/template_index.html b/templates/template_index.html index 1565a4a..7229933 100644 --- a/templates/template_index.html +++ b/templates/template_index.html @@ -40,7 +40,7 @@
- +

(This album is password protected)
( items)
@@ -51,7 +51,7 @@
- +

(This album is password protected)
( items)
@@ -62,7 +62,7 @@
- +

(This album is password protected)
( items)
-- cgit v1.2.3