gallery tweaks and url preview headers
This commit is contained in:
parent
2b129a8596
commit
f46154ddfd
|
@ -1,13 +1,14 @@
|
||||||
{% load available_content%}
|
{% load available_content static %}
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html class="no-js" lang="en">
|
<html class="no-js" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
{% block head %}
|
||||||
<title>Studio CAMP</title>
|
<title>Studio CAMP</title>
|
||||||
|
{% endblock %}
|
||||||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans"/>
|
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans"/>
|
||||||
{% load static %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "css/foundation.css" %}">
|
<link rel="stylesheet" type="text/css" href="{% static "css/foundation.css" %}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "css/jquery.bxslider.css" %}">
|
<link rel="stylesheet" type="text/css" href="{% static "css/jquery.bxslider.css" %}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}">
|
<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}">
|
||||||
|
@ -49,14 +50,36 @@
|
||||||
<script src="{% static "js/foundation.js" %}"></script>
|
<script src="{% static "js/foundation.js" %}"></script>
|
||||||
<script src="{% static "js/app.js" %}"></script>
|
<script src="{% static "js/app.js" %}"></script>
|
||||||
<script src="{% static "js/what-input.js" %}"></script>
|
<script src="{% static "js/what-input.js" %}"></script>
|
||||||
<script src="{% static "js/jquery.bxslider.js" %}"></script>
|
<script src="{% static "js/jquery.bxslider.js" %}?2"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var startSlide = 0;
|
||||||
|
if (document.querySelectorAll('.select-image').length && document.location.hash.length) {
|
||||||
|
startSlide = parseInt(document.location.hash.slice(1)) - 1
|
||||||
|
}
|
||||||
function loadSlideshow() {
|
function loadSlideshow() {
|
||||||
|
$('a.original-link').bind('touchstart MSPointerDown pointerdown', function(event) {
|
||||||
|
event.stopPropagation()
|
||||||
|
});
|
||||||
|
$('a.original-link').on({
|
||||||
|
mousedown: function(event) {
|
||||||
|
event.stopPropagation()
|
||||||
|
},
|
||||||
|
})
|
||||||
slider = $('.slider1').show().bxSlider({
|
slider = $('.slider1').show().bxSlider({
|
||||||
|
startSlide: startSlide,
|
||||||
|
preloadImages: 'all',
|
||||||
adaptiveHeight : true,
|
adaptiveHeight : true,
|
||||||
pager : false,
|
pager : false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var images = $('.slider1 img'), count = images.length;
|
||||||
|
images.on({load: function(event) {
|
||||||
|
setTimeout(function() {
|
||||||
|
slider.resize()
|
||||||
|
slider.redrawSlider()
|
||||||
|
}, 100)
|
||||||
|
}})
|
||||||
|
|
||||||
document.querySelectorAll('.select-image').forEach(function(a) {
|
document.querySelectorAll('.select-image').forEach(function(a) {
|
||||||
a.onclick = function(event) {
|
a.onclick = function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -64,12 +87,21 @@
|
||||||
document.location.hash = '#' + this.dataset.id;
|
document.location.hash = '#' + this.dataset.id;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
if (document.querySelectorAll('.select-image').length && document.location.hash.length) {
|
if (document.querySelectorAll('.select-image').length && document.location.hash.length) {
|
||||||
var slide = parseInt(document.location.hash.slice(1))
|
var slide = parseInt(document.location.hash.slice(1))
|
||||||
if (slide) {
|
if (slide) {
|
||||||
slider.goToSlide(slide - 1)
|
slider.goToSlide(slide - 1)
|
||||||
|
slider.resize()
|
||||||
|
slider.redrawSlider()
|
||||||
|
setTimeout(function() {
|
||||||
|
slider.resize()
|
||||||
|
slider.redrawSlider()
|
||||||
|
}, 2000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$(document).keydown(function(e){
|
$(document).keydown(function(e){
|
||||||
if (e.keyCode == 39) // Right arrow
|
if (e.keyCode == 39) // Right arrow
|
||||||
|
|
7
content/templates/content-header.html
Normal file
7
content/templates/content-header.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
<title>{{ content.title }} - Studio CAMP</title>
|
||||||
|
<meta name="title" content="{{ content.title }}"/>
|
||||||
|
<meta property="og:title" content="{{ content.title }}"/>
|
||||||
|
<meta content="https://studio.camp{{ content.image_url }}" name="thumbnail"/>
|
||||||
|
<meta content="https://studio.camp{{ content.image_url }}" name="image_src"/>
|
||||||
|
<meta property="og:image" content="https://studio.camp{{ content.image_url }}"/>
|
|
@ -1,4 +1,7 @@
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block head %}
|
||||||
|
{% include "content-header.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include "edit.html" %}
|
{% include "edit.html" %}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block head %}
|
||||||
|
{% include "content-header.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include "featured.html" %}
|
{% include "featured.html" %}
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
<ul class="slider1">
|
<ul class="slider1">
|
||||||
{% for photo in gallery.public %}
|
{% for photo in gallery.public %}
|
||||||
<li id="slide-{{photo.slug}}">
|
<li id="slide-{{photo.slug}}">
|
||||||
<img src="{{ photo.get_display_url }}" alt="{{ photo.title }}">
|
<img src="{{ photo.get_display_url }}" alt="{{ photo.title }}" loading="lazy">
|
||||||
<p>
|
<p>
|
||||||
{{ photo.caption|safe }}
|
{{ photo.caption|safe }}
|
||||||
{% if photo.caption %}<br>{%endif%}
|
{% if photo.caption %}<br>{%endif%}
|
||||||
<a href="{{ photo.image.url }}" target="_blank" >Link to original file</a>
|
<a href="{{ photo.image.url }}" class="original-link" target="_blank" >Link to original file</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<p>
|
<p>
|
||||||
{{ object.caption|safe }}
|
{{ object.caption|safe }}
|
||||||
{% if object.caption %}<br>{%endif%}
|
{% if object.caption %}<br>{%endif%}
|
||||||
<a href="{{ object.image.url }}" target="_blank" >Link to original file</a>
|
<a href="{{ object.image.url }}" class="original-link" target="_blank" >Link to original file</a>
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for gallery in object.public_galleries %}
|
{% for gallery in object.public_galleries %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user