Permalink
Browse files

fix: archive页层叠问题,新窗口打开问题

Close #480 #479 #468
  • Loading branch information...
litten committed Apr 10, 2017
1 parent 1971484 commit 7bcc4c895a76e2f905b4755397bee506ce4619c1
@@ -2,17 +2,14 @@
menu:
主页: /
随笔: /tags/随笔/
相册: /photos
# SubNav
subnav:
github: "#"
weibo: "#"
rss: "#"
zhihu: "#"
#qq: "#"
#weixin: "#"
#jianshu: "#"
github: "https://github.com/litten"
weibo: "http://weibo.com/litten225"
rss: /atom.xml
#zhihu: "#"
#douban: "#"
#segmentfault: "#"
#bilibili: "#"
@@ -31,42 +28,37 @@ rss: /atom.xml
root:
# Content
# 文章太长,截断按钮文字
excerpt_link: more
# 文章卡片右下角常驻链接,不需要请设置为false
excerpt_link: 'more'
show_all_link: '展开全文'
# 数学公式
fancybox: true
mathjax: false
# 是否在新窗口打开链接
open_in_new: false
# 打赏
# 请在需要打赏的文章的md文件头部,设置属性reward: true
# 打赏基础设定:0-关闭打赏; 1-文章对应的md文件里有reward:true属性,才有打赏; 2-所有文章均有打赏
reward_type: 2
# 打赏wording
reward_type: 1
reward_wording: '谢谢你请我吃糖果'
# 支付宝二维码图片地址,跟你设置头像的方式一样。比如:/assets/img/alipay.jpg
alipay:
# 微信二维码图片地址
weixin:
alipay: /assets/img/alipay.jpg
weixin: /assets/img/weixin.jpg
# 是否在新窗口打开链接
open_in_new: true
# Miscellaneous
baidu_analytics: ''
google_analytics: ''
favicon: /favicon.png
baidu_analytics: 'a30844fa2bcbce0a9e001fe06cefeddf'
google_analytics: false
favicon: /assets/img/favicon.ico
#你的头像url
avatar:
avatar: /assets/blogImg/litten.png
#是否开启分享
share_jia: true
mobile:
social: true
#是否开启多说评论,填写你在多说申请的项目名称 duoshuo: duoshuo-key
#若使用disqus,请在博客config文件中填写disqus_shortname,并关闭多说评论
duoshuo: false
duoshuo: "litten-hexo"
# 样式定制 - 一般不需要修改,除非有很强的定制欲望…
style:
@@ -80,14 +72,14 @@ slider:
# 是否默认展开tags板块
showTags: false
# 智能菜单
# 如不需要,将该对应项置为false
# 如不需要,将该项置为false
# 比如
#smart_menu:
# friends: false
smart_menu:
innerArchive: '所有文章'
friends: '友链'
friends: false
aboutme: '关于我'
friends:
@@ -98,4 +90,4 @@ friends:
友情链接5: http://localhost:4000/
友情链接6: http://localhost:4000/
aboutme: 很惭愧<br><br>只做了一点微小的工作<br>谢谢大家
aboutme: Litten,<br>毕业于华科,就职于鹅厂<br><br>热爱大海与冷笑话,<br/>目前是一枚前端<br/><br/>胆小认生,不易相处,<br>年轻无为,卖马为生。
@@ -1 +1 @@
<link rel="stylesheet" type="text/css" href="<%=config.root%>./main.234bc0.css">
<link rel="stylesheet" type="text/css" href="<%=config.root%>./main.05aabf.css">

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -16,6 +16,7 @@
position: absolute;
padding-top: 15px;
font-size: 1.8em;
z-index: 1;
}
.archive-year-wrap a{
color: #666;
@@ -46,7 +46,6 @@
.header-menu{
font-weight: 300;
line-height: 31px;
cursor: pointer;
text-transform: uppercase;
float:none;
min-height: 150px;
@@ -12,7 +12,10 @@ function init() {
if (yiliaConfig && yiliaConfig.open_in_new) {
let $a = document.querySelectorAll(('.article-entry a:not(.article-more-a)'))
$a.forEach(($em) => {
$em.setAttribute('target', '_blank')
let target = $em.setAttribute('target');

This comment has been minimized.

@firedent

firedent Apr 10, 2017

这段代码貌似会导致“关于我”页面中的<br>无法正常显示,而且仅限于首页。试过好几遍了,去掉之后一切正常,好奇怪。


22:36
应该是由于某种不可名状的语句执行异常导致后面的转义代码无法执行。刚才通过实验,把转义代码放到前面之后转义功能恢复正常。

This comment has been minimized.

@PilgrimErick

PilgrimErick Apr 11, 2017

let target = $em.setAttribute('target'); 应为 let target = $em.getAttribute('target');

This comment has been minimized.

@litten

litten Apr 11, 2017

Owner

@PilgrimErick sorry,大意了,已改好

if (!target || target === '') {
$em.setAttribute('target', '_blank');
}
})
}

Large diffs are not rendered by default.

Oops, something went wrong.
File renamed without changes.

This file was deleted.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 7bcc4c8

Please sign in to comment.