Skip to content

Commit

Permalink
offset modals on navbar show
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Jan 22, 2025
1 parent 052b764 commit 66a772f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/modals.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
border-radius: 10px;
background-color: rgb(255 255 255 / 90%);

/* Todo: Looks cool, but slows down browsers */
/* backdrop-filter: blur(3px); */

/* Todo: Looks cool, but slows down browsers */
z-index: 1000;
padding: 1.5em 1em 1.5em 1.5em;
border: 1px solid #ccc;
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/controllers/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class extends Controller {
toggleNavigation (event) {
if (document.querySelector('#map-header').style.display === 'none') {
functions.e('#map-header', e => { e.style.display = 'block' })
functions.e('.map-modal', e => { e.style.top = '4em' })
functions.e('#map-nav-toggle', e => {
e.classList.remove('bi-caret-down')
e.classList.add('bi-caret-up')
Expand All @@ -20,6 +21,7 @@ export default class extends Controller {
animateElement('.navbar', 'fade-down')
} else {
functions.e('#map-header', e => { e.style.display = 'none' })
functions.e('.map-modal', e => { e.style.top = '0' })
functions.e('#map-nav-toggle', e => {
e.classList.remove('bi-caret-up')
e.classList.add('bi-caret-down')
Expand Down

0 comments on commit 66a772f

Please sign in to comment.