Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
fc4f6b67
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,发现更多精彩内容 >>
提交
fc4f6b67
编写于
8月 24, 2019
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: Adjust the introduction of external resource files
上级
e23f6bf9
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
47 addition
and
41 deletion
+47
-41
layout/_common/head.pug
layout/_common/head.pug
+23
-13
layout/_common/header.pug
layout/_common/header.pug
+3
-3
layout/_common/layout.pug
layout/_common/layout.pug
+6
-0
layout/_common/sidebar.pug
layout/_common/sidebar.pug
+7
-7
layout/_components/recent-posts.pug
layout/_components/recent-posts.pug
+2
-2
layout/_mixins/posts-sort.pug
layout/_mixins/posts-sort.pug
+1
-1
layout/_third-party/comments/gitalk.pug
layout/_third-party/comments/gitalk.pug
+1
-4
layout/_third-party/comments/gitment.pug
layout/_third-party/comments/gitment.pug
+0
-3
layout/_third-party/comments/index.pug
layout/_third-party/comments/index.pug
+1
-1
layout/_third-party/math/index.pug
layout/_third-party/math/index.pug
+2
-2
layout/_third-party/search/algolia.pug
layout/_third-party/search/algolia.pug
+0
-4
layout/post.pug
layout/post.pug
+1
-1
未找到文件。
layout/_common/head.pug
浏览文件 @
fc4f6b67
...
...
@@ -37,13 +37,13 @@ if theme.pwa && theme.pwa.enable
link(rel="manifest" href=`${url_for(theme.pwa.manifest)}?v=${stun_env("version")}`)
if theme.favicon.small
link(rel="icon"
type="image/png" sizes="16x16" href=`${url_for(theme.favicon.small)}?v=${stun_env("version")}`
)
link(rel="icon"
href=`${url_for(theme.favicon.small)}?v=${stun_env("version")}` type="image/png" sizes="16x16"
)
if theme.favicon.medium
link(rel="icon"
type="image/png" sizes="32x32" href=`${url_for(theme.favicon.medium)}?v=${stun_env("version")}`
)
link(rel="icon"
href=`${url_for(theme.favicon.medium)}?v=${stun_env("version")}` type="image/png" sizes="32x32"
)
if theme.favicon.apple_touch_icon
link(rel="apple-touch-icon"
sizes="180x180" href=`${url_for(theme.favicon.apple_touch_icon)}?v=${stun_env("version")}`
)
link(rel="apple-touch-icon"
href=`${url_for(theme.favicon.apple_touch_icon)}?v=${stun_env("version")}` sizes="180x180"
)
if theme.favicon.safari_pinned_tab
link(rel="mask-icon" href=`${url_for(theme.favicon.safari_pinned_tab)}?v=${stun_env("version")}` color="#54bcff")
...
...
@@ -53,24 +53,34 @@ if theme.favicon.msapplication
meta(name="msapplication-TileColor" content="#000000")
if theme.feed && theme.feed.rss
link(rel="alternate"
, href=url_for(theme.feed.rss),
type="application/atom+xml")
link(rel="alternate"
href=url_for(theme.feed.rss)
type="application/atom+xml")
link(rel="dns-prefetch" href="https://cdn.jsdelivr.net")
- var fontawesome_css =
'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css'
- var fontawesome_css =
"https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css"
- if (theme.cdn.fontawesome_css) fontawesome_css = theme.cdn.fontawesome_css
link(rel="stylesheet" href=fontawesome_css)
link(rel="stylesheet" href=fontawesome_css
type="text/css"
)
if theme.fancybox
- var fancybox_css =
'https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css'
- var fancybox_css =
"https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css"
- if (theme.cdn.fontawesome) fancybox_css = theme.cdn.fontawesome
link(rel="stylesheet" href=fancybox_css)
link(rel="stylesheet" href=fancybox_css type="text/css")
if page.comments
if theme.gitalk && theme.gitalk.enable
- var gitalk_css = "https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.css"
- if (theme.cdn.gitalk_css) gitalk_css = theme.cdn.gitalk_css
link(rel="stylesheet" href=gitalk_css type="text/css")
else if theme.gitment && theme.gitment.enable
- var gitment_css = "https://cdn.jsdelivr.net/npm/gitment/style/default.min.css"
- if (theme.cdn.gitment_css) gitment_css = theme.cdn.gitment_css
link(rel="stylesheet" href=gitment_css type="text/css")
if theme.algolia_search.enable
- var instantsearch_css = "https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.css"
- if (theme.cdn.instantsearch_css) instantsearch_css = theme.cdn.instantsearch_css
link(rel="stylesheet" href=instantsearch_css type="text/css")
link(rel="stylesheet" href=`${url_for(theme.css)}/index.css?v=${stun_env("version")}`)
include ../_third-party/analytics/index.pug
include ../_third-party/search/index.pug
include ../_third-party/comments/index.pug
include ../_third-party/math/index.pug
include ../_third-party/advertising/index.pug
include ./config.pug
layout/_common/header.pug
浏览文件 @
fc4f6b67
...
...
@@ -19,9 +19,9 @@ header#header(
div.header-nav-menu
each value, name in (theme.menu || [])
if name && value
- var menuItem = value.split(
'||'
)
- var menuItemPath = _.trim(_.get(menuItem,
'[0]'
))
- var menuItemIcon = _.trim(_.get(menuItem,
'[1]'
))
- var menuItem = value.split(
"||"
)
- var menuItemPath = _.trim(_.get(menuItem,
"[0]"
))
- var menuItemIcon = _.trim(_.get(menuItem,
"[1]"
))
span
a(href=menuItemPath ? menuItemPath : "/")
if !theme.menu_settings.text_only
...
...
layout/_common/layout.pug
浏览文件 @
fc4f6b67
...
...
@@ -14,3 +14,9 @@ html(lang=config.language)
include ../_components/search/index.pug
include ../_scripts/cdn.pug
include ../_scripts/common.pug
include ../_third-party/quicklink.pug
include ../_third-party/advertising/index.pug
include ../_third-party/analytics/index.pug
include ../_third-party/comments/index.pug
include ../_third-party/math/index.pug
include ../_third-party/search/index.pug
layout/_common/sidebar.pug
浏览文件 @
fc4f6b67
...
...
@@ -24,13 +24,13 @@ aside#sidebar
div.sidebar-social
for value, name in (theme.social || [])
if name && value
- var socialItem = value.split(
'||'
)
- var socialLinkPath = _.trim(_.get(socialItem,
'[0]'
))
- var socialLinkIcon = _.trim(_.get(socialItem,
'[1]'
))
- var socialItem = value.split(
"||"
)
- var socialLinkPath = _.trim(_.get(socialItem,
"[0]"
))
- var socialLinkIcon = _.trim(_.get(socialItem,
"[1]"
))
span.sidebar-social-item
a(href=socialLinkPath target="_blank" rel="noopener"
data-popover=_p(`social.${name}`) data-popover-pos=`${
theme.social_setting.icon_only ?
'up' : 'none'
}`)
theme.social_setting.icon_only ?
"up" : "none"
}`)
if socialLinkIcon && socialLinkIcon.match("origin:")
span!= socialLinkIcon.split("origin:")[1]
...
...
@@ -60,9 +60,9 @@ aside#sidebar
span= _p("sidebar.subscribe")
if theme.menu
- var menuArchives = _.trim(_.get(theme.menu.archives.split(
'||'), '[0]'
))
- var menuCategories = _.trim(_.get(theme.menu.categories.split(
'||'), '[0]'
))
- var menuTags = _.trim(_.get(theme.menu.tags.split(
'||'), '[0]'
))
- var menuArchives = _.trim(_.get(theme.menu.archives.split(
"||"), "[0]"
))
- var menuCategories = _.trim(_.get(theme.menu.categories.split(
"||"), "[0]"
))
- var menuTags = _.trim(_.get(theme.menu.tags.split(
"||"), "[0]"
))
div.sidebar-state
if theme.menu.archives
span.sidebar-state-item.sidebar-state-posts
...
...
layout/_components/recent-posts.pug
浏览文件 @
fc4f6b67
...
...
@@ -3,7 +3,7 @@ section#recent-posts.recent-posts
- var postLists = theme.post_list.paginate.home ? page.posts : site.posts
- postLists.each(function (post) {
article(class=`${post.link ?
'post-link' : ''
}`).post
article(class=`${post.link ?
"post-link" : ""
}`).post
+postHeader(post)
div.post-body
...
...
@@ -16,7 +16,7 @@ section#recent-posts.recent-posts
if theme.auto_excerpt && theme.auto_excerpt.enable
- const content = strip_html(post.content)
- var excerpt = content.substring(0, theme.auto_excerpt.length)
- content.length > theme.auto_excerpt.length ? excerpt +=
'......' : ''
- content.length > theme.auto_excerpt.length ? excerpt +=
"......" : ""
div!= excerpt
else if post.excerpt
div.post-excerpt!= post.excerpt
...
...
layout/_mixins/posts-sort.pug
浏览文件 @
fc4f6b67
...
...
@@ -16,7 +16,7 @@ mixin articleSort(posts)
if 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'
)
a(href=url_for(post.path))= post.title || _p(
"post.untitled"
)
if post.top
include ../_components/sticky-top.pug
...
...
layout/_third-party/comments/gitalk.pug
浏览文件 @
fc4f6b67
-
var gitalk_js = "https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js"
var gitalk_css = "https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.css"
var gitalk_md5 = "https://cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js"
if (theme.cdn.gitalk_js) gitalk_js = theme.cdn.gitalk_js
if (theme.cdn.gitalk_css) gitalk_css = theme.cdn.gitalk_css
if (theme.cdn.gitalk_md5) gitalk_md5 = theme.cdn.gitalk_md5
link(href=gitalk_css rel="stylesheet" type="text/css")
script(src=gitalk_js)
script(src=gitalk_md5)
-
var lang = _.get(theme,
'gitalk.language'
)
var lang = _.get(theme,
"gitalk.language"
)
? theme.gitalk.language : config.language;
script.
...
...
layout/_third-party/comments/gitment.pug
浏览文件 @
fc4f6b67
-
var gitment_js = "https://cdn.jsdelivr.net/npm/gitment/dist/gitment.browser.min.js"
var gitment_css = "https://cdn.jsdelivr.net/npm/gitment/style/default.min.css"
var gitment_md5 = "https://cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js"
if (theme.cdn.gitment_js) gitment_js = theme.cdn.gitment_js
if (theme.cdn.gitment_css) gitment_css = theme.cdn.gitment_css
if (theme.cdn.gitment_md5) gitment_md5 = theme.cdn.gitment_md5
link(href=gitment_css rel="stylesheet" type="text/css")
script(src=gitment_js)
script(src=gitment_md5)
...
...
layout/_third-party/comments/index.pug
浏览文件 @
fc4f6b67
if page.comments
if
theme.gitment && theme.gitment.enable
if theme.gitment && theme.gitment.enable
include ./gitment.pug
else if theme.gitalk && theme.gitalk.enable
include ./gitalk.pug
...
...
layout/_third-party/math/index.pug
浏览文件 @
fc4f6b67
...
...
@@ -9,7 +9,7 @@ if theme.math.enable
if !is_tag() && !is_category() && !is_archive()
if isHomeHasMath || (theme.math.per_page || page.math)
if theme.math.engine ===
'mathjax'
if theme.math.engine ===
"mathjax"
include ./mathjax.pug
else if theme.math.engine ===
'katex'
else if theme.math.engine ===
"katex"
include ./katex.pug
layout/_third-party/search/algolia.pug
浏览文件 @
fc4f6b67
-
var instantsearch_js = "https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js"
var instantsearch_css = "https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.css"
if (theme.cdn.instantsearch_js) instantsearch_js = theme.cdn.instantsearch_js
if (theme.cdn.instantsearch_css) instantsearch_css = theme.cdn.instantsearch_css
link(href=instantsearch_css rel="stylesheet" type="text/css")
script(src=instantsearch_js defer)
layout/post.pug
浏览文件 @
fc4f6b67
...
...
@@ -20,7 +20,7 @@ block content
span= _p("post.end")
span= "------"
-
let
themeConfigCC = theme.creative_commons.enable && theme.creative_commons.post
-
var
themeConfigCC = theme.creative_commons.enable && theme.creative_commons.post
if page.copyright === false ? page.copyright : themeConfigCC
include ./_components/copyright.pug
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录