diff --git a/layout/common/scripts.jsx b/layout/common/scripts.jsx index a356020..0339842 100644 --- a/layout/common/scripts.jsx +++ b/layout/common/scripts.jsx @@ -34,6 +34,7 @@ module.exports = class extends Component { {clipboard ? : null} + ; diff --git a/source/js/animation.js b/source/js/animation.js index f147d8b..50c7c3f 100644 --- a/source/js/animation.js +++ b/source/js/animation.js @@ -3,12 +3,6 @@ return Array.prototype.slice.call(document.querySelectorAll.apply(document, arguments)); } - if ($('.columns .column-right').length && $('.columns .column-right-shadow').length && !$('.columns .column-right-shadow')[0].children.length) { - for (const child of $('.columns .column-right')[0].children) { - $('.columns .column-right-shadow')[0].append(child.cloneNode(true)); - } - } - $('body > .navbar, body > .section, body > .footer').forEach(element => { element.style.transition = '0s'; element.style.opacity = '0'; diff --git a/source/js/column.js b/source/js/column.js new file mode 100644 index 0000000..a39d8aa --- /dev/null +++ b/source/js/column.js @@ -0,0 +1,12 @@ +(function() { + function $() { + return Array.prototype.slice.call(document.querySelectorAll.apply(document, arguments)); + } + + // copy widgets in the right column, when exist, to the bottom of the left column + if ($('.columns .column-right').length && $('.columns .column-right-shadow').length && !$('.columns .column-right-shadow')[0].children.length) { + for (const child of $('.columns .column-right')[0].children) { + $('.columns .column-right-shadow')[0].append(child.cloneNode(true)); + } + } +}()); diff --git a/source/js/main.js b/source/js/main.js index 3efa91f..7f46128 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -20,10 +20,6 @@ $('.justified-gallery').justifiedGallery(); } - if (!$('.columns .column-right-shadow').children().length) { - $('.columns .column-right-shadow').append($('.columns .column-right').children().clone()); - } - if (typeof moment === 'function') { $('.article-meta time').each(function() { $(this).text(moment($(this).attr('datetime')).fromNow());