Skip to content

Commit e5b9509

Browse files
committed
website: localize page title and de-underline the landing switcher
The <title> was a fixed Chinese-led bilingual string on every page; branch it on page.type so the English landing announces itself in English. Add text-decoration:none to the anchor switcher so it renders as the button it replaced rather than an underlined link.
1 parent 726fd10 commit e5b9509

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

website/themes/moderncpp/layout/layout.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!DOCTYPE html>
44
<html lang="<%- page.type == 'book-en-us' ? 'en' : 'zh-CN' %>">
55
<head>
6-
<title><%- page.title ? page.title : '' %> 现代 C++ 教程: 高速上手 C++11 C++26 - Modern C++ Tutorial: C++11 to C++26 On the Fly</title>
6+
<title><%- page.title ? page.title + ' - ' : '' %><%- page.type == 'book-en-us' ? 'Modern C++ Tutorial: C++11 to C++26 On the Fly' : '现代 C++ 教程: 高速上手 C++11 C++26' %></title>
77
<meta charset="utf-8">
88
<meta name="description" content="<%- theme.site_description %>">
99
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ body
2727
padding: 90px 40px 0 200px
2828
a.lang-btn
2929
display: inline-block
30+
text-decoration: none
3031
background: transparent
3132
border: 1px solid rgba(126, 45, 54, 0.4)
3233
color: $theme

0 commit comments

Comments
 (0)