Upgrade Slate sample to Slate 2.7.1

Closes gh-693
This commit is contained in:
Andy Wilkinson
2020-09-02 10:56:05 +01:00
parent 536e87acc9
commit 9fa94022d2
40 changed files with 13461 additions and 11622 deletions

View File

@@ -1,3 +1,27 @@
//= require ./lib/_energize
//= require ./app/_lang
//= require ./app/_copy
//= require ./app/_toc
//= require ./app/_lang
function adjustLanguageSelectorWidth() {
const elem = $('.dark-box > .lang-selector');
elem.width(elem.parent().width());
}
$(function() {
loadToc($('#toc'), '.toc-link', '.toc-list-h2', 10);
setupLanguages($('body').data('languages'));
$('.content').imagesLoaded( function() {
window.recacheHeights();
window.refreshToc();
});
$(window).resize(function() {
adjustLanguageSelectorWidth();
});
adjustLanguageSelectorWidth();
});
window.onpopstate = function() {
activateLanguage(getLanguageFromQueryString());
};