fix: mobile header multi-lang

This commit is contained in:
Changkun Ou
2019-07-09 16:13:38 +02:00
parent 475d6359ed
commit 942dd4b528
2 changed files with 13 additions and 5 deletions

View File

@@ -23,10 +23,17 @@
</head>
<body class="<%- isIndex ? '' : 'docs' -%>">
<div id="mobile-bar" data-bg-text="高速上手 C++ 11/14/17/20" <%- isIndex ? 'class="top"' : '' %>>
<a class="menu-button"></a>
<a class="logo" href="/modern-cpp/"></a>
</div>
<% if (page.type == 'book-en-us') { %>
<div id="mobile-bar" data-bg-text="C++ 11/14/17/20 On the Fly" <%- isIndex ? 'class="top"' : '' %>>
<a class="menu-button"></a>
<a class="logo" href="/modern-cpp/"></a>
</div>
<% } else {%>
<div id="mobile-bar" data-bg-text="高速上手 C++ 11/14/17/20" <%- isIndex ? 'class="top"' : '' %>>
<a class="menu-button"></a>
<a class="logo" href="/modern-cpp/"></a>
</div>
<% } %>
<%- partial('partials/header') %>
<% if (!isIndex) { %>
<div id="main" class="fix-sidebar">

View File

@@ -125,6 +125,7 @@ body.docs
z-index: 100
display: none
box-shadow: 0 0 2px rgba(0,0,0,.25)
font-size: 0.9em
.menu-button
position: absolute
width: 24px
@@ -137,7 +138,7 @@ body.docs
position: absolute
width: 25px
height: 30px
background: url(../assets/cover-2nd.png) center center no-repeat
background: url(../assets/cover-2nd-en.png) center center no-repeat
background-size: auto 100%
top: 12px
right: 12px