Skip to content

Commit

Permalink
1. 更改手機頁面的menu和toc的顯示方式和顯示特效(ipad也能看TOC)
Browse files Browse the repository at this point in the history
1. 更改手機頁面的menu和toc的顯示方式和顯示特效(ipad也能看TOC)
3. 可設置複製時,内容自動加上版權信息
4. 可修改tag的top_img
5. 可修改category的top_img
6. 可修改valine的背景
7. archives頁UI優化
8. ICP增加icon jerryc127#37
9. 可設置主頁top_img的高度
10. 可設置主頁site-info的位置
11. category頁和tag頁的UI可以設置與主頁UI一樣 jerryc127#31
12. 主頁subtitle可設置多個句子(不再限制2個) jerryc127#37
13. 設置menu時,頭尾添加空格不受影響
14. 調整post頁的佈局
15. 书签添加icon
16. 公告icon效果
17. 首頁歸檔模塊,可設置數量限制,會顯示'查看更多'按鈕
18. 右下角按鈕調整。
19. 修复文章cover隨機图片生成,同一篇文章,不同地方的cover顯示不一样的bug
20. 修復gitalk語言設置無效的bug jerryc127#35
21. 修復post頁面,當沒有設置word count時,閲讀量前有'|"
22. 修复sub-menu在safari的显示问题
23. 修复tags页评论居中问题
24. 修复header a hover 白色问题
25. 修復夜間模式下footer的顔色bug
26. 修復英文語言下,書簽英文顯示不完整的問題
  • Loading branch information
jerryc127 committed Sep 23, 2019
1 parent 83dc055 commit 2eb1512
Show file tree
Hide file tree
Showing 57 changed files with 1,431 additions and 1,217 deletions.
97 changes: 67 additions & 30 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
# Theme color for customize
# Notice: color value must in double quotes like "#000" or may cause error!
# ---------------
# theme_color:
# enable: true
# main: "#49B1F5"
# paginator: "#00c4b6"
# button_hover: "#FF7242"
# text_selection: "#00c4b6"
# link_color: "#99a9bf"
# meta_color: '#858585'
# hr_color: "#A4D8FA"
# read-mode-bg_color: '#FAF9DE'
# inline-code-color: '#F47466'

# Main menu navigation
# format: xxx: /xxx/||icon
# ---------------
# format: xxx: 連結 || icon
# sub-menu
# xxx || icon:
# xxx || 連結 || icon
menu:
Home: /||fa fa-home
Archives: /archives/||fa fa-archive
Tags: /tags/||fa fa-tags
Categories: /categories/||fa fa-folder-open
Link: /link/||fa fa-link
About: /about/||fa fa-heart
# #XXX: /xxx
Home: / || fa fa-home
Archives: /archives/ || fa fa-archive
Tags: /tags/ || fa fa-tags
Categories: /categories/ || fa fa-folder-open
Link: /link/ || fa fa-link
About: /about/ || fa fa-heart
List||fa fa-list:
- Music || /music/ || fa fa-music
- Movie || /movies/ || fa fa-film


# Favicon
Expand Down Expand Up @@ -53,6 +44,13 @@ highlight_shrink: false #代碼框不展開,需點擊 '>' 打開

code_word_wrap: false

# copy setting
# 是否禁止複製(如果禁止,highlight_copy的功能將無效)
# copyright 複製的内容後面加上版權信息
copy:
enable: false # true 開啓 / false 禁止
copyright: false

# social settings
# formal:
# icon: link
Expand Down Expand Up @@ -149,6 +147,12 @@ default_cover: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg
# the banner image of archive page
archive_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/archive.jpg

# the banner image of tag page
tag_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/tag-bg.png

# the banner image of category page
category_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/category-bg

