Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
083012f3
Y
yanglr2010
项目概览
大白技术控
/
yanglr2010
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yanglr2010
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
083012f3
编写于
7月 22, 2019
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: Add rel='noopener' attr to external link & format code
上级
79b73bf6
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
22 addition
and
26 deletion
+22
-26
layout/_common/config.pug
layout/_common/config.pug
+2
-4
layout/_common/footer.pug
layout/_common/footer.pug
+6
-4
layout/_common/sidebar.pug
layout/_common/sidebar.pug
+4
-4
layout/_components/analytics/busuanzi.pug
layout/_components/analytics/busuanzi.pug
+1
-1
layout/_components/back2top.pug
layout/_components/back2top.pug
+1
-2
layout/_components/sticky-top.pug
layout/_components/sticky-top.pug
+1
-2
layout/_mixins/post-header.pug
layout/_mixins/post-header.pug
+4
-3
layout/_mixins/posts-sort.pug
layout/_mixins/posts-sort.pug
+1
-1
layout/page.pug
layout/page.pug
+0
-3
source/js/stun-boot.js
source/js/stun-boot.js
+1
-1
source/js/utils.js
source/js/utils.js
+1
-1
未找到文件。
layout/_common/config.pug
浏览文件 @
083012f3
...
...
@@ -28,13 +28,11 @@ script.
shortcuts: {
switch_post: !{ theme.shortcuts.switch_post.enable }
},
back2top: {
enable: !{ theme.back2top.enable },
animation: !{ theme.back2top.icon.animation }
},
sidebar: {
offsetTop: '!{ theme.sidebar.offsetTop }'
},
back2top: !{ theme.back2top.enable },
back2top_animation: !{ theme.back2top.icon.animation },
reward: !{ theme.reward.enable }
};
...
...
layout/_common/footer.pug
浏览文件 @
083012f3
...
...
@@ -22,7 +22,7 @@ footer#footer
span= footer.copyright.text || config.author + "."
if footer.copyright.enable && footer.beian.enable
span.footer-separator
|
span.footer-separator
= "|"
if footer.beian.enable
span!= footer.beian.icp
...
...
@@ -31,17 +31,19 @@ footer#footer
div
if footer.powered.enable
span.footer-powered
!= _p("footer.powered", link_to("http://hexo.io/", "hexo", {external: true}))
- let HEXO_URL = "http://hexo.io/";
!= _p("footer.powered", link_to(HEXO_URL, "hexo", { external: true }))
if footer.powered.version
span= " v" + hexo_env("version") + "."
if footer.powered.enable && footer.theme.enable
span.footer-separator
|
span.footer-separator
= "|"
if footer.theme.enable
span= _p("footer.theme") + " - "
!= link_to("https://github.com/liuyib/hexo-theme-stun/", "stun", {external: true})
- let STUN_URL = "https://github.com/liuyib/hexo-theme-stun/";
!= link_to(STUN_URL, "stun", { external: true })
if footer.theme.version
span= " v" + stun_env("version") + "."
...
...
layout/_common/sidebar.pug
浏览文件 @
083012f3
...
...
@@ -28,7 +28,7 @@ aside#sidebar
- let socialLinkPath = _.trim(_.get(socialItem, '[0]'))
- let socialLinkIcon = _.trim(_.get(socialItem, '[1]'))
span.sidebar-social-item
a(href=socialLinkPath target="_blank"
a(href=socialLinkPath target="_blank"
rel="noopener"
data-popover=_p(`social.${name}`) data-popover-pos="up")
if socialLinkIcon && socialLinkIcon.match("origin:")
...
...
@@ -45,7 +45,7 @@ aside#sidebar
- let feedEmail = theme.feed.email
if feedEmail
span.sidebar-feed-email
a(href=feedEmail target="_blank")
a(href=feedEmail target="_blank"
rel="noopener"
)
i.fa.fa-envelope.sidebar-feed-icon
span Email
span= _p("sidebar.subscribe")
...
...
@@ -53,7 +53,7 @@ aside#sidebar
- let feedRSS = theme.feed.rss
if feedRSS
span.sidebar-feed-rss
a(href=url_for(feedRSS) target="_blank")
a(href=url_for(feedRSS) target="_blank"
rel="noopener"
)
i.fa.fa-rss.sidebar-feed-icon
span RSS
span= _p("sidebar.subscribe")
...
...
@@ -85,7 +85,7 @@ aside#sidebar
- let ccLanguage = (themeCC.language && themeCC.language.toLowerCase()) || "en"
- let ccURL = `https://creativecommons.org/licenses/${ccLicense}/4.0/deed.${ccLanguage}`
div.sidebar-cc
a(href=ccURL target="_blank"
a(href=ccURL target="_blank"
rel="noopener"
data-popover="Creative Commons" data-popover-pos="up")
img(src=url_for(`/${theme.images}/cc-${ccLicense}.svg`) alt="creative commons")
...
...
layout/_components/analytics/busuanzi.pug
浏览文件 @
083012f3
...
...
@@ -9,7 +9,7 @@ div.busuanzi
span#busuanzi_value_site_uv
if theme.busuanzi.site.uv.enable && theme.busuanzi.site.pv.enable
span.separator
|
span.separator
= "|"
if theme.busuanzi.site.pv.enable
span.busuanzi-pv
...
...
layout/_components/back2top.pug
浏览文件 @
083012f3
div#back-top
div.back-top-inner(data-popover=_p("back2top")
data-popover-pos="up")
div(data-popover=_p("back2top") data-popover-pos="up").back-top-inner
i(class=`fa fa-${theme.back2top.icon.name}`)
layout/_components/sticky-top.pug
浏览文件 @
083012f3
div(data-popover=_p("post.sticky")
data-popover-pos="up").sticky-top
div(data-popover=_p("post.sticky") data-popover-pos="up").sticky-top
i(class=`fa fa-${theme.stick_top.icon}`)
layout/_mixins/post-header.pug
浏览文件 @
083012f3
...
...
@@ -17,7 +17,7 @@ mixin postHeader(post)
if !theme.post_meta.icon_only
span= _p("post.posted") + " "
span=
post.date ? full_date(post.date, "YYYY-MM-DD") : 'none'
span=
full_date(post.date, "YYYY-MM-DD")
if theme.post_meta.updated.enable
span.post-meta-update
...
...
@@ -25,7 +25,7 @@ mixin postHeader(post)
if !theme.post_meta.icon_only
span= _p("post.updated") + " "
span=
post.updated ? full_date(post.updated, "YYYY-MM-DD") : 'none'
span=
full_date(post.updated, "YYYY-MM-DD")
if theme.post_meta.word_count.enable
span.post-meta-word-count
...
...
@@ -42,7 +42,8 @@ mixin postHeader(post)
if !theme.post_meta.icon_only
span= _p("post.reading_time") + " "
span= min2read(post.content, {cn: postReadingTime.speed.zh, en: postReadingTime.speed.en}) + " m"
- let READING_TIME_UNIT = "m";
span= min2read(post.content, {cn: postReadingTime.speed.zh, en: postReadingTime.speed.en}) + READING_TIME_UNIT
if theme.valine && theme.valine.enable && theme.valine.visitor
span(id=url_for(post.path) data-flag-title=post.title).leancloud_visitors
...
...
layout/_mixins/posts-sort.pug
浏览文件 @
083012f3
...
...
@@ -14,7 +14,7 @@ mixin articleSort(posts)
time.article-sort-item__time= full_date(post.date, "MM-DD")
h2.article-sort-item__title
if post.link
a(href=url_for(post.link) target="_blank")= post.title || post.link
a(href=url_for(post.link) target="_blank"
rel="noopener"
)= post.title || post.link
else
a(href=url_for(post.path))= post.title || _p('post.untitled')
...
...
layout/page.pug
浏览文件 @
083012f3
...
...
@@ -10,17 +10,14 @@ block content
- let start_color = theme.tag_cloud ? theme.tag_cloud.start_color : "#a4d8fa"
- let end_color = theme.tag_cloud ? theme.tag_cloud.end_color : "#1b9ef3"
div.tag-cloud-item!= tagcloud({min_font: min_font, max_font: max_font, amount: theme.tag_cloud.max_amount, color: true, start_color, end_color})
else if (page.title === "categories")
div.category.main-content
div.category-title= _p("page.categories") + " - "
span.category-num= site.categories.length
!= list_categories()
else if (page.title === "about")
div.about.main-content.code-highlight
!= page.content
else
div.about.main-content.code-highlight
!= page.content
source/js/stun-boot.js
浏览文件 @
083012f3
$
(
document
).
ready
(
function
()
{
CONFIG
.
shortcuts
.
switch_post
&&
Stun
.
utils
.
registerSwitchPost
();
CONFIG
.
back2top
.
enable
&&
Stun
.
utils
.
back2Top
();
CONFIG
.
back2top
&&
Stun
.
utils
.
back2Top
();
CONFIG
.
reward
&&
Stun
.
utils
.
registerShowReward
();
});
source/js/utils.js
浏览文件 @
083012f3
...
...
@@ -184,7 +184,7 @@ Stun.utils = Stun.$u = {
$
(
'
#back-top
'
).
click
(
function
()
{
$
(
'
body
'
).
velocity
(
'
stop
'
).
velocity
(
'
scroll
'
);
if
(
CONFIG
.
back2top
.
animation
)
{
if
(
CONFIG
.
back2top
_
animation
)
{
$
(
'
#back-top
'
)
.
velocity
({
translateY
:
'
-100vh
'
},
{
duration
:
500
})
.
velocity
(
'
reverse
'
,
{
duration
:
10
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录