Skip to content

Commit 493a1b8

Browse files
author
Roberto Alsina
committedDec 26, 2017
backport islink support to base theme, re-jinjify
1 parent 2f4e64c commit 493a1b8

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed
 

‎nikola/data/themes/base-jinja/templates/base.tmpl

+8-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@
2626
<script src="/assets/js/baguetteBox.min.js"></script>
2727
{% endif %}
2828
{% block extra_js %}{% endblock %}
29-
<script>baguetteBox.run('a.reference', {
29+
<script>
30+
baguetteBox.run('a.reference:not(.islink)', {
3031
captions: function(element) {
3132
return element.getElementsByTagName('img')[0].alt;
32-
}});</script>
33+
}});
34+
baguetteBox.run('img:not(.islink)', {
35+
captions: function(element) {
36+
return element.alt;
37+
}});
38+
</script>
3339
{{ body_end }}
3440
{{ template_hooks['body_end']() }}
3541
</body>

‎nikola/data/themes/base/templates/base.tmpl

+8-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ ${template_hooks['extra_head']()}
2626
<script src="/assets/js/baguetteBox.min.js"></script>
2727
% endif
2828
<%block name="extra_js"></%block>
29-
<script>baguetteBox.run('a.reference', {
29+
<script>
30+
baguetteBox.run('a.reference:not(.islink)', {
3031
captions: function(element) {
3132
return element.getElementsByTagName('img')[0].alt;
32-
}});</script>
33+
}});
34+
baguetteBox.run('img:not(.islink)', {
35+
captions: function(element) {
36+
return element.alt;
37+
}});
38+
</script>
3339
${body_end}
3440
${template_hooks['body_end']()}
3541
</body>

‎nikola/data/themes/bootstrap3-jinja/templates/base.tmpl

+8-2
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,16 @@
8787
</script>
8888
<!-- end fancy dates -->
8989
{% block extra_js %}{% endblock %}
90-
<script>baguetteBox.run('a.reference', {
90+
<script>
91+
baguetteBox.run('a.reference:not(.islink)', {
9192
captions: function(element) {
9293
return element.getElementsByTagName('img')[0].alt;
93-
}});</script>
94+
}});
95+
baguetteBox.run('img:not(.islink)', {
96+
captions: function(element) {
97+
return element.alt;
98+
}});
99+
</script>
94100
{{ body_end }}
95101
{{ template_hooks['body_end']() }}
96102
</body>

‎nikola/data/themes/bootstrap3-jinja/templates/gallery.tmpl

+4-2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ $("#gallery_container").flowr({
9696
}
9797
}
9898
});
99-
$('a.image-reference[href="'+window.location.hash.substring(1,1000)+'"]').click();
100-
</script>
99+
baguetteBox.run('#gallery_container', {
100+
captions: function(element) {
101+
return element.getElementsByTagName('img')[0].alt;
102+
}});</script>
101103
{% endblock %}

0 commit comments

Comments
 (0)
Please sign in to comment.