Skip to content

Commit

Permalink
Improve the menu on mobile (#10386)
Browse files Browse the repository at this point in the history
* Improve the menu on mobile

* Use a grid to render two rows with three columns.

* Update snapshot
  • Loading branch information
p0psicles authored Mar 3, 2022
1 parent 9387e16 commit dc0de97
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
25 changes: 24 additions & 1 deletion themes-default/slim/src/components/app-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<app-link class="navbar-brand" href="home/" title="Medusa"><img alt="Medusa" src="images/medusa.png" style="height: 50px;" class="img-responsive pull-left"></app-link>
</div>
<div v-if="isAuthenticated" class="collapse navbar-collapse" id="main_nav">
<ul class="nav navbar-nav navbar-right">
<ul class="nav navbar-nav navbar-right navbar-mobile">
<li id="NAVhome" class="navbar-split dropdown" :class="{ active: topMenu === 'home' }">
<app-link class="dropdown-toggle" aria-haspopup="true" data-toggle="dropdown" data-hover="dropdown"><span>Shows</span>
<b class="caret" />
Expand Down Expand Up @@ -320,4 +320,27 @@ export default {
text-decoration: none;
color: white;
}
@media (max-width: 767px) {
.navbar-fixed-top .navbar-collapse {
max-height: 100%;
}
.navbar-mobile > li {
text-align: center;
}
.navbar-mobile::before {
position: absolute;
}
.navbar-mobile {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
.navbar-mobile #NAVsystem > ul {
transform: translateX(-6rem);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports[`AppHeader.test.js renders 1`] = `
id="main_nav"
>
<ul
class="nav navbar-nav navbar-right"
class="nav navbar-nav navbar-right navbar-mobile"
>
<li
class="navbar-split dropdown active"
Expand Down
4 changes: 2 additions & 2 deletions themes/dark/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions themes/light/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

0 comments on commit dc0de97

Please sign in to comment.