mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
Implement fluidbox into base template
Updated main CSS and base template to enable posts with images be able to apply a fancy lightbox overlay when clicked
This commit is contained in:
parent
5fcab86bab
commit
fcfa9328eb
2 changed files with 24 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -26,6 +26,7 @@
|
|||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css">
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/fluidbox.css">
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
|
|
@ -46,6 +47,25 @@
|
|||
|
||||
<script src="{{ SITEURL }}/theme/js/jquery.min.js"></script>
|
||||
<script src="{{ SITEURL }}/theme/js/bootstrap.min.js"></script>
|
||||
<script src="{{ SITEURL }}/theme/js/jquery.fluidbox.min.js"></script>
|
||||
<script>
|
||||
$('.full-post a[data-fluidbox]').fluidbox();
|
||||
// Trigger recomputing on Flexbox items, sometimes buggy width calculations due to browser recomputation of flex items
|
||||
$('.cols').each(function() {
|
||||
var a = [],
|
||||
$f = $(this).find('a.fluidbox');
|
||||
|
||||
$f.find('img').each(function() {
|
||||
var i = $.Deferred();
|
||||
$(this).load(i.resolve).error(i.resolve);
|
||||
a.push(i);
|
||||
});
|
||||
|
||||
$.when.apply(null, a).done(function() {
|
||||
$f.trigger('recompute');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body> <!-- 42 -->
|
||||
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue