1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-26 18:21:02 +00:00

Extract Materialize Sidenav controller

This commit is contained in:
Yassine Guedidi 2025-03-01 00:05:31 +01:00
parent 66c6a25941
commit 1f76184d02
5 changed files with 29 additions and 15 deletions

View file

@ -39,8 +39,6 @@ import './js/shortcuts/entry';
/* Theme style */
import './scss/index.scss';
const mobileMaxWidth = 993;
/* ==========================================================================
Annotations & Remember position
========================================================================== */
@ -274,11 +272,6 @@ const articleScroll = () => {
};
$(document).ready(() => {
// sidenav
document.querySelectorAll('.sidenav').forEach((element) => {
$(element).sidenav({ edge: element.getAttribute('data-edge') ?? 'left' });
});
$('select').formSelect();
$('.collapsible[data-collapsible="accordion"]').collapsible();
$('.collapsible[data-collapsible="expandable"]').collapsible({
@ -309,9 +302,6 @@ $(document).ready(() => {
$('#nav-btn-add-tag').on('click', () => {
$('.nav-panel-add-tag').toggle();
$('.nav-panel-menu').addClass('hidden');
if (window.innerWidth < mobileMaxWidth) {
$('.sidenav').sidenav('close');
}
$('#tag_label').focus();
return false;
});