Skip to content

Commit ccc1547

Browse files
authored
Merge pull request creativecommons#830 from Dev-JoyA/feature/enhance-mobile-menu-to0match-design-system
Align the navbar to meet the design system requirement
2 parents bb6809a + c1f16b7 commit ccc1547

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

assets/static/vocabulary/css/vocabulary.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ EX:
4343
/* typography */
4444

4545
body {
46-
display: grid;
46+
/* display: grid;
4747
grid-template-columns: 5% 3% 6% 6% 15% 30% 15% 6% 6% 3% 5%;
48-
overflow-x: hidden;
48+
overflow-x: hidden; */
4949

5050
font-weight: 400;
5151
-moz-osx-font-smoothing: grayscale;

themes/vocabulary_theme/templates/layout.html

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

webpack/sass/main.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,35 @@ pre {
160160
left: auto;
161161
}
162162
}
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)