(function($){
$('.article img:not(".not-gallery-item")').each(function () {
// wrap images with link and add caption if possible
if ($(this).parent('a').length === 0) {
$(this).wrap('');
if (this.alt) {
$(this).after('
' + this.alt + '
');
}
}
});
if (typeof(moment) === 'function') {
$('.article-meta time').each(function () {
$(this).text(moment($(this).attr('datetime')).fromNow());
});
}
function adjustNavbar() {
const navbarWidth = $('.navbar-main .navbar-start').outerWidth() + $('.navbar-main .navbar-end').outerWidth();
if ($(document).outerWidth() < navbarWidth) {
$('.navbar-main .navbar-menu').addClass('is-flex-start');
} else {
$('.navbar-main .navbar-menu').removeClass('is-flex-start');
}
}
adjustNavbar();
$(window).resize(adjustNavbar);
})(jQuery);