SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit abd949b9 authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Restore (mobile) menu structure

parent 25b984c2
No related branches found
No related tags found
No related merge requests found
...@@ -80,29 +80,19 @@ nav.submenu { ...@@ -80,29 +80,19 @@ nav.submenu {
border-radius: 0; border-radius: 0;
border-top: 1px solid #fff; border-top: 1px solid #fff;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
overflow-x: scroll;
.item { .item {
padding: 0.1rem 0.5rem; padding: 0 0.5rem;
white-space: nowrap; white-space: nowrap;
display: block; display: block;
border-right: 2px solid #fff;
} }
.item:first-child, .item:first-child,
.item:last-child { .item:last-child {
border-right: 0; border-right: 0;
} }
} }
@media (min-width: 768px) {
nav.submenu {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
.item {
padding-top: 0;
padding-bottom: 0;
display: inline;
border-right: 2px solid #fff;
}
}
}
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
*/ */
.navbar { .navbar {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
display: block; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
overflow-x: scroll;
&.main-nav { &.main-nav {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
...@@ -35,16 +36,18 @@ ...@@ -35,16 +36,18 @@
.highlighted > .nav-link { .highlighted > .nav-link {
background-color: rgba(255, 255, 255, 0.6); background-color: rgba(255, 255, 255, 0.6);
} }
.navbar-nav {
display: flex;
flex-direction: row;
}
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.navbar { .navbar {
display: flex;
.navbar-nav { .navbar-nav {
margin-right: auto; margin-right: auto;
display: flex;
flex-direction: row;
} }
.nav-item { .nav-item {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<nav class="navbar navbar-light main-nav navbar-expand-lg"> <nav class="navbar navbar-light main-nav navbar-expand-lg">
<ul id="menu-navbar" class="navbar-nav collapse"> <ul id="menu-navbar" class="navbar-nav">
<li class="nav-item{% if request.path == '/' %} active{% endif %}"> <li class="nav-item{% if request.path == '/' %} active{% endif %}">
<a href="{% url 'scipost:index' %}" class="nav-link">Home</a> <a href="{% url 'scipost:index' %}" class="nav-link">Home</a>
</li> </li>
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
{% endif %} {% endif %}
</ul> </ul>
<a class="btn btn-block my-2" data-toggle="collapse" href="#menu-navbar" aria-expanded="false" aria-controls="menu-navbar">Show menu <i class="fa fa-angle-down" aria-hidden="true"></i></a>
<form action="{% url 'scipost:search' %}" method="get" class="form-inline search-nav-form"> <form action="{% url 'scipost:search' %}" method="get" class="form-inline search-nav-form">
<input class="form-control" id="id_q" maxlength="100" name="q" type="text" required="required" value="{{search_query|default:''}}"> <input class="form-control" id="id_q" maxlength="100" name="q" type="text" required="required" value="{{search_query|default:''}}">
<input class="btn btn-secondary" type="submit" value="Search"> <input class="btn btn-secondary" type="submit" value="Search">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment