Skip to content

Commit 127df6c

Browse files
authoredJul 18, 2020
Hide dropdown on mobile screen (#48)
* hide dropdown on small screen * change height of dropdown
1 parent dc502ba commit 127df6c

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed
 

‎_includes/header.html

+8-15
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,15 @@
1212
</svg>
1313
</a>
1414

15-
<label for="category-selector">Category:</label>
16-
<select class="category-dropdown" name="category-selector" onChange="location.href=value;">
17-
{% for category in site.data.plugins %}
18-
<option value="#{{ category.id }}">{{ category.name }}</option>
19-
{% endfor %}
20-
</select>
21-
22-
<div class="trigger">
23-
<!--
24-
{% for page in site.pages %}
25-
{% if page.title %}
26-
<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
27-
{% endif %}
28-
{% endfor %}
29-
-->
15+
<div class="dropdown">
16+
<label for="category-selector" class="category-dropdown-label">Category:</label>
17+
<select class="category-dropdown" name="category-selector" onChange="location.href=value;">
18+
{% for category in site.data.plugins %}
19+
<option value="#{{ category.id }}">{{ category.name }}</option>
20+
{% endfor %}
21+
</select>
3022
</div>
23+
3124
</nav>
3225

3326
</div>

‎_sass/_layout.scss

+7-2
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,18 @@
231231
}
232232

233233
.category-dropdown {
234-
width: 200px;
234+
width: 60%;
235235
height: 40px;
236236
border-color: rgb(235, 230, 230);
237237
font-size: 15px;
238-
position: relative;
239238
}
240239

240+
@media screen and (max-width: 600px) {
241+
.dropdown {
242+
display: none;
243+
}
244+
}
245+
241246
html {
242247
scroll-behavior: smooth;
243248
}

0 commit comments

Comments
 (0)
Please sign in to comment.