# if the photo link cannot connect,it will show that
lodding_bg:
flink: /img/friend_404.gif
Expand Down Expand Up @@ -228,6 +232,7 @@ disqus:
# repo:
# owner:
# admin:
# language: # en , zh-CN , zh-TW
#### Using this js for redirect to gitalk container after login
#### See https://github.com/gitalk/gitalk/issues/125
# js: https://cdn.jsdelivr.net/gh/upupming/gitalk@36368e5dffd049e956cdbbd751ff96c28d8255cf/dist/gitalk.min.js
Expand All @@ -243,7 +248,8 @@ valine:
avatar: monsterid # gravatar style https://valine.js.org/#/avatar
lang: en # i18n: zh-cn/en
placeholder: Please leave your footprints # valine comment input placeholder(like: Please leave your footprints )
guest_info: nick,mail,link #valine comment header inf
guest_info: nick,mail,link #valine comment header info
bg: /img/comment_bg.png # valine background

##### Footer Settings ####
# ------------------------------------
Expand All @@ -257,7 +263,8 @@ footer_copyright:
ICP:
enable: false
url:
text:
text:
icon: /img/icp.png


#### 站長驗證 ####
Expand Down Expand Up @@ -307,6 +314,35 @@ related_post:
#### 美化/效果 ####
#--------------------------------

# Theme color for customize
# Notice: color value must in double quotes like "#000" or may cause error!
# ---------------
# theme_color:
# enable: true
# main: "#49B1F5"
# paginator: "#00c4b6"
# button_hover: "#FF7242"
# text_selection: "#00c4b6"
# link_color: "#99a9bf"
# meta_color: '#858585'
# hr_color: "#A4D8FA"
# read-mode-bg_color: '#FAF9DE'
# inline-code-color: '#F47466'

# 主頁設置
# 默認top_img全屏,site_info在中間
# 使用默認, 都無需填寫(建議默認)
index_site_info_top: #主頁標題距離頂部距離 例如 300px/300em/300rem/10%
index_top_img_height: #主頁top_img高度 例如 300px/300em/300rem 不能使用百分比


# category和tag頁的UI設置
# index 值代表 UI將與首頁的UI一樣
# 默認跟archives頁面UI一樣
category_ui: # 留空或index
tag_ui: # 留空或index


# 設置網站背景
# 可設置圖片 或者 顔色
# 圖片格式 background: url(http://xxxxxx.com/xxx.jpg)
Expand Down Expand Up @@ -366,14 +402,14 @@ post_beautify:
# 全局字體
font:
enable: false
font-family: Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB,"Microsoft JhengHei", "MicrMicrosoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
code-font: consolas, Menlo, "PingFang SC", "Microsoft JhengHei","Microsoft YaHei", monospace, Helvetica Neue For Number
font-family: Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, MicrMicrosoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
code-font: consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace, Helvetica Neue For Number

# 網站名字字體
# 左上角網站名字 主頁居中網站名字
blog_title_font:
font_link: https://fonts.googleapis.com/css?family=Titillium+Web #字體鏈接
font-family: Titillium Web, PingFang SC, Hiragino Sans GB, "Microsoft JhengHei", "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
font-family: Titillium Web, PingFang SC, Hiragino Sans GB, "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif

# 水平分隔綫
hr:
Expand All @@ -383,11 +419,12 @@ hr:

# 主頁subtitle
# 打字效果
# (如果有英文逗號' , ',請使用轉義字符 ,)
subtitle:
enable: true
sub1: 今日事,今日畢
sub2: Never put off till tomorrow what you can do today #如果有符號 ' ,記得前面加上 \

sub:
- 今日事,今日畢
- Never put off till tomorrow what you can do today



Expand Down
10 changes: 10 additions & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,15 @@ rightside:
font_minus_title: Decrease font size
translate_title: Traditional Chinese and Simplified Chinese Conversion
night_mode_title: Dark Mode
back_to_top: Back to top
toc: Table of Contents
scroll_to_comment: Scroll to comment
setting: Setting

runtime_unit: days

copy_copyright:
author: Author
link: Link
source: Source
info: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
10 changes: 10 additions & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,15 @@ rightside:
font_minus_title: Decrease font size
translate_title: Traditional Chinese and Simplified Chinese Conversion
night_mode_title: Dark Mode
back_to_top: Back to top
toc: Table of Contents
scroll_to_comment: Scroll to comment
setting: Setting

runtime_unit: days

