Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit20f6a75

Browse files
committed
website: host pdf version to website
Fixchangkun#73
1 parentff2dc60 commit20f6a75

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

‎Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
DOCKER_ENV=changkun/modern-cpp-tutorial:build-env
22
LANGS = zh-cn en-us
3-
ALL_BUILDS =pdfwebsite
3+
ALL_BUILDS = website pdf
44

55
# dep
66

@@ -9,6 +9,8 @@ all: $(ALL_BUILDS)
99
pdf:$(LANGS)
1010
$(LANGS):
1111
cd pdf/$@&& make&& make clean
12+
mkdir -p website/public/modern-cpp/pdf
13+
mv pdf/$@/modern-cpp-tutorial.pdf website/public/modern-cpp/pdf/modern-cpp-tutorial-$@.pdf
1214

1315
website:
1416
cd website&& make

‎README-zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
你可以选择以下几种阅读方式:
2323

2424
1.[GitHub 在线](./book/zh-cn/toc.md)
25-
2.[PDF 文档](./pdf/zh-cn/modern-cpp-tutorial.pdf)
25+
2.[PDF 文档](https://changkun.de/modern-cpp/modern-cpp-tutorial-zh-cn.pdf)
2626
3.[网站](https://changkun.de/modern-cpp/)
2727

2828
##相关代码

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ In addition, The author would like to encourage that readers should be able to u
2525
You can choose from the following reading methods:
2626

2727
-[GitHub Online](./book/en-us/toc.md)
28-
-[PDF document](./pdf/en-us/modern-cpp-tutorial.pdf)
28+
-[PDF document](https://changkun.de/modern-cpp/modern-cpp-tutorial-en-us.pdf)
2929
-[Website](https://changkun.de/modern-cpp)
3030

3131
##Code

‎pdf/en-us/modern-cpp-tutorial.pdf

-1.59 MB
Binary file not shown.

‎pdf/zh-cn/modern-cpp-tutorial.pdf

-2.42 MB
Binary file not shown.

‎website/themes/moderncpp/layout/index.ejs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
</h1>
2222
<h2>第二版</h2>
2323
<p>
24-
<aclass="button white"href="<%- url_for("/modern-cpp/zh-cn/00-preface/") %>">🇨🇳 立即阅读</a>
24+
<aclass="button white"href="<%- url_for("/modern-cpp/zh-cn/00-preface/") %>">🇨🇳 在线阅读</a>
25+
<aclass="button download"href="<%- url_for("/modern-cpp/pdf/modern-cpp-tutorial-zh-cn.pdf") %>">🇨🇳 下载</a>
2526
</p>
2627
</div>
2728
</div>
@@ -38,7 +39,8 @@
3839
</h1>
3940
<h2>Second Edition</h2>
4041
<p>
41-
<aclass="button white"href="<%- url_for("/modern-cpp/en-us/00-preface/") %>">🇬🇧 Read Now</a>
42+
<aclass="button white"href="<%- url_for("/modern-cpp/en-us/00-preface/") %>">🇬🇧 Read Online</a>
43+
<aclass="button download"href="<%- url_for("/modern-cpp/en-us/00-preface/") %>">🇬🇧 Download</a>
4244
</p>
4345
</div>
4446
</div>

‎website/themes/moderncpp/source/modern-cpp/css/_common.styl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ a.button
5656
transition:all.15sease
5757
box-sizing:border-box
5858
border:1pxsolidlighten($theme,8%)
59+
width:200px;
5960
&.white
6061
background-color:#fff
6162
color:$theme
62-
a.button:hover
63+
&.download
6364
background-color:$theme
6465
color:#fff
66+
a.button:hover
67+
background-color:$theme
68+
color:#fff
6569

6670
.highlight
6771
overflow-x:auto

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp