Skip to content

Commit 5fad4df

Browse files
committed
reorganize main menu
1 parent 6a5b011 commit 5fad4df

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<li class="nav-dropdown-container learn">
2+
<a class="nav-link<%- page.path.match(/(guide(?!\/team.html$)|api|examples|cookbook)/) ? ' current' : '' %>">Learn</a><span class="arrow"></span>
3+
<ul class="nav-dropdown">
4+
<li><ul>
5+
<li><a href="<%- url_for("/v2/guide/") %>" class="nav-link<%- page.path.match(/guide/) ? ' current' : '' %>">Guide</a></li>
6+
<li><a href="<%- url_for("/v2/api/") %>" class="nav-link<%- page.path.match(/api/) ? ' current' : '' %>">API</a></li>
7+
<li><a href="<%- url_for("/v2/examples/") %>" class="nav-link<%- page.path.match(/examples/) ? ' current' : '' %>">Examples</a></li>
8+
</ul></li>
9+
</ul>
10+
</li>

themes/vue/layout/partials/main_menu.ejs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
<input type="text" id="search-query-<%- context %>" class="search-query st-default-search-input">
44
</form>
55
</li>
6-
<li><a href="<%- url_for("/v2/guide/") %>" class="nav-link<%- page.path.match(/guide/) ? ' current' : '' %>">Guide</a></li>
7-
<li><a href="<%- url_for("/v2/api/") %>" class="nav-link<%- page.path.match(/api/) ? ' current' : '' %>">API</a></li>
8-
<li><a href="<%- url_for("/v2/examples/") %>" class="nav-link<%- page.path.match(/examples/) ? ' current' : '' %>">Examples</a></li>
6+
<%- partial('partials/learn_dropdown') %>
97
<%- partial('partials/ecosystem_dropdown') %>
10-
<%- partial('partials/language_dropdown') %>
118
<li>
12-
<a href="https://vue.threadless.com" target="_blank" class="nav-link shop">Shop</a>
9+
<a href="<%- url_for("/v2/guide/team.html") %>" class="nav-link team<%- page.path.match(/team\.html/) ? ' current' : '' %>">Team</a>
1310
</li>
11+
<%- partial('partials/support_vue_dropdown') %>
12+
<%- partial('partials/language_dropdown') %>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<li class="nav-dropdown-container support-vue">
2+
<a class="nav-link">Support Vue</a><span class="arrow"></span>
3+
<ul class="nav-dropdown">
4+
<li><ul>
5+
<li><a href="https://vue.threadless.com" target="_blank" class="nav-link">Shop</a></li>
6+
<li><a href="https://opencollective.com/vuejs" target="_blank" class="nav-link">Support Us on OpenCollective</a></li>
7+
<li><a href="https://www.patreon.com/evanyou" target="_blank" class="nav-link">Support Evan on Patreon</a></li>
8+
</ul></li>
9+
</ul>
10+
</li>

themes/vue/source/css/_common.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ a.button
115115
cursor: pointer
116116
.nav-dropdown-container
117117
.nav-link
118-
&:hover
118+
&:hover:not(.current)
119119
border-bottom: none
120120
&:hover
121121
.nav-dropdown
122122
display: block
123-
&.language
123+
&.language, &.ecosystem
124124
margin-left: 20px
125125
.arrow
126126
pointer-events: none

themes/vue/source/css/_header.styl

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,26 @@ body.docs
3535
padding-bottom: 3px
3636
&:hover, &.current
3737
border-bottom: 3px solid $green
38-
&.shop
38+
&.team
3939
margin-left: 10px
4040

41+
.nav-dropdown
42+
.nav-link
43+
&:hover, &.current
44+
border-bottom: none
45+
&.current
46+
&::after
47+
content: ''
48+
width: 0
49+
height: 0
50+
border-left: 5px solid $green
51+
border-top: 3px solid transparent
52+
border-bottom: 3px solid transparent
53+
position: absolute;
54+
top: 50%;
55+
margin-top: -4px;
56+
left: 8px;
57+
4158
.new-label
4259
position: absolute
4360
top: 3px

0 commit comments

Comments
 (0)