xaoxuu 6 years ago
parent 881c73803b
commit 4064a6accf
  1. 1
      layout/_partial/header.ejs
  2. 20
      source/less/_header.less

@ -50,6 +50,7 @@
</div> </div>
</header> </header>
<aside class="menu-phone"> <aside class="menu-phone">
<div class="header"><%=config.title%></div>
<nav> <nav>
<% (config.materialx && config.materialx.nav_menu && (config.materialx.nav_menu||[]) || (theme.materialx.nav_menu||[])).forEach(function(value, key) { <% (config.materialx && config.materialx.nav_menu && (config.materialx.nav_menu||[]) || (theme.materialx.nav_menu||[])).forEach(function(value, key) {
if (value.url && value.slug && value.name) { %> if (value.url && value.slug && value.name) { %>

@ -175,28 +175,36 @@
} }
.menu-phone{ .menu-phone{
.header{
border-top-left-radius: @border-radius-width;
border-top-right-radius: @border-radius-width;
background-color: fade(@theme-bg-header,90%);
color: @theme-text-in-header;
font-size: @base-font-size;
line-height: 1.8em;
padding: 8px @gap;
}
width: @side-width;
position: fixed; position: fixed;
top: @header-height + @gap; top: @header-height + @gap;
right: 0; right: 0;
width: 180px; width: @side-width;
z-index:9999 + 1; z-index:9999 + 1;
padding: @gap/2 0px;
line-height: 2 * @gap; line-height: 2 * @gap;
background: white; background: white;
// border: 1px solid #e6e7e6;
border-right: 0; border-right: 0;
&:extend(.z-depth-main); &:extend(.z-depth-main-raised);
border-radius: @border-radius-width; border-radius: @border-radius-width;
transform: translate3d(180px, -0, 0); transform: translate3d(@side-width, -0, 0);
.enable-trans(); .enable-trans();
&:hover { &:hover {
&:extend(.z-depth-main-raised); &:extend(.z-depth-main-raised);
} }
&:active { &:active {
// box-shadow: 0 1.5px 3px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
} }
nav { nav {
padding: @gap/2 0px;
.nav { .nav {
position: relative; position: relative;
display: block; display: block;

Loading…
Cancel
Save