aboutsummaryrefslogtreecommitdiff
path: root/bgstack15-gallery-theme/templates
diff options
context:
space:
mode:
Diffstat (limited to 'bgstack15-gallery-theme/templates')
-rw-r--r--bgstack15-gallery-theme/templates/album.html84
-rw-r--r--bgstack15-gallery-theme/templates/album_list.html22
-rw-r--r--bgstack15-gallery-theme/templates/base.html54
-rw-r--r--bgstack15-gallery-theme/templates/footer.html16
-rw-r--r--bgstack15-gallery-theme/templates/links.html10
-rw-r--r--bgstack15-gallery-theme/templates/media.html37
6 files changed, 223 insertions, 0 deletions
diff --git a/bgstack15-gallery-theme/templates/album.html b/bgstack15-gallery-theme/templates/album.html
new file mode 100644
index 0000000..1114e40
--- /dev/null
+++ b/bgstack15-gallery-theme/templates/album.html
@@ -0,0 +1,84 @@
+{% extends "base.html" %}
+{% block content %}
+ {% set numbers = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] %}
+ {% set column_size = settings.colorbox_column_size %}
+ {% set nb_columns = (9 / column_size)|int %}
+ {% set column_size_t = numbers[column_size] %}
+
+ {% macro img_description(media) -%}
+ {% if media.big %} data-big="{{ media.big_url }}"{% endif %}
+ {% if media.exif %}
+ {% if media.exif.datetime %}
+ data-date=", {{ media.exif.datetime }}"
+ {% endif %}
+ {% endif %}
+ {%- endmacro %}
+
+ <div id="gallery">
+ {% for media in album.medias %}
+ {% if loop.index % nb_columns == 1 %}
+ <div id="albums" class="row">
+ {% endif%}
+ {% if media.type == "image" %}
+ <div class="{{ column_size_t }} columns thumbnail">
+ {% if 'sigal.plugins.media_page' in settings.plugins %}
+ <a href="{{ media.url}}.html" class="gallery"
+ title="{{ media.title }}"
+ data-href="{{ media.url }}" {{ img_description(media) }}>
+ {% else %}
+ <a href="{{ media.url }}" class="gallery" title="{{ media.title }}"
+ {{ img_description(media) }}>
+ {% endif %}
+ <img src="{{ media.thumbnail }}" alt="{{ media.url }}"{# bgstack15 added this if..media.title #}
+ title="{{ media.title }}" />{% if '.jpg' not in media.title or settings.edit_enabled %}<br>{% endif %}{% if '.jpg' not in media.title %}{{ media.title }}{% endif %}</a>{% if settings.edit_enabled %} <a style="font-size: 66%;" href="{{ settings.edit_cgi_script }}?index={{ album.index_url }}&image={{ media.url }}&id={{ settings.gallery_id }}">{{ settings.edit_string }}</a>{% endif %}
+ {% if media.description %}{{ media.description }}{% endif %}
+ </div>
+ {% endif %}
+ {% if media.type == "video" %}
+ {% set mhash = media.url|replace('.', '')|replace(' ', '') %}
+ <div class="{{ column_size_t }} columns thumbnail">
+ {% if 'sigal.plugins.media_page' in settings.plugins %}
+ <a href="{{ media.url }}.html" data-href="#{{ mhash }}"
+ {% else %}
+ <a href="#{{ mhash }}" class="gallery" inline='yes' title="{{ media.url }}"
+ {% endif %}
+ {% if media.big %} data-big="{{ media.big_url }}"{% endif %}>
+ <img src="{{ media.thumbnail }}" alt="{{ media.url }}"
+ title="{{ media.title }}" /></a>{% if ('.mp4' not in media.title and '.webm' not in media.title) or settings.edit_enabled %}<br>{% endif %}{% if ('.jpg' not in media.title and '.webm' not in media.title) %}{{ media.title }}{% endif %}</a>{% if settings.edit_enabled %} <a style="font-size: 66%;" href="{{ settings.edit_cgi_script }}?index={{ album.index_url }}&image={{ media.url }}&id={{ settings.gallery_id }}">{{ settings.edit_string }}</a>{% endif %}
+ {% if media.description %}{{ media.description }}{% endif %}
+ </div>
+ <!-- This contains the hidden content for the video -->
+ <div style='display:none'>
+ <div id="{{ mhash }}">
+ <video controls height="100%" width="100%">
+ <source src='{{ media.url }}' type='{{ media.mime }}' />
+ </video>
+ </div>
+ </div>
+ {% endif %}
+ {% if loop.last or loop.index % nb_columns == 0 %}
+ </div>
+ {% endif%}
+ {% endfor %}
+ </div>
+
+ {% if album.zip %}
+ <div id="additionnal-infos" class="row">
+ <p><a href="{{ album.zip }}"
+ title="Download a zip archive with all images">Download ZIP</a></p>
+ </div>
+ {% endif %}
+
+{% endblock %}
+
+{% block footer %}
+ <script src="{{ theme.url }}/js/jquery-2.2.1.min.js"></script>
+ <script src="{{ theme.url }}/js/jquery.colorbox-min.js"></script>
+ <script src="{{ theme.url }}/js/jquery.touchSwipe.min.js"></script>
+
+ {% if 'sigal.plugins.media_page' in settings.plugins %}
+ <script src="{{ theme.url }}/js/app-with-media-page.js"></script>
+ {% else %}
+ <script src="{{ theme.url }}/js/app.js"></script>
+ {% endif %}
+{% endblock %}
diff --git a/bgstack15-gallery-theme/templates/album_list.html b/bgstack15-gallery-theme/templates/album_list.html
new file mode 100644
index 0000000..8955992
--- /dev/null
+++ b/bgstack15-gallery-theme/templates/album_list.html
@@ -0,0 +1,22 @@
+{% extends "base.html" %}
+{% block content %}
+ {% set numbers = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] %}
+ {% set column_size = settings.colorbox_column_size %}
+ {% set nb_columns = (9 / column_size)|int %}
+ {% set column_size_t = numbers[column_size] %}
+
+ {% for alb in album.albums %}
+ {% if loop.index % nb_columns == 1 %}
+ <div id="albums" class="row">
+ {% endif%}
+ <div class="{{ column_size_t }} columns thumbnail">
+ <a href="{{ alb.url }}">
+ <img src="{{ alb.thumbnail }}" class="album_thumb"
+ alt="{{ alb.title }}" title="{{ alb.title }}" /></a>
+ <span class="album_title">{{ alb.title }}<p></span>
+ </div>
+ {% if loop.last or loop.index % nb_columns == 0 %}
+ </div>
+ {% endif%}
+ {% endfor %}
+{% endblock %}
diff --git a/bgstack15-gallery-theme/templates/base.html b/bgstack15-gallery-theme/templates/base.html
new file mode 100644
index 0000000..049b71b
--- /dev/null
+++ b/bgstack15-gallery-theme/templates/base.html
@@ -0,0 +1,54 @@
+<!doctype html>
+<html lang="{{ settings.html_language }}">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+
+ <title>{{ album.title }}</title>
+ <meta name="description" content="">
+ <meta name="author" content="{{ album.author }}">
+ <meta name="viewport" content="width=device-width">
+ <link rel="stylesheet" href="{{ theme.url }}/css/skeleton.css">
+ <link rel="stylesheet" href="{{ theme.url }}/css/colorbox.css">
+ <link rel="stylesheet" href="{{ theme.url }}/css/style.css">
+ {% block extra_head %}{% endblock extra_head %}
+ {% include 'analytics.html' %}
+ </head>
+ <body>
+ {% include 'decrypt.html' %}
+ {% include 'gtm.html' %}
+ <div class="container">
+ <div class="three columns">
+ <div class="sidebar">
+ <h1><a href="{{ album.index_url }}">
+ {% if settings.site_logo %}
+ <img src="{{ theme.url }}/{{ settings.site_logo }}" alt="{{ index_title }}">
+ {% else %}
+ {{ index_title }}
+ {% endif %}
+ </a></h1>
+ {% include 'links.html' %}
+ {% include 'footer.html' %}
+ </div>
+ </div>
+ <div id="main" role="main" class="nine columns offset-by-three">
+ <header>
+ {% include 'breadcrumb.html' %}
+ {% if album.breadcrumb %}
+ <hr>
+ {% endif %}
+ </header>
+
+ {% block content %}{% endblock %}
+
+ {% if album.description %}
+ <div id="description" class="row">
+ {{ album.description }}{%endif%}{% if settings.edit_enabled %} <a style="font-size: 66%;" href="{{ settings.edit_cgi_script }}?index={{ album.index_url }}&image=folder&id={{ settings.gallery_id }}">{{ settings.edit_string }}</a>{% if album.description %}{% endif %}
+ </div>
+ {% endif %}
+ </div>
+ </div>
+ {% block footer %}{% endblock %}
+ {% include 'piwik.html' %}
+ </body>
+</html>
diff --git a/bgstack15-gallery-theme/templates/footer.html b/bgstack15-gallery-theme/templates/footer.html
new file mode 100644
index 0000000..52f7fb0
--- /dev/null
+++ b/bgstack15-gallery-theme/templates/footer.html
@@ -0,0 +1,16 @@
+<footer>
+ <p>
+ {% if album.author %}
+ <span>&copy; {{ album.author }}</span>
+ {% endif %}
+ {# removed "generated by sigal" text from original footer.html bgstack15 #}
+ {% if 'sigal.plugins.feeds' in settings.plugins %}
+ {% if settings.rss_feed %}
+ <span><a href={{ settings.rss_feed.feed_url }}>RSS Feed</a></span>
+ {% endif %}
+ {% if settings.atom_feed %}
+ <span><a href={{ settings.atom_feed.feed_url }}>Atom Feed</a></span>
+ {% endif %}
+ {% endif %}
+ </p>
+</footer>
diff --git a/bgstack15-gallery-theme/templates/links.html b/bgstack15-gallery-theme/templates/links.html
new file mode 100644
index 0000000..791d0e9
--- /dev/null
+++ b/bgstack15-gallery-theme/templates/links.html
@@ -0,0 +1,10 @@
+{% if settings.links or settings.edit_enabled %}
+<nav id="menu">
+ <ul>
+ {% if settings.links %}{% for title, link in settings.links %}
+ <li><a href="{{ link }}">{{ title }}</a></li>
+ {% endfor %}{% endif %}
+ <li><a href="{{ settings.toggle_link }}?id={{ settings.gallery_id }}">{% for value, text in settings.toggle_editing %}{% if settings.edit_enabled == value %}{{ text }}{% endif %}{% endfor %}</a>
+ </ul>
+</nav>
+{% endif %}
diff --git a/bgstack15-gallery-theme/templates/media.html b/bgstack15-gallery-theme/templates/media.html
new file mode 100644
index 0000000..bf56663
--- /dev/null
+++ b/bgstack15-gallery-theme/templates/media.html
@@ -0,0 +1,37 @@
+{% extends "base.html" %}
+{% block content %}
+ <header>
+ {% if album.breadcrumb %}
+ <h2>
+ {% for url, title in album.breadcrumb %}
+ <a href="{{ url }}">{{ title }}</a> »
+ {% endfor -%}
+ <a href="#">{{ media.title }}</a>
+ </h2>
+ <hr>
+ {% endif %}
+ </header>
+
+ {% if media %}
+ <div class="thumbnail">
+ {% if media.type == "image" %}
+ <img src="{{ media.url }}" alt="{{ media.title }}" title="{{ media.title }}" />
+ <p>{{ media.title }}</p>
+ {% endif %}
+ {% if media.type == "video" %}
+ <video controls>
+ <source src='{{ media.url }}' type='video/webm' />
+ </video>
+ {% endif %}
+
+ <p>
+ {% if previous_media %}
+ <a href="{{ previous_media.url }}.html">« previous</a>
+ {% endif %}
+ {% if next_media %}
+ <a href="{{ next_media.url }}.html">next »</a>
+ {% endif %}
+ </p>
+ </div>
+ {% endif %}
+{% endblock %}
bgstack15