diff options
author | luxagraf <sng@luxagraf.net> | 2016-11-01 14:42:20 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2016-11-01 14:42:20 -0400 |
commit | 541a4616c06449311cae1a793fef11bfa1ca7ace (patch) | |
tree | 498404416935822a09de181d6c82f24d79916468 /design/templates/details | |
parent | d061b4393663ddf81c281f51fef63b5d11beb0df (diff) |
widened site, created new photo layouts and prepped homepage redesign
Diffstat (limited to 'design/templates/details')
-rw-r--r-- | design/templates/details/entry.html | 30 | ||||
-rw-r--r-- | design/templates/details/photo_gallery.html | 6 |
2 files changed, 32 insertions, 4 deletions
diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html index 494f926..a2b6873 100644 --- a/design/templates/details/entry.html +++ b/design/templates/details/entry.html @@ -7,7 +7,6 @@ {% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %} {%block extrahead%} <link rel="canonical" href="https://luxagraf.net{{object.get_absolute_url}}" /> - <link rel="amphtml" href="https://luxagraf.net{{object.get_absolute_url}}.amp" /> <meta name="ICBM" content="{{object.latitude}}, {{object.longitude}}" /> <meta name="geo.position" content="{{object.latitude}}; {{object.longitude}}" /> <meta name="geo.placename" content="{% if object.country.name == "United States" %}{{object.location.name|smartypants|safe}}, {{object.state.name}}{%else%}{{object.location.name|smartypants|safe}}, {{object.country.name}}{%endif%}"> @@ -86,6 +85,35 @@ class="{%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%if t == {%endif%} {% endblock %} {% block js %} +<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<defs> +<symbol id="icon-external" viewBox="0 0 12 12"> +<title>external</title> +<path fill="#FFF" stroke="#fff" stroke-width="10" d="m43,35H5v60h60V57M45,5v10l10,10-30,30 20,20 30-30 10,10h10V5z"/> +</svg> +<!--Fallback --> + external +</symbol> +</defs> +</svg> +<script src="/media/js/lightbox.js" type="text/javascript"></script> +<script> +var opts= { + //nextOnClick: false, + captions: true, + onload: function(){ + var im = document.getElementById("jslghtbx-contentwrapper"); + var link = im.appendChild(document.createElement('a')) + link.href = im.firstChild.src; + link.innerHTML= "open "; + link.target = "_blank"; + link.setAttribute('class', 'p-link'); + im.appendChild(link); + } +}; +var lightbox = new Lightbox(); +lightbox.load(opts); +</script> {% with object.get_template_name_display as t %}{%if t == "single" or t == "single-dark" %} <script src="/media/js/leaflet-master/leaflet-mod.js"></script> <script src="/media/js/detail.min.js"></script> diff --git a/design/templates/details/photo_gallery.html b/design/templates/details/photo_gallery.html index bf2db6d..be25326 100644 --- a/design/templates/details/photo_gallery.html +++ b/design/templates/details/photo_gallery.html @@ -34,16 +34,16 @@ Your browser does not support the <code>video</code> element. </video> {% else %} - <img sizes="(max-width: 1170px) 100vw" + <img sizes="(max-width: 1140px) 100vw, (min-width: 1141px) 1140px" srcset="{% for size in photo.sizes.all %}{%spaceless%} {% get_image_by_size photo size.width %} {{size.width}}w{% if forloop.last%}"{%else%},{%endif%}{%endspaceless%} {%endfor%} - {% for size in photo.sizes.all %}{%spaceless%}{% if size.width > 720 and size.width < 2000 %}src="{% get_image_by_size photo size.width %}"{%endif%}{%endspaceless%}{%endfor%} alt="{% if photo.alt %}{{photo.alt}}{%else%}{{photo.title}}{%endif%}" {%if photo.is_portait %}class="v"{%endif%} > + {% for size in photo.sizes.all %}{%spaceless%}{% if size.width > 720 and size.width < 2000 %}src="{% get_image_by_size photo size.width %}"{%endif%}{%endspaceless%}{%endfor%} alt="{% if photo.alt %}{{photo.alt}}{%else%}{{photo.title}}{%endif%}" p="{{photo.is_portait}}" {%if photo.is_portait %}class="v"{%endif%} > {%endif%}{% if not photo.is_video %}</a>{%endif%} <figcaption class="figcaption"> <div class="caption" id="id-{{photo.id}}"> <h3 class="figcaption--title">{{photo.title}}</h3> <time class="figcaption--date" datetime="{{photo.exif_date|date:'c'}}">{{photo.exif_date|date:"M j, Y"}}</time> - {% if object.is_public %}<a class="map-link" href="#" data-latitude="{{photo.latitude}}" data-longitude="{{photo.longitude}}" data-imgid="id-{{photo.id}}">Map</a>{%endif%} + {% if object.is_public %}{%if object.latitude %}<a class="map-link" href="#" data-latitude="{{photo.latitude}}" data-longitude="{{photo.longitude}}" data-imgid="id-{{photo.id}}">Map</a>{%endif%}{%endif%} {%if photo.caption%}<p class="figcaption--desc">{{photo.caption|safe}}</p> {%endif%} </div> <div class="photo-options"> |