Skip to content

Commit d3cf03a

Browse files
committed
Collapse 'projects' and 'contributing' into sub-menu under new 'community' section
1 parent 5a1b8ae commit d3cf03a

2 files changed

Lines changed: 112 additions & 6 deletions

File tree

_includes/header.html

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,21 @@
1010
<li class="left button">
1111
<a href="{{ site.github.url }}/docs" title="Documentation on how to use ev3dev">Docs</a>
1212
</li>
13-
<li class="left button">
14-
<a href="{{ site.github.url }}/projects" title="List of projects that use ev3dev">Projects Gallery</a>
15-
</li>
16-
<li class="left button">
17-
<a href="{{ site.github.url }}/contributing" title="How to contribute to ev3dev">Contributing</a>
13+
<li class="left button dropdown-button">
14+
<a>
15+
Community
16+
<div class="nav-dropdown-arrow">
17+
18+
</div>
19+
</a>
20+
<ul class="button-dropdown">
21+
<li>
22+
<a href="{{ site.github.url }}/projects" title="List of projects that use ev3dev">Projects Gallery</a>
23+
</li>
24+
<li>
25+
<a href="{{ site.github.url }}/contributing" title="How to contribute to ev3dev">Contributing</a>
26+
</li>
27+
</ul>
1828
</li>
1929
<!-- items below float right, so appear in reverse order -->
2030
<li class="right header-box" id="search-li">

stylesheets/styles.css

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,66 @@ dt {
969969
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 1px 0px rgba(0, 0, 0, 0);
970970
}
971971

972+
.button .button-dropdown {
973+
top: -20px;
974+
opacity: 0;
975+
976+
transition: all 100ms ease-in-out;
977+
transition-property: opacity, top, visibility;
978+
transition-delay: 1ms;
979+
980+
padding: 5px 35px 5px 10px;
981+
width: 100px;
982+
position: relative;
983+
color: #efefef;
984+
background: #191919;
985+
-moz-border-radius: 2px;
986+
-webkit-border-radius: 2px;
987+
-o-border-radius: 2px;
988+
-ms-border-radius: 2px;
989+
-khtml-border-radius: 2px;
990+
border-radius: 2px;
991+
border: 1px solid #121212;
992+
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
993+
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
994+
-o-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
995+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
996+
}
997+
998+
.button.dropdown-button > a {
999+
width: 120px;
1000+
visibility: visible !important;
1001+
}
1002+
1003+
.button .button-dropdown a {
1004+
width: 100%;
1005+
}
1006+
1007+
.button.dropdown-button {
1008+
visibility: hidden;
1009+
cursor: pointer;
1010+
}
1011+
1012+
.button.dropdown-button:hover {
1013+
visibility: visible;
1014+
}
1015+
1016+
.button:hover .button-dropdown {
1017+
opacity: 1;
1018+
top: 0;
1019+
}
1020+
1021+
.nav-dropdown-arrow {
1022+
float: right;
1023+
width: 0;
1024+
height: 0;
1025+
border: 4px solid transparent;
1026+
border-top-color: white;
1027+
margin-top: 7px;
1028+
margin-bottom: -4px;
1029+
margin-left: 4px;
1030+
}
1031+
9721032
.nav-menu {
9731033
list-style: none;
9741034
display: none;
@@ -1209,14 +1269,20 @@ section #title p {
12091269

12101270
}
12111271

1212-
@media print, screen and (max-width: 760px) {
1272+
@media print, screen and (max-width: 650px) {
12131273

12141274
#search-li {
12151275
display: none;
12161276
}
12171277

12181278
}
12191279

1280+
@media print, screen and (min-width: 591px) {
1281+
#header {
1282+
height: 60px !important;
1283+
}
1284+
}
1285+
12201286
@media print, screen and (max-width: 590px) {
12211287
#header {
12221288
margin: -20px auto 0 auto;
@@ -1264,6 +1330,36 @@ section #title p {
12641330
#header.mobile-hidden nav .button {
12651331
display: none;
12661332
}
1333+
1334+
.button.dropdown-button {
1335+
visibility: visible;
1336+
}
1337+
1338+
.button.dropdown-button > a {
1339+
display: none;
1340+
}
1341+
1342+
.button .button-dropdown {
1343+
transition: none;
1344+
1345+
opacity: 1;
1346+
1347+
background-color: transparent;
1348+
padding: 0;
1349+
width: 100%;
1350+
position: static;
1351+
-moz-border-radius: 0;
1352+
-webkit-border-radius: 0;
1353+
-o-border-radius: 0;
1354+
-ms-border-radius: 0;
1355+
-khtml-border-radius: 0;
1356+
border-radius: 0;
1357+
border: none;
1358+
-moz-box-shadow: none;
1359+
-webkit-box-shadow: none;
1360+
-o-box-shadow: none;
1361+
box-shadow: none;
1362+
}
12671363
}
12681364

12691365
:target {

0 commit comments

Comments
 (0)