Merge pull request #347 from edwinsteele/feature/reorg-galleria-templates
Reorganise galleria templates
This commit is contained in:
@@ -36,13 +36,7 @@
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
<footer>
|
||||
<p>{% if album.author %}© {{ album.author }} - {% endif %}
|
||||
Generated by <a href="{{ sigal_link }}">sigal</a>
|
||||
{% if 'sigal.plugins.feeds' in settings.plugins %}
|
||||
{% if settings.rss_feed %}<br><a href={{ settings.rss_feed.feed_url }}>RSS Feed</a>{% endif %}
|
||||
{% if settings.atom_feed %}<br><a href={{ settings.atom_feed.feed_url }}>Atom Feed</a>{% endif %}{% endif %}</p>
|
||||
</footer>
|
||||
{% include 'footer.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="main" role="main" class="nine columns offset-by-three">
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ settings.html_language }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
{% extends "base.html" %}
|
||||
|
||||
<title>{{ album.title|striptags }}</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/normalize.css">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/themes/classic/galleria.classic.css">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/css/style.css">
|
||||
{% block extra_head %}
|
||||
{# We will always want to show the first image when we're on an album page #}
|
||||
{# Start loading now for faster document complete instead of waiting for js to load it #}
|
||||
{% if album.medias %}
|
||||
@@ -25,60 +14,10 @@
|
||||
{% if settings.show_map and album.show_map %}
|
||||
<link rel="stylesheet" href="{{ theme.url }}/leaflet/leaflet.css" />
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% include 'analytics.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'gtm.html' %}
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1><a href="{{ album.index_url }}">{{ index_title }}</a></h1>
|
||||
|
||||
{% if settings.links %}
|
||||
<nav id="menu">
|
||||
<ul>
|
||||
{% for title, link in settings.links %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
{% if album.breadcrumb %}
|
||||
<h2>
|
||||
{%- for url, title in album.breadcrumb -%}
|
||||
<a href="{{ url }}">{{ title }}</a>
|
||||
{%- if not loop.last %} » {% endif -%}
|
||||
{% endfor -%}
|
||||
</h2>
|
||||
<hr>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div id="main" role="main">
|
||||
{% block content %}
|
||||
{% if album.medias %}
|
||||
{% macro img_description(media) -%}
|
||||
{%- if media.big -%}<a href='{{ media.big }}'>Full size</a>{%- endif -%}
|
||||
{# clean up tags and whitespace, including newlines, in the description #}
|
||||
{%- if media.description -%}<br>{{ media.description | striptags }}{%- endif -%}
|
||||
{%- if media.exif -%}
|
||||
<div class='film-meta'>
|
||||
{%- if media.exif.iso -%}<abbr title='film speed'>{{ media.exif.iso }}</abbr> {%- endif -%}
|
||||
{%- if media.exif.exposure -%}<abbr title='exposure'>{{ media.exif.exposure }}</abbr> {%- endif -%}
|
||||
{%- if media.exif.fstop -%}<abbr title='aperture'>{{ media.exif.fstop }}</abbr> {%- endif -%}
|
||||
{%- if media.exif.focal -%}<abbr title='focal length'>{{ media.exif.focal }}</abbr> {%- endif -%}
|
||||
</div>
|
||||
{%- if media.exif.gps -%}
|
||||
<a title='location' href='https://www.openstreetmap.org/?mlat={{ media.exif.gps.lat }}&mlon={{ media.exif.gps.lon}}&zoom=12&layers=M' target='_blank' class='map' >{{ 'N{:.6f}'.format(media.exif.gps.lat) if media.exif.gps.lat > 0 else 'S{:.6f}'.format(-media.exif.gps.lat) }}{{ 'E{:.6f}'.format(media.exif.gps.lon) if media.exif.gps.lon > 0 else 'W{:.6f}'.format(-media.exif.gps.lon) }}</a>
|
||||
{%- endif -%}
|
||||
{%- if media.exif.Make or media.exif.Model -%}
|
||||
<abbr title='camera make and model'>{{ media.exif.Make }} {{ media.exif.Model }}</abbr>
|
||||
{%- endif -%}
|
||||
{%- if media.exif.datetime -%}
|
||||
<abbr title='date'>{{ media.exif.datetime }}</abbr>
|
||||
{%- endif -%}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
<div class="icons">
|
||||
{% if settings.show_map and album.show_map %}
|
||||
<a class="gallery-map-toggle"><img src="{{ theme.url }}/img/map.png"
|
||||
@@ -104,11 +43,31 @@
|
||||
{{ album.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'footer.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block late_js %}
|
||||
{% macro img_description(media) -%}
|
||||
{%- if media.big -%}<a href='{{ media.big }}'>Full size</a>{%- endif -%}
|
||||
{# clean up tags and whitespace, including newlines, in the description #}
|
||||
{%- if media.description -%}<br>{{ media.description | striptags }}{%- endif -%}
|
||||
{%- if media.exif -%}
|
||||
<div class='film-meta'>
|
||||
{%- if media.exif.iso -%}<abbr title='film speed'>{{ media.exif.iso }}</abbr> {%- endif -%}
|
||||
{%- if media.exif.exposure -%}<abbr title='exposure'>{{ media.exif.exposure }}</abbr> {%- endif -%}
|
||||
{%- if media.exif.fstop -%}<abbr title='aperture'>{{ media.exif.fstop }}</abbr> {%- endif -%}
|
||||
{%- if media.exif.focal -%}<abbr title='focal length'>{{ media.exif.focal }}</abbr> {%- endif -%}
|
||||
</div>
|
||||
{%- if media.exif.gps -%}
|
||||
<a title='location' href='https://www.openstreetmap.org/?mlat={{ media.exif.gps.lat }}&mlon={{ media.exif.gps.lon}}&zoom=12&layers=M' target='_blank' class='map' >{{ 'N{:.6f}'.format(media.exif.gps.lat) if media.exif.gps.lat > 0 else 'S{:.6f}'.format(-media.exif.gps.lat) }}{{ 'E{:.6f}'.format(media.exif.gps.lon) if media.exif.gps.lon > 0 else 'W{:.6f}'.format(-media.exif.gps.lon) }}</a>
|
||||
{%- endif -%}
|
||||
{%- if media.exif.Make or media.exif.Model -%}
|
||||
<abbr title='camera make and model'>{{ media.exif.Make }} {{ media.exif.Model }}</abbr>
|
||||
{%- endif -%}
|
||||
{%- if media.exif.datetime -%}
|
||||
<abbr title='date'>{{ media.exif.datetime }}</abbr>
|
||||
{%- endif -%}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
{% if album.medias %}
|
||||
<script src="{{ theme.url }}/jquery-3.3.1.min.js"></script>
|
||||
{% if settings.show_map and album.show_map %}
|
||||
@@ -293,6 +252,4 @@
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
{% include 'piwik.html' %}
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,36 +1,19 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ settings.html_language }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
{% extends "base.html" %}
|
||||
|
||||
<title>{{ album.title|striptags }}</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="{{ album.author }}">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
{% block extra_head %}
|
||||
{# These are used on album pages - prefetch now #}
|
||||
<link rel="prefetch" href="static/jquery-3.3.1.min.js" />
|
||||
<link rel="prefetch" href="static/galleria.min.js" />
|
||||
<link rel="prefetch" href="static/themes/classic/galleria.classic.min.js" />
|
||||
<link rel="prefetch" href="static/plugins/history/galleria.history.min.js" />
|
||||
{% if settings.show_map %}
|
||||
<link rel="prefetch" href="static/leaflet/leaflet.css" />
|
||||
<link rel="prefetch" href="static/leaflet/leaflet.js" />
|
||||
<link rel="prefetch" href="static/leaflet/leaflet-providers.js" />
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<link rel="stylesheet" href="{{ theme.url }}/css/normalize.css">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/themes/classic/galleria.classic.css">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
{% include 'gtm.html' %}
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1><a href="{{ album.index_url }}">{{ index_title }}</a></h1>
|
||||
|
||||
{% if settings.links %}
|
||||
<nav id="menu">
|
||||
<ul>
|
||||
{% for title, link in settings.links %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div id="main" role="main">
|
||||
{% block content %}
|
||||
<div id="albums">
|
||||
<!-- <h1>Albums</h1> -->
|
||||
<ul>
|
||||
@@ -42,10 +25,4 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'footer.html' %}
|
||||
</div>
|
||||
{% include 'piwik.html' %}
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
52
sigal/themes/galleria/templates/base.html
Normal file
52
sigal/themes/galleria/templates/base.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ settings.html_language }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
|
||||
<title>{{ album.title|striptags }}</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/normalize.css">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/themes/classic/galleria.classic.css">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/css/style.css">
|
||||
{% block extra_head %}{% endblock extra_head %}
|
||||
{% include 'analytics.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'gtm.html' %}
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1><a href="{{ album.index_url }}">{{ index_title }}</a></h1>
|
||||
|
||||
{% if settings.links %}
|
||||
<nav id="menu">
|
||||
<ul>
|
||||
{% for title, link in settings.links %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% if album.breadcrumb %}
|
||||
<h2>
|
||||
{%- for url, title in album.breadcrumb -%}
|
||||
<a href="{{ url }}">{{ title }}</a>
|
||||
{%- if not loop.last %} » {% endif -%}
|
||||
{% endfor -%}
|
||||
</h2>
|
||||
<hr>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div id="main" role="main">
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
{% include 'footer.html' %}
|
||||
</div>
|
||||
{% block late_js %}{% endblock late_js %}
|
||||
{% include 'piwik.html' %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user