summaryrefslogtreecommitdiff
path: root/design/templates/details/entry.html
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-11-14 17:53:43 -0500
committerluxagraf <sng@luxagraf.net>2016-11-14 17:53:43 -0500
commitb460162a8c744486857dae48c6afc1632c7115ba (patch)
tree82ce5a1ccf1a80fe8038e8daebba5407a4547b8e /design/templates/details/entry.html
parent0bf00ae0c85821d5ffeb75bc8dd982d1b423d2aa (diff)
pushed up new image insert script
Diffstat (limited to 'design/templates/details/entry.html')
-rw-r--r--design/templates/details/entry.html23
1 files changed, 20 insertions, 3 deletions
diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html
index 3762b48..d5038f2 100644
--- a/design/templates/details/entry.html
+++ b/design/templates/details/entry.html
@@ -17,8 +17,7 @@
<meta property="og:description" content="{{object.meta_description}}" />
<meta property="article:published_time" content="{{object.pub_date|date:'c'}}" />
<meta property="article:author" content="Luxagraf" />
- <meta property="og:site_name" content="Luxagraf" />
- <meta property="og:image" content="{{object.get_image_url}}" />{% for image in object.get_images %}
+ <meta property="og:site_name" content="Luxagraf" />{% for image in object.get_images %}
<meta property="og:image" content="{{image}}" />{% endfor %}
<meta property="og:locale" content="en_US" />
<meta name="twitter:card" content="summary_large_image"/>
@@ -36,7 +35,7 @@ class="{%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%if t ==
{% block primary %}
- <main role="main">
+ <main role="main" id="main">
<article class="h-entry hentry post--article{% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/Article">
<header id="header" class="post--header {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %}post--header--double{%endif%}{%endwith%}">
<h1 class="p-name entry-title post--title" itemprop="headline">{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|widont|safe}}{%endif%}</h1>
@@ -127,7 +126,25 @@ window.onload = function() {
createMap();
var open = false;
{%endif%}{%endwith%}
+{% if object.has_video %}
+var tester = document.getElementsByClassName("vidauto");
+var wrapper = document.getElementById('wrapper');
+var dist = 100;
+
+window.onscroll = function() {
+ for (var i=0; i<tester.length; i++) {
+ checkVisible(tester[i]) ? tester[i].play() : tester[i].pause();
+ }
+};
+
+function checkVisible(elm) {
+ var rect = elm.getBoundingClientRect();
+ var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
+ return !(rect.bottom < 0 || rect.top - viewHeight >= 0);
}
+{%endif%}
+}
+
</script>
{% with object.template_name as t %}{%if t == 1 or t == 3 %}
<script src="/media/js/hyphenate.min.js" type="text/javascript"></script>