Skip to content

Commit 942dd4b

Browse files
committed
fix: mobile header multi-lang
1 parent 475d635 commit 942dd4b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

website/themes/moderncpp/layout/layout.ejs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@
2323

2424
</head>
2525
<body class="<%- isIndex ? '' : 'docs' -%>">
26-
<div id="mobile-bar" data-bg-text="高速上手 C++ 11/14/17/20" <%- isIndex ? 'class="top"' : '' %>>
27-
<a class="menu-button"></a>
28-
<a class="logo" href="/modern-cpp/"></a>
29-
</div>
26+
<% if (page.type == 'book-en-us') { %>
27+
<div id="mobile-bar" data-bg-text="C++ 11/14/17/20 On the Fly" <%- isIndex ? 'class="top"' : '' %>>
28+
<a class="menu-button"></a>
29+
<a class="logo" href="/modern-cpp/"></a>
30+
</div>
31+
<% } else {%>
32+
<div id="mobile-bar" data-bg-text="高速上手 C++ 11/14/17/20" <%- isIndex ? 'class="top"' : '' %>>
33+
<a class="menu-button"></a>
34+
<a class="logo" href="/modern-cpp/"></a>
35+
</div>
36+
<% } %>
3037
<%- partial('partials/header') %>
3138
<% if (!isIndex) { %>
3239
<div id="main" class="fix-sidebar">

website/themes/moderncpp/source/modern-cpp/css/_header.styl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ body.docs
125125
z-index: 100
126126
display: none
127127
box-shadow: 0 0 2px rgba(0,0,0,.25)
128+
font-size: 0.9em
128129
.menu-button
129130
position: absolute
130131
width: 24px
@@ -137,7 +138,7 @@ body.docs
137138
position: absolute
138139
width: 25px
139140
height: 30px
140-
background: url(../assets/cover-2nd.png) center center no-repeat
141+
background: url(../assets/cover-2nd-en.png) center center no-repeat
141142
background-size: auto 100%
142143
top: 12px
143144
right: 12px

0 commit comments

Comments
 (0)