Sticky nav on entry action button click

This commit is contained in:
Simounet 2020-01-19 12:50:08 +01:00
parent 996b2ec170
commit cfd77d1c2a
No known key found for this signature in database
GPG Key ID: 77D3B7DC794EB770
5 changed files with 17 additions and 4 deletions

View File

@ -131,6 +131,11 @@ nav {
display: none;
}
.entry-nav-top--sticky {
position: sticky;
top: 0;
}
@media (min-width: 993px) {
.button-collapse {
display: none;

View File

@ -17,6 +17,13 @@ import './js/shortcuts/entry';
/* Theme style */
import './css/index.scss';
const stickyNav = () => {
const nav = $('.js-entry-nav-top');
$('[data-toggle="actions"]').click(() => {
nav.toggleClass('entry-nav-top--sticky');
});
};
$(document).ready(() => {
// sideNav
$('.button-collapse').sideNav();
@ -36,6 +43,7 @@ $(document).ready(() => {
initFilters();
initExport();
initRandom();
stickyNav();
const toggleNav = (toShow, toFocus) => {
$('.nav-panel-actions').hide(100);

View File

@ -8,7 +8,7 @@
<div class="progress">
<div class="determinate"></div>
</div>
<nav class="hide-on-large-only">
<nav class="hide-on-large-only js-entry-nav-top">
<div class="nav-panel-item cyan darken-1">
<ul>
<li>
@ -281,7 +281,7 @@
</article>
<div class="fixed-action-btn horizontal click-to-toggle hide-on-large-only">
<a class="btn-floating btn-large">
<a class="btn-floating btn-large" data-toggle="actions">
<i class="material-icons">menu</i>
</a>
<ul>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long