1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

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; display: none;
} }
.entry-nav-top--sticky {
position: sticky;
top: 0;
}
@media (min-width: 993px) { @media (min-width: 993px) {
.button-collapse { .button-collapse {
display: none; display: none;

View file

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

View file

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long