Skip to content

Commit

Permalink
Merge pull request jerryc127#37 from larscheng/dev
Browse files Browse the repository at this point in the history
添加部分功能
  • Loading branch information
jerryc127 authored Sep 20, 2019
2 parents 83dc055 + f6d70e5 commit 94c51b5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
18 changes: 14 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ menu:
Categories: /categories/||fa fa-folder-open
Link: /link/||fa fa-link
About: /about/||fa fa-heart
# #XXX: /xxx
#二级菜单写法
Menu||/menu/||fa fa-bars:
- subMenu1||/subMenu1/||fa fa-bars
- subMenu2||/subMenu2/||fa fa-bars


# Favicon
Expand Down Expand Up @@ -154,6 +157,10 @@ lodding_bg:
flink: /img/friend_404.gif
post_page: /img/404.jpg

# 首页背景图片屏占比,1:100%,2:50%,1.5:75%
homepage:
ratio: 1

post_meta:
date_type: both # or created or updated 文章日期是创建日或者更新日或都显示
categories: true # or false 是否显示分类
Expand Down Expand Up @@ -254,8 +261,10 @@ footer_custom_text:
footer_copyright:
enable: true

#ICP备案信息尾部显示,pic为图标地址
ICP:
enable: false
pic: /img/icp.png
url:
text:

Expand Down Expand Up @@ -382,11 +391,12 @@ hr:
icon-top: -20px

# 主頁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
6 changes: 3 additions & 3 deletions layout/includes/additional-js.pug
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ if theme.translate && theme.translate.enable


if is_home() && theme.subtitle.enable
script(src="https://cdn.jsdelivr.net/npm/typed.js@2.0.9")
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,
Expand All @@ -56,7 +56,7 @@ if is_home()
script.
//首頁fullpage
function alignContent() {
for (var n = $(window).height(), e = document.querySelectorAll(".full_page"), i = 0; i < e.length; i++)
for (var n = $(window).height()/!{theme.homepage.ratio}, e = document.querySelectorAll(".full_page"), i = 0; i < e.length; i++)
e[i].style.height = n + "px";
$("#site-info").each(function () {
var x = $(this).height();
Expand Down
4 changes: 4 additions & 0 deletions layout/includes/footer.pug
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
if theme.ICP.enable
.icp
a(href=theme.ICP.url)
if theme.lazyload.enable
img.lozad(data-src=`${theme.ICP.pic}` onerror=`onerror=null;src='${theme.lodding_bg.flink}'` style="height: 30px; vertical-align: bottom;")
else
img(src=`${theme.ICP.pic}` onerror=`onerror=null;src='${theme.lodding_bg.flink}'` style="height: 30px; vertical-align: bottom;" )
span=theme.ICP.text
4 changes: 2 additions & 2 deletions layout/includes/header.pug
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
span=' '+label
else
.menus_item
a.site-page
i.fa-fw(class=label.split('||')[1] aria-hidden="true")
a.site-page(href=label.split('||')[1])
i.fa-fw(class=label.split('||')[2] aria-hidden="true")
span=' '+label.split('||')[0]
i.fa.fa-chevron-down.menus-expand(aria-hidden="true")
ul.menus_item_child
Expand Down
Binary file added source/img/icp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 94c51b5

Please sign in to comment.