Skip to content

Commit

Permalink
add i18n && padding-left: 0.3rem && annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
weilining committed Jan 12, 2021
1 parent 9cac144 commit 0d4dce7
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 21 deletions.
22 changes: 12 additions & 10 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ error_img:
# A simple 404 page
error_404:
enable: false
subtitle: 'Page Not Found'
subtitle: "Page Not Found"
background: https://i.loli.net/2020/05/19/aKOcLiyPl2JQdFD.png

post_meta:
Expand Down Expand Up @@ -194,13 +194,15 @@ reward:
# - img: /img/alipay.jpg
# link:
# text: alipay

# Post edit
# Easily browse and edit blog source code online.
post_edit:
enable: false
url: https://github.com/user-name/repo-name/tree/branch-name/subdirectory-name/ # Link for view source
#url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name/ # Link for fork & edit
# Link for view source
# url: https://github.com/user-name/repo-name/tree/branch-name/subdirectory-name/
# Link for fork & edit
# url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name/

# Related Articles
related_post:
Expand Down Expand Up @@ -542,7 +544,7 @@ canvas_fluttering_ribbon:
# https://github.com/hustcc/canvas-nest.js
canvas_nest:
enable: false
color: '0,0,255' #color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
color: "0,0,255" #color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
opacity: 0.7 # the opacity of line (0~1), default: 0.5.
zIndex: -1 # z-index property of the background, default: -1.
count: 99 # the number of lines, default: 99.
Expand Down Expand Up @@ -587,7 +589,7 @@ beautify:
enable: false
field: post # site/post
title-prefix-icon: '\f0c1'
title-prefix-icon-color: '#F47466'
title-prefix-icon-color: "#F47466"

# Global font settings
# Don't modify the following settings unless you know how they work (非必要不要修改)
Expand Down Expand Up @@ -729,9 +731,9 @@ translate:
# Time delay
translateDelay: 0
# The text of the button when the language is Simplified Chinese
msgToTraditionalChinese: ''
msgToTraditionalChinese: ""
# The text of the button when the language is Traditional Chinese
msgToSimplifiedChinese: ''
msgToSimplifiedChinese: ""

# Read Mode (閲讀模式)
readmode: true
Expand Down Expand Up @@ -814,8 +816,8 @@ aplayerInject:
snackbar:
enable: false
position: bottom-left
bg_light: '#49b1f5' # The background color of Toast Notification in light mode
bg_dark: '#121212' # The background color of Toast Notification in dark mode
bg_light: "#49b1f5" # The background color of Toast Notification in light mode
bg_dark: "#121212" # The background color of Toast Notification in dark mode

# https://instant.page/
# prefetch (預加載)
Expand Down
3 changes: 2 additions & 1 deletion languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ post:
copyright_notice: Copyright Notice
copyright_content: 'All articles in this blog are licensed under <a href="%s">%s</a> unless stating additionally.'
recommend: Related Articles
edited: Edited on

search: Search
algolia_search:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}."
hits_stats: '${hits} results found in ${time} ms'
hits_stats: "${hits} results found in ${time} ms"

local_search:
label: Local search
Expand Down
3 changes: 2 additions & 1 deletion languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ post:
copyright_notice: Copyright Notice
copyright_content: 'All articles in this blog are licensed under <a href="%s">%s</a> unless stating additionally.'
recommend: Related Articles
edited: Edited on

search: Search
algolia_search:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}."
hits_stats: '${hits} results found in ${time} ms'
hits_stats: "${hits} results found in ${time} ms"

local_search:
label: Local search
Expand Down
7 changes: 4 additions & 3 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ post:
copyright_content: '本博客所有文章除特别声明外,均采用
<a href="%s" target="_blank">%s</a> 许可协议。转载请注明来自 <a href="%s" target="_blank">%s</a>!'
recommend: 相关推荐
edit: 编辑

search: 搜索
algolia_search:
input_placeholder: 搜索文章
hits_empty: '找不到您查询的内容:${query}'
hits_stats: '找到 ${hits} 条结果,用时 ${time} 毫秒'
hits_empty: "找不到您查询的内容:${query}"
hits_stats: "找到 ${hits} 条结果,用时 ${time} 毫秒"

local_search:
label: 本地搜索
input_placeholder: 搜索文章
hits_empty: '找不到您查询的内容:${query}'
hits_empty: "找不到您查询的内容:${query}"

pagination:
prev: 上一篇
Expand Down
7 changes: 4 additions & 3 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ post:
copyright_content: '本部落格所有文章除特別聲明外,均採用
<a href="%s" target="_blank">%s</a> 許可協議。轉載請註明來自 <a href="%s" target="_blank">%s</a>!'
recommend: 相關推薦
edit: 編輯

search: 搜尋
algolia_search:
input_placeholder: 搜尋文章
hits_empty: '找不到您查詢的內容:${query}'
hits_stats: '找到 ${hits} 條結果,用時 ${time} 毫秒'
hits_empty: "找不到您查詢的內容:${query}"
hits_stats: "找到 ${hits} 條結果,用時 ${time} 毫秒"

local_search:
label: 本地搜尋
input_placeholder: 搜尋文章
hits_empty: '找不到您查詢的內容:${query}'
hits_empty: "找不到您查詢的內容:${query}"

pagination:
prev: 上一篇
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/header/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ header#page-header(class=isHomeClass style=bg_img)
#page-site-info
h1#site-title=site_title
if theme.post_edit.enable
a.post-edit-link(href=post_edit(page.source) title="编辑")
a.post-edit-link(href=post_edit(page.source) title=_p('post.edit'))
i.fa.fa-pen-nib
2 changes: 1 addition & 1 deletion layout/includes/header/post-info.pug
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#post-info
h1.post-title= page.title || _p('no_title')
if theme.post_edit.enable
a.post-edit-link(href=post_edit(page.source) title="编辑")
a.post-edit-link(href=post_edit(page.source) title=_p('post.edit'))
i.fa.fa-pen-nib

#post-meta
Expand Down
5 changes: 4 additions & 1 deletion source/css/_layout/head.styl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
+maxWidth768()
top: 7rem

.post-edit-link
padding-left: 0.3rem

// post
&.post-bg
height: 20rem
Expand Down Expand Up @@ -143,7 +146,7 @@
font-size: 1.72em

.post-edit-link
float: inline-end
padding-left: 0.3rem

#post-meta
color: var(--light-grey)
Expand Down

0 comments on commit 0d4dce7

Please sign in to comment.