pelican-bootstrap3: add colorbox support

This commit is contained in:
2014-05-29 20:42:56 +02:00
parent c3ae063112
commit 6e8632770c

View File

@@ -13,6 +13,17 @@
<link href="{{ SITEURL }}/{{ FAVICON }}" rel="icon">
{% endif %}
{# ColorBox, for photo galleries #}
{% if article %}
{% if article.album %}
{% if COLORBOX_THEME %}
<link rel="stylesheet" href="{{SITEURL}}/theme/css/colorbox.{{ COLORBOX_THEME}}.css" type="text/css" />
{% else %}
<link rel="stylesheet" href="{{SITEURL}}/theme/css/colorbox.css" type="text/css"/>
{% endif %}
{% endif %}
{% endif %}
{# Open Graph tags #}
{% if USE_OPEN_GRAPH is not defined %}
{% set USE_OPEN_GRAPH = True %}
@@ -130,11 +141,11 @@
{% block content %}
{% endblock %}
</div>
{% if not HIDE_SIDEBAR %}
{% if not HIDE_SIDEBAR %}
<div class="col-sm-3 well well-sm" id="sidebar">
{% include 'includes/sidebar.html' %}
</div>
{% endif %}
{% endif %}
</div>
</div>
{% include 'includes/footer.html' %}
@@ -147,6 +158,18 @@
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="{{ SITEURL }}/theme/js/respond.min.js"></script>
{# ColorBox, for photo galleries #}
{% if article %}
{% if article.album %}
<script src="{{SITEURL}}/theme/js/jquery.colorbox-min.js"></script>
<script>
$(document).ready(function(){
$(".{{ article.album }}").colorbox({rel:'{{ article.album }}', {{ COLORBOX_PARAMS }} });
});
</script>
{% endif %}
{% endif %}
{% include 'includes/github-js.html' %}
{% include 'includes/disqus_script.html' %}
{% include 'includes/ga.html' %}