copy_copyright:
author: Author
link: Link
source: Source
info: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
10 changes: 10 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,15 @@ rightside:
font_minus_title: 缩小字体
translate_title: 简繁转换
night_mode_title: 夜间模式
back_to_top: 回到顶部
toc: 目录
scroll_to_comment: 直达评论
setting: 设置

runtime_unit:

copy_copyright:
author: 作者
link: 链接
source: 来源
info: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
14 changes: 12 additions & 2 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ page:
articles: 文章總覽
tag: 標籤
category: 分類
archives: 歸檔
archives: 時間軸

sticky: 置頂
no_title: 無題
Expand Down Expand Up @@ -83,5 +83,15 @@ rightside:
font_minus_title: 縮小字體
translate_title: 簡繁轉換
night_mode_title: 夜間模式
back_to_top: 回到頂部
toc: 目錄
scroll_to_comment: 直達評論
setting: 設置

runtime_unit:
runtime_unit:

copy_copyright:
author: 作者
link: 鏈接
source: 來源
info: 著作權歸作者所有。商業轉載請聯繫作者獲得授權,非商業轉載請註明出處。
24 changes: 16 additions & 8 deletions layout/category.pug
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
extends includes/layout.pug

block content
include ./includes/mixins/article-sort.pug
#category
.article-sort-title= _p('page.category') + ' - ' + page.category
+articleSort(page.posts)
include includes/pagination.pug
#aside_content.aside_content
include includes/aside.pug

if theme.category_ui == 'index'
include ./includes/mixins/UI.pug
#recent-posts.recent-posts.category_ui
+UI_NEW(page.posts)
include includes/pagination.pug
#aside_content.aside_content
include includes/aside.pug
else
include ./includes/mixins/article-sort.pug
#category
.article-sort-title= _p('page.category') + ' - ' + page.category
+articleSort(page.posts)
include includes/pagination.pug
#aside_content.aside_content
include includes/aside.pug

2 changes: 1 addition & 1 deletion layout/flink.pug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.flink
each i in site.data.link
p.comment-word= i.class_name
h1= i.class_name
.post-cards
ul.md-links
each item in i.link_list
Expand Down
48 changes: 15 additions & 33 deletions layout/includes/additional-js.pug
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,26 @@ if is_home() && theme.subtitle.enable
script(src="https://cdn.jsdelivr.net/npm/typed.js@2.0.9")
script.
var typed = new Typed(".subtitle", {
strings: ['!{theme.subtitle.sub1}','!{theme.subtitle.sub2}'],
strings: '!{theme.subtitle.sub}'.split(","),
startDelay: 300,
typeSpeed: 100,
loop: true,
backSpeed: 50
});

if is_home()
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js")

if theme.instantpage.enable
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")

if theme.lazyload.enable
script(src=url_for(theme.lazyload.script))
script.
const observer = lozad(); // lazy loads elements with default selector as '.lozad'
observer.observe();

if is_home() && !theme.index_top_img_height && !theme.index_site_info_top
script.
//首頁fullpage
function alignContent() {
Expand All @@ -63,39 +75,9 @@ if is_home()
$(this).css("top", (n-x)/2)
})
}

function recent_post_padding() {
$(".recent-post-info").each(function () {
var k = $(".recent-post-item").height();
var e = $(this).height();
$(this).css({"padding-top": (k-e)/2 , "padding-bottom": (k-e)/2 })
})
}

alignContent();

//recent-post-item垂直置中
if ($(window).width() > 768) {
recent_post_padding();
}


$(window).bind("resize", function () {

alignContent()

if ($(window).width() > 768) {
recent_post_padding();
}
})

if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js")

if theme.instantpage.enable
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")

if theme.lazyload.enable
script(src=url_for(theme.lazyload.script))
script.
const observer = lozad(); // lazy loads elements with default selector as '.lozad'
observer.observe();
2 changes: 1 addition & 1 deletion layout/includes/comments/gitalk.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ if theme.gitalk && theme.gitalk.enable
owner: '!{theme.gitalk.owner}',
admin: '!{theme.gitalk.admin}',
id: md5(decodeURI(location.pathname)),
language: '!{lang}'
language: '!{theme.gitalk.language}'
})
gitalk.render('gitalk-container')
Loading

0 comments on commit 2eb1512

Please sign in to comment.