mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-04-24 03:55:10 +08:00
fix language bar truncating long list of langs (#1266)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
//= 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'));
|
||||
@@ -10,6 +15,11 @@ $(function() {
|
||||
window.recacheHeights();
|
||||
window.refreshToc();
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
adjustLanguageSelectorWidth();
|
||||
});
|
||||
adjustLanguageSelectorWidth();
|
||||
});
|
||||
|
||||
window.onpopstate = function() {
|
||||
|
||||
Reference in New Issue
Block a user