Skip to content

Commit

Permalink
Use baguettebox.js in the base theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Alsina committed May 22, 2017
1 parent a9cdcac commit 93f1119
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nikola/data/themes/base/bundles
@@ -1,2 +1,2 @@
assets/css/all.css=rst.css,code.css,theme.css
assets/css/all-nocdn.css=rst.css,code.css,theme.css
assets/css/all-nocdn.css=rst.css,code.css,theme.css,baguetteBox.min.css
6 changes: 6 additions & 0 deletions nikola/data/themes/base/templates/base.tmpl
Expand Up @@ -20,7 +20,13 @@ ${template_hooks['extra_head']()}
${footer.html_footer()}
</div>
${base.late_load_js()}
% if use_cdn:
<script src="//cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.2/baguetteBox.min.js"></script>
% else:
<script src="/assets/js/baguetteBox.min.js"></script>
% endif
<%block name="extra_js"></%block>
<script>baguetteBox.run('a.reference');</script>
${body_end}
${template_hooks['body_end']()}
</body>
Expand Down
2 changes: 2 additions & 0 deletions nikola/data/themes/base/templates/base_helper.tmpl
Expand Up @@ -75,11 +75,13 @@ lang="${lang}">
<%def name="html_stylesheets()">
%if use_bundles:
%if use_cdn:
<link href="//cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.2/baguetteBox.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/all.css" rel="stylesheet" type="text/css">
%else:
<link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
%endif
%else:
<link href="/assets/css/baguetteBox.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
<link href="/assets/css/theme.css" rel="stylesheet" type="text/css">
Expand Down
1 change: 1 addition & 0 deletions nikola/data/themes/base/templates/gallery.tmpl
Expand Up @@ -96,6 +96,7 @@ flowr(document.querySelectorAll("#gallery_container")[0], {
}
}
});
baguetteBox.run('#gallery_container');
</script>
</%block>

0 comments on commit 93f1119

Please sign in to comment.