fix(layout): clone right column before plugins
parent
fcc6ec404c
commit
333c1c0fcb
|
@ -34,6 +34,7 @@ module.exports = class extends Component {
|
|||
<script dangerouslySetInnerHTML={{ __html: `moment.locale("${language}");` }}></script>
|
||||
<script dangerouslySetInnerHTML={{ __html: embeddedConfig }}></script>
|
||||
{clipboard ? <script src={cdn('clipboard', '2.0.4', 'dist/clipboard.min.js')} defer={true}></script> : null}
|
||||
<script src={url_for('/js/column.js')}></script>
|
||||
<Plugins site={site} config={config} page={page} helper={helper} head={false} />
|
||||
<script src={url_for('/js/main.js')} defer={true}></script>
|
||||
</Fragment>;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}());
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue