Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions themes/zendapi/layout/_partial/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,23 @@ let menuItems = site.data.category;
</div>
<div class="uk-navbar-right">
<ul class="uk-navbar-nav uk-visible@m">

<%
for(let index in menuItems) {
%>
<li><a href="<%- menuItems[index].url %>"><%- menuItems[index].name %></a></li>
<%
}
%>
<li>
<a href="#">多语言<span class="uk-margin-small-right" uk-icon="icon: triangle-down"></span></a>
<div class="uk-navbar-dropdown">
<ul class="uk-nav uk-navbar-dropdown-nav">
<li><a href="http://www.zendapi.org/">中文</a></li>
<li><a href="http://en.zendapi.org/">English</a></li>
</ul>
</div>
</li>
</ul>
<ul class="uk-navbar-nav uk-hidden@m">
<li><button class="nav-menu" data-uk-icon="icon: menu" uk-toggle="target: #offcanvas-push"></button></li>
Expand Down
7 changes: 7 additions & 0 deletions themes/zendapi/layout/_partial/inject_site_menu.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ let menuItems = site.data.category;
%>
<li class="uk-width-1-1"><a href = "<%- url %>"><%- name %></a></li>
<% } %>
<li class="uk-parent">
<a href="#">多语言</a>
<ul class="uk-nav-sub">
<li><a href="http://www.zendapi.org/">中文</a></li>
<li><a href="http://en.zendapi.org/">English</a></li>
</ul>
</li>
</ul>
16 changes: 16 additions & 0 deletions themes/zendapi/source/statics/css/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ a:hover {
}
ul {
padding-left: 0;
margin-bottom: 0px;
}
li.uk-parent {
height: auto;
}
ul.uk-nav-sub {
padding-left: 15px;
}
li {
list-style-type: none;
Expand Down Expand Up @@ -256,6 +263,15 @@ li {
transition-property: border-bottom-color;
}
}
.uk-navbar-dropdown {
a {
line-height: 14px;
&:hover {
color: $zapi-base-color;
}
}
padding: 8px;
}
.nav-menu {
color: #dddddd!important;
width:20px;
Expand Down