Revert "only load css and js if section is used"
This reverts commit 91c702b299cfc896d86c355e8608ea9051a77072.
This commit is contained in:
parent
91c702b299
commit
8e17843c99
@ -8,7 +8,6 @@ Changelog
|
||||
* Add youtube section https://prosopopee.readthedocs.org/en/latest/sections.html#youtube by beudbeud
|
||||
* Add quotes section https://prosopopee.readthedocs.org/en/latest/sections.html#quote by beudbeud
|
||||
* Add deploy and preview option https://prosopopee.readthedocs.io/en/latest/build.html#preview by beudbeud
|
||||
* Load only css and jss if the section is used by beudbeud
|
||||
|
||||
0.4 (2016-12-11)
|
||||
|
||||
|
||||
@ -1,10 +1,3 @@
|
||||
{% for section in gallery.sections %}
|
||||
{% if section.type == 'panorama' %}
|
||||
{% set panorama = true %}
|
||||
{% elif section.type == 'audio'%}
|
||||
{% set audio = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -13,11 +6,8 @@
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/fonts.css" media="screen,projection"/>
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/>
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/baguetteBox.min.css" media="screen,projection"/>
|
||||
{% if panorama %}
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/panorama_viewer.css" media="screen,projection"/>
|
||||
{% elif audio %}
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/mediaelementplayer.css" media="screen,projection"/>
|
||||
{% endif %}
|
||||
<!--Let browser know website is optimized for mobile-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
{% if gallery.description %}
|
||||
@ -48,19 +38,15 @@
|
||||
</div>
|
||||
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../static/js/baguetteBox.min.js" charset="utf-8"></script>
|
||||
{% if panorama %}
|
||||
<script type="text/javascript" src="../static/js/jquery.panorama_viewer.min.js" charset="utf-8"></script>
|
||||
{% elif audio %}
|
||||
<script type="text/javascript" src="../static/js/mediaelement-and-player.min.js" charset="utf-8"></script>
|
||||
{% endif %}
|
||||
<script type="text/javascript" src="../static/js/jquery.lazyload.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../static/js/picturefill.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../static/js/mediaelement-and-player.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
baguetteBox.run(".baguette", {});
|
||||
|
||||
{% if panorama %}
|
||||
$(".panorama").panorama_viewer({
|
||||
repeat: true,
|
||||
direction: "horizontal",
|
||||
@ -68,10 +54,8 @@ $(function() {
|
||||
easing: "linear",
|
||||
overlay: true
|
||||
});
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
{% if audio %}
|
||||
$('audio').mediaelementplayer({
|
||||
alwaysShowControls: true,
|
||||
features: ['playpause','progress','volume'],
|
||||
@ -82,7 +66,6 @@ $('audio').mediaelementplayer({
|
||||
iPhoneUseNativeControls: true,
|
||||
AndroidUseNativeControls: true
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
var video = $("video");
|
||||
video.on('click', function(e){
|
||||
|
||||
@ -1,10 +1,3 @@
|
||||
{% for section in gallery.sections %}
|
||||
{% if section.type == 'panorama' %}
|
||||
{% set panorama = true %}
|
||||
{% elif section.type == 'audio'%}
|
||||
{% set audio = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -13,13 +6,8 @@
|
||||
<link rel="stylesheet" href="../static/css/materialize.css"/>
|
||||
<link rel="stylesheet" href="../static/css/style-page.css">
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/baguetteBox.min.css" media="screen,projection"/>
|
||||
{% for section in gallery.sections %}
|
||||
{% if panorama %}
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/panorama_viewer.css" media="screen,projection"/>
|
||||
{% endif %}
|
||||
{% if audio %}
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/mediaelementplayer.css" media="screen,projection"/>
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="../static/css/font-awesome.css">
|
||||
|
||||
<!--Let browser know website is optimized for mobile-->
|
||||
@ -58,11 +46,8 @@
|
||||
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../static/js/materialize.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../static/js/baguetteBox.min.js" charset="utf-8"></script>
|
||||
{% if panorama %}
|
||||
<script type="text/javascript" src="../static/js/jquery.panorama_viewer.min.js" charset="utf-8"></script>
|
||||
{% elif audio %}
|
||||
<script type="text/javascript" src="../static/js/jquery.lazyload.min.js" charset="utf-8"></script>
|
||||
{% endif %}
|
||||
<script type="text/javascript" src="../static/js/mediaelement-and-player.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function(){
|
||||
@ -81,7 +66,7 @@ video.on('click', function(e){
|
||||
vid.webkitRequestFullscreen();
|
||||
}
|
||||
});
|
||||
{% if audio %}
|
||||
|
||||
$('audio').mediaelementplayer({
|
||||
alwaysShowControls: true,
|
||||
features: ['playpause','progress','volume'],
|
||||
@ -92,7 +77,6 @@ $('audio').mediaelementplayer({
|
||||
iPhoneUseNativeControls: true,
|
||||
AndroidUseNativeControls: true
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
|
||||
$(function() {
|
||||
@ -108,7 +92,6 @@ $(function() {
|
||||
|
||||
$(function() {
|
||||
baguetteBox.run(".baguette", {});
|
||||
{% if panorama %}
|
||||
$(".panorama").panorama_viewer({
|
||||
repeat: true,
|
||||
direction: "horizontal",
|
||||
@ -116,7 +99,6 @@ $(function() {
|
||||
easing: "linear",
|
||||
overlay: true
|
||||
});
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
{% if settings.settings.light_mode %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user