Skip to content

Commit 4d6b22e

Browse files
committed
Added necessary changes for mobile menu
1 parent 47fc58d commit 4d6b22e

File tree

2 files changed

+35
-72
lines changed

2 files changed

+35
-72
lines changed

themes/vocabulary_theme/templates/layout.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@
5656
</svg>
5757
</a>
5858
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
59+
<!-- <span aria-hidden="true"></span>
5960
<span aria-hidden="true"></span>
60-
<span aria-hidden="true"></span>
61-
<span aria-hidden="true"></span>
61+
<span aria-hidden="true"></span> -->
62+
MENU
6263
</a>
6364
</div>
6465
<div class="navbar-menu">

webpack/sass/main.scss

Lines changed: 32 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -106,76 +106,6 @@ pre {
106106
}
107107
}
108108

109-
//Adjusting and properly aligning the Navbar
110-
.navbar {
111-
display: flex !important;
112-
justify-content: space-between !important;
113-
align-items: center;
114-
width: 100% !important;
115-
padding: 1rem;
116-
position: relative;
117-
z-index: 1;
118-
}
119-
120-
.navbar-brand{
121-
width: 100% !important;
122-
}
123-
124-
125-
.navbar-burger {
126-
margin-left: auto !important;
127-
cursor: pointer;
128-
display: inline-block;
129-
height: 2.25rem;
130-
width: 2.25rem;
131-
position: relative;
132-
}
133-
134-
.navbar-burger span {
135-
background-color: currentColor;
136-
display: block;
137-
height: 2px;
138-
width: 24px;
139-
margin: 5px auto;
140-
transition: background-color 0.3s ease-in-out;
141-
}
142-
143-
144-
.navbar-burger.is-active span {
145-
background-color: red;
146-
}
147-
148-
149-
.navbar-menu {
150-
display: none;
151-
flex-direction: column;
152-
position: absolute;
153-
top: 100%;
154-
right: 0;
155-
background-color: white;
156-
157-
}
158-
159-
160-
.navbar-menu.is-active {
161-
display: flex;
162-
margin-bottom: 5rem;
163-
}
164-
165-
166-
.navbar-end {
167-
display: flex;
168-
flex-direction: column;
169-
170-
}
171-
172-
.navbar-item {
173-
padding: 1rem;
174-
width: 100%;
175-
text-align: center;
176-
}
177-
178-
179109
// Breadcrumb
180110
.breadcrumb-container {
181111
border-top: 4px solid $color-forest-green;
@@ -230,3 +160,35 @@ pre {
230160
left: auto;
231161
}
232162
}
163+
164+
@media screen and (max-width: 780px){
165+
.navbar-item, .navbar-item a{
166+
border-top: 1px solid rgba(212, 210, 210, 0.945);
167+
padding-top: 1rem;
168+
padding-bottom: 1rem;
169+
}
170+
171+
.navbar-burger{
172+
cursor: pointer;
173+
display: block;
174+
background-color: #ebeeee;
175+
padding: 0.5rem 0.2rem 0rem ;
176+
font-weight: 900;
177+
font-size: 20px;
178+
color: rgb(64, 60, 60);
179+
margin: 5px auto;
180+
// align-items: center;
181+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
182+
transition: background-color 0.3s ease-in-out;
183+
min-width: 100px;
184+
text-align: center;
185+
line-height: 1;
186+
border-radius: 2%;;
187+
}
188+
189+
.navbar-brand {
190+
display: flex;
191+
justify-content: space-between;
192+
}
193+
}
194+

0 commit comments

Comments
 (0)