Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
f85772e6
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 搜索 >>
提交
f85772e6
编写于
2月 10, 2020
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: Remove lodash code
上级
938442a1
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
91 addition
and
91 deletion
+91
-91
layout/_layout.pug
layout/_layout.pug
+5
-5
layout/_mixins/menu-item.pug
layout/_mixins/menu-item.pug
+2
-2
layout/_mixins/post-header.pug
layout/_mixins/post-header.pug
+1
-1
layout/_partials/config.pug
layout/_partials/config.pug
+17
-17
layout/_partials/footer/footer.pug
layout/_partials/footer/footer.pug
+1
-1
layout/_partials/head/head.pug
layout/_partials/head/head.pug
+7
-7
layout/_partials/header/header.pug
layout/_partials/header/header.pug
+4
-4
layout/_partials/post/post-list.pug
layout/_partials/post/post-list.pug
+2
-2
layout/_partials/search/index.pug
layout/_partials/search/index.pug
+2
-2
layout/_partials/sidebar/sidebar.pug
layout/_partials/sidebar/sidebar.pug
+7
-7
layout/_partials/widgets/comments.pug
layout/_partials/widgets/comments.pug
+5
-5
layout/_scripts/stun.pug
layout/_scripts/stun.pug
+1
-1
layout/_scripts/vendors.pug
layout/_scripts/vendors.pug
+14
-14
layout/_third-party/advertising/index.pug
layout/_third-party/advertising/index.pug
+1
-1
layout/_third-party/analytics/busuanzi.pug
layout/_third-party/analytics/busuanzi.pug
+2
-2
layout/_third-party/comments/gitalk.pug
layout/_third-party/comments/gitalk.pug
+1
-1
layout/_third-party/comments/index.pug
layout/_third-party/comments/index.pug
+7
-7
layout/_third-party/pjax.pug
layout/_third-party/pjax.pug
+2
-2
layout/_third-party/quicklink.pug
layout/_third-party/quicklink.pug
+2
-2
layout/_third-party/search/algolia.pug
layout/_third-party/search/algolia.pug
+1
-1
layout/_third-party/search/index.pug
layout/_third-party/search/index.pug
+2
-2
layout/page.pug
layout/page.pug
+2
-2
layout/post.pug
layout/post.pug
+3
-3
未找到文件。
layout/_layout.pug
浏览文件 @
f85772e6
...
...
@@ -2,12 +2,12 @@
var HEXO_URL = "http://hexo.io/";
var STUN_URL = "https://github.com/liuyib/hexo-theme-stun/";
var faPrefix = theme.fa_prefix || 'fa';
var isNoHeader = !
_.get(theme, 'header.enable') || (is_post() && !_.get(theme, 'header.show_on.post')
);
var isEnableNoHeader = !
_.get(theme, 'header.enable') || !_.get(theme, 'header.show_on.post')
;
var isNoHeader = !
theme.header.enable || (is_post() && !theme.header.show_on.post
);
var isEnableNoHeader = !
theme.header.enable || !theme.header.show_on.post
;
var pjax = false;
var dataPjax = {};
if (
_.get(theme, 'pjax.enable')
) {
if (
theme.pjax.enable
) {
pjax = true;
dataPjax = { 'data-pjax': '' };
}
...
...
@@ -40,7 +40,7 @@ html(lang=config.language)
if page.comments
include ./_partials/widgets/comments.pug
if
_.get(theme, 'sidebar.enable')
if
theme.sidebar.enable
aside#sidebar.sidebar
div.sidebar-inner
include ./_partials/sidebar/sidebar.pug
...
...
@@ -53,7 +53,7 @@ html(lang=config.language)
include ./_partials/widgets/loading-bar.pug
if
_.get(theme, 'back2top.enable')
if
theme.back2top.enable
include ./_partials/widgets/back2top.pug
include ./_partials/search/index.pug
...
...
layout/_mixins/menu-item.pug
浏览文件 @
f85772e6
...
...
@@ -3,8 +3,8 @@ mixin menuItem(menu, className)
if name && value
-
var item = value.split('||');
var menuPath =
_.trim(_.get(item, '[0]')
);
var menuIcon =
_.trim(_.get(item, '[1]')
);
var menuPath =
(item[0] + '').trim(
);
var menuIcon =
(item[1] + '').trim(
);
var hasSubMenu = menuPath.toLowerCase() === 'javascript:;';
var aTagAttr = {};
if (hasSubMenu) {
...
...
layout/_mixins/post-header.pug
浏览文件 @
f85772e6
...
...
@@ -45,7 +45,7 @@ mixin postHeader(post)
- var READING_TIME_UNIT = "m";
span= min2read(post.content, {cn: postReadingTime.speed.zh, en: postReadingTime.speed.en}) + READING_TIME_UNIT
if
_.get(theme, 'valine.enable') && _.get(theme, 'valine.visitor')
if
theme.valine.enable && theme.valine.visitor
span(id=url_for(post.path) data-flag-title=post.title).leancloud_visitors
i(class=`${faPrefix} fa-eye`)
if !theme.post_meta.icon_only
...
...
layout/_partials/config.pug
浏览文件 @
f85772e6
-
var algolia = "undefined";
var env = process.env;
if (
_.get(theme, 'algolia_search.enable')
) {
if (
theme.algolia_search.enable
) {
algolia = JSON.stringify({
appId: env.ALGOLIA_APP_ID || config.algolia.appId || config.algolia.applicationID,
apiKey: env.ALGOLIA_API_KEY || config.algolia.apiKey,
...
...
@@ -23,7 +23,7 @@
}
var sidebar = "undefined";
if (
_.get(theme, 'sidebar.enable')
) {
if (
theme.sidebar.enable
) {
sidebar = JSON.stringify({
offsetTop: theme.sidebar.offsetTop,
tocMaxDepth: theme.toc.max_depth
...
...
@@ -31,8 +31,8 @@
}
var header = "undefined";
if (
_.get(theme, 'header.enable')
) {
var isScrollDownIcon =
_.get(theme, 'header.scroll_down_icon.enable')
|| false;
if (
theme.header.enable
) {
var isScrollDownIcon =
theme.header.scroll_down_icon.enable
|| false;
header = JSON.stringify({
enable: theme.header.enable,
...
...
@@ -43,7 +43,7 @@
var post_widget = "undefined";
if (theme.post_widget) {
var end_text =
_.get(theme, 'post_widget.end_text.enable')
|| false;
var end_text =
theme.post_widget.end_text.enable
|| false;
if (end_text) {
post_widget = JSON.stringify({
...
...
@@ -53,22 +53,22 @@
}
var night_mode = "undefined";
if (
_.get(theme, 'night_mode.enable')
) {
if (
theme.night_mode.enable
) {
night_mode = JSON.stringify({
enable: theme.night_mode.enable,
});
}
var back2top = "undefined";
if (
_.get(theme, 'back2top.enable')
) {
if (
theme.back2top.enable
) {
back2top = JSON.stringify({
enable: theme.back2top.enable
});
}
var codeStyle =
_.get(theme, 'codeblock.style')
|| 'default';
var highlight =
_.get(theme, 'codeblock.highlight')
|| 'light';
var wordWrap =
_.get(theme, 'codeblock.word_wrap')
|| false;
var codeStyle =
theme.codeblock.style
|| 'default';
var highlight =
theme.codeblock.highlight
|| 'light';
var wordWrap =
theme.codeblock.word_wrap
|| false;
var codeblock = JSON.stringify({
style: codeStyle,
highlight: highlight,
...
...
@@ -76,22 +76,22 @@
});
var zoom_image = "undefined";
if (
_.get(theme, 'zoom_image.enable')
) {
if (
theme.zoom_image.enable
) {
zoom_image = JSON.stringify(theme.zoom_image);
}
var gallery_waterfall = "undefined";
if (
_.get(theme, 'gallery_waterfall.enable')
) {
if (
theme.gallery_waterfall.enable
) {
gallery_waterfall = JSON.stringify(theme.gallery_waterfall);
}
var lazyload = "undefined";
if (
_.get(theme, 'lazyload.enable')
) {
if (
theme.lazyload.enable
) {
lazyload = JSON.stringify(theme.lazyload);
}
var pjax_config = "undefined";
if (
_.get(theme, 'pjax.enable')
) {
if (
theme.pjax.enable
) {
pjax_config = JSON.stringify({
scrollTo2screen: theme.pjax.scrollTo2screen
});
...
...
@@ -99,8 +99,8 @@
var external_link = "undefined";
if (theme.external_link) {
var iconEnable =
_.get(theme, 'external_link.icon.enable')
|| false;
var iconName =
_.get(theme, 'external_link.icon.name')
|| '';
var iconEnable =
theme.external_link.icon.enable
|| false;
var iconName =
theme.external_link.icon.name
|| '';
if (iconEnable) {
external_link = JSON.stringify({
...
...
@@ -114,7 +114,7 @@
var shortcuts = "undefined";
if (theme.shortcuts) {
var isSwitchPost =
_.get(theme, 'shortcuts.switch_post.enable')
|| false;
var isSwitchPost =
theme.shortcuts.switch_post.enable
|| false;
if (isSwitchPost) {
shortcuts = JSON.stringify({
...
...
layout/_partials/footer/footer.pug
浏览文件 @
f85772e6
...
...
@@ -39,7 +39,7 @@ if fPowered || fTheme
if footer.theme.version
span= " v" + stun_env("version") + "."
if
_.get(theme, 'busuanzi.enable')
if
theme.busuanzi.enable
include ../analytics/busuanzi.pug
if footer.custom.enable
...
...
layout/_partials/head/head.pug
浏览文件 @
f85772e6
...
...
@@ -47,7 +47,7 @@ if theme.qihu360_site_verification
if theme.sougou_site_verification
meta(name="sogou_site_verification" content=theme.sougou_site_verification)
if
_.get(theme, 'pwa.enable')
if
theme.pwa.enable
if theme.pwa.theme_color
meta(name="theme-color" content=theme.pwa.theme_color)
if theme.pwa.manifest
...
...
@@ -68,7 +68,7 @@ if theme.favicon.msapplication
if theme.canonical
link(ref="canonical" href=full_url_for(page.path))
if
_.get(theme, 'feed.rss')
if
theme.feed.rss
link(rel="alternate" href=url_for(theme.feed.rss) type="application/atom+xml")
link(rel="dns-prefetch" href="https://cdn.jsdelivr.net")
...
...
@@ -82,20 +82,20 @@ if theme.fancybox
- if (theme.cdn.fancybox_css) fancybox_css = theme.cdn.fancybox_css;
link(rel="stylesheet" href=fancybox_css type="text/css")
if page.comments ||
_.get(theme, 'pjax.enable')
if
_.get(theme, 'gitalk.enable')
if page.comments ||
theme.pjax.enable
if
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")
if
_.get(theme, 'algolia_search.enable')
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")
if
_.get(theme, 'post_widget.share.enable')
if
theme.post_widget.share.enable
- var share_css = "https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css";
- if (
_.get(theme, 'cdn.share_css')
) share_css = theme.cdn.share_css;
- if (
theme.cdn.share_css
) share_css = theme.cdn.share_css;
link(rel="stylesheet" href=share_css type="text/css")
link(rel="stylesheet" href=`${url_for(theme.css)}/index.css?v=${stun_env("version")}`)
...
...
layout/_partials/header/header.pug
浏览文件 @
f85772e6
...
...
@@ -6,21 +6,21 @@ nav.header-nav(class=`${isNoHeader ? 'header-nav--sticky' : 'header-nav--fixed'}
div.header-nav-menu
+menuItem(theme.menu)
if
_.get(theme, 'algolia_search.enable') || _.get(theme, 'local_search.enable')
if
theme.algolia_search.enable || theme.local_search.enable
div.header-nav-search
if !theme.menu_settings.text_only
i(class=`${faPrefix} fa-search`)
if !theme.menu_settings.icon_only
span!= __("nav.search")
if
_.get(theme, 'night_mode.enable')
if
theme.night_mode.enable
div.header-nav-mode
include ../widgets/night-mode.pug
if !isNoHeader
div.header-info(
style=`${
(
_.get(theme, 'header.bg_image.enable')
&& page.top_image)
(
theme.header.bg_image.enable
&& page.top_image)
? 'background: url(' + page.top_image + ') no-repeat center/cover;'
: ''
}`
...
...
@@ -29,6 +29,6 @@ if !isNoHeader
div.header-info-title= config.title
div.header-info-subtitle= config.subtitle
if
_.get(theme, 'header.scroll_down_icon.enable')
if
theme.header.scroll_down_icon.enable
div.header-info-arrow
i.fa.fa-angle-down.header-info-arrow__icon
layout/_partials/post/post-list.pug
浏览文件 @
f85772e6
...
...
@@ -11,11 +11,11 @@ section.post-list
if theme.post_list.cover_image.home && post.top_image
img(src=post.top_image)
if
_.get(post, 'photos.length')
if
post.photos && post.photos.length
+gallery(post)
- var isExcerpt = true;
if
_.get(theme, 'auto_excerpt.enable')
if
theme.auto_excerpt.enable
- var content = strip_html(post.content);
- var excerpt = content.substring(0, theme.auto_excerpt.length);
- content.length > theme.auto_excerpt.length ? excerpt += "......" : "";
...
...
layout/_partials/search/index.pug
浏览文件 @
f85772e6
if
_.get(theme, 'algolia_search.enable')
if
theme.algolia_search.enable
include ./algolia.pug
else if
_.get(theme, 'local_search.enable')
else if
theme.local_search.enable
include ./localsearch.pug
layout/_partials/sidebar/sidebar.pug
浏览文件 @
f85772e6
- var isShowToc = is_post() && ((page.toc !== false) &&
_.get(theme, 'toc.enable')
);
- var isShowToc = is_post() && ((page.toc !== false) &&
theme.toc.enable
);
if isShowToc
div.sidebar-nav
...
...
@@ -29,9 +29,9 @@ section.sidebar-ov(class=`${isShowToc ? "hide" : ""}`)
div.sidebar-ov-social
for value, name in (theme.social || {})
if name && value
- var item = value.split(
"||"
);
- var socialPath =
_.trim(_.get(item, "[0]")
);
- var socialIcon =
_.trim(_.get(item, "[1]")
);
- var item = value.split(
'||'
);
- var socialPath =
(item[0] + '').trim(
);
- var socialIcon =
(item[1] + '').trim(
);
a(
class="sidebar-ov-social__item"
href=socialPath
...
...
@@ -82,17 +82,17 @@ section.sidebar-ov(class=`${isShowToc ? "hide" : ""}`)
if theme.menu && (theme.menu.archives || theme.menu.categories || theme.menu.tags)
div.sidebar-ov-state
if theme.menu.archives
- var menuArchives =
_.trim(_.get(theme.menu.archives.split("||"), "[0]")
);
- var menuArchives =
(theme.menu.archives.split('||')[0] + '').trim(
);
a.sidebar-ov-state__a.posts(href=menuArchives)
div.sidebar-ov-state__a--count= site.posts.length
div.sidebar-ov-state__a--name= __("sidebar.archives")
if theme.menu.categories
- var menuCategories =
_.trim(_.get(theme.menu.categories.split("||"), "[0]")
);
- var menuCategories =
(theme.menu.categories.split('||')[0] + '').trim(
);
a.sidebar-ov-state__a.categories(href=menuCategories)
div.sidebar-ov-state__a--count= site.categories.length
div.sidebar-ov-state__a--name= __("sidebar.categories")
if theme.menu.tags
- var menuTags =
_.trim(_.get(theme.menu.tags.split("||"), "[0]")
);
- var menuTags =
(theme.menu.tags.split('||')[0] + '').trim(
);
a.sidebar-ov-state__a.tags(href=menuTags)
div.sidebar-ov-state__a--count= site.tags.length
div.sidebar-ov-state__a--name= __("sidebar.tags")
...
...
layout/_partials/widgets/comments.pug
浏览文件 @
f85772e6
if
_.get(theme, 'disqus.enable')
if
theme.disqus.enable
div#comments.comments
div#disqus_thread
else if
_.get(theme, 'valine.enable')
else if
theme.valine.enable
div#comments.comments
div#valine-container
else if
_.get(theme, 'gitalk.enable')
else if
theme.gitalk.enable
div#comments.comments
div#gitalk-container
else if
_.get(theme, 'utterances.enable')
else if
theme.utterances.enable
div#comments.comments
div#utterances-container
else if
_.get(theme, 'livere.enable')
else if
theme.livere.enable
div#comments.comments
div#lv-container(data-id="city" data-uid=theme.livere.uid)
layout/_scripts/stun.pug
浏览文件 @
f85772e6
...
...
@@ -3,5 +3,5 @@ script(src=`${url_for(theme.js)}/stun-boot.js?v=${stun_env("version")}`)
script(src=`${url_for(theme.js)}/scroll.js?v=${stun_env("version")}`)
script(src=`${url_for(theme.js)}/header.js?v=${stun_env("version")}`)
if
_.get(theme, 'sidebar.enable')
if
theme.sidebar.enable
script(src=`${url_for(theme.js)}/sidebar.js?v=${stun_env("version")}`)
layout/_scripts/vendors.pug
浏览文件 @
f85772e6
...
...
@@ -3,42 +3,42 @@
var velocity_js = "https://cdn.jsdelivr.net/npm/velocity-animate@1.5.2/velocity.min.js";
var velocity_ui_js = "https://cdn.jsdelivr.net/npm/velocity-animate@1.5.2/velocity.ui.min.js";
if (
_.get(theme, 'cdn.jquery')
) jquery_js = theme.cdn.jquery;
if (
_.get(theme, 'cdn.velocity')
) velocity_js = theme.cdn.velocity;
if (
_.get(theme, 'cdn.velocity_ui')
) velocity_ui_js = theme.cdn.velocity_ui;
if (
theme.cdn.jquery
) jquery_js = theme.cdn.jquery;
if (
theme.cdn.velocity
) velocity_js = theme.cdn.velocity;
if (
theme.cdn.velocity_ui
) velocity_ui_js = theme.cdn.velocity_ui;
script(src=jquery_js)
script(src=velocity_js)
script(src=velocity_ui_js)
if
_.get(theme, 'canvas_ribbon.enable')
if
theme.canvas_ribbon.enable
- var ribbon_js = "https://cdn.jsdelivr.net/npm/ribbon.js@latest/dist/ribbon.min.js";
- var ribbon = theme.canvas_ribbon;
- if (
_.get(theme, 'cdn.canvas_ribbon')
) ribbon_js = theme.cdn.canvas_ribbon;
- if (
theme.cdn.canvas_ribbon
) ribbon_js = theme.cdn.canvas_ribbon;
script(src=ribbon_js size=ribbon.size alpha=ribbon.alpha zIndex=ribbon.zIndex)
if
_.get(theme, 'canvas_nest.enable')
if
theme.canvas_nest.enable
- var nest_js = "https://cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-nest@latest/canvas-nest.min.js";
- var nest = theme.canvas_nest;;
- if (
_.get(theme, 'cdn.canvas_nest')
) nest_js = theme.cdn.canvas_nest;
- if (
theme.cdn.canvas_nest
) nest_js = theme.cdn.canvas_nest;
script(src=nest_js color=nest.color opacity=nest.opacity count=nest.count zIndex=nest.zIndex)
if theme.fancybox
- var fancybox_js = "https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js";
- if (
_.get(theme, 'cdn.fancybox_js')
) fancybox_js = theme.cdn.fancybox_js;
- if (
theme.cdn.fancybox_js
) fancybox_js = theme.cdn.fancybox_js;
script(src=fancybox_js)
if
_.get(theme, 'gallery_waterfall.enable')
if
theme.gallery_waterfall.enable
- var masonry_js = "https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js";
- if (
_.get(theme, 'cdn.masonry')
) masonry_js = theme.cdn.masonry;
- if (
theme.cdn.masonry
) masonry_js = theme.cdn.masonry;
script(src=masonry_js)
if
_.get(theme, 'lazyload.enable')
if
theme.lazyload.enable
- var lazyload_js = "https://cdn.jsdelivr.net/npm/lazyload@2.0.0-rc.2/lazyload.min.js";
- if (
_.get(theme, 'cdn.lazyload')
) lazyload_js = theme.cdn.lazyload;
- if (
theme.cdn.lazyload
) lazyload_js = theme.cdn.lazyload;
script(src=lazyload_js)
if
_.get(theme, 'post_widget.share.enable')
if
theme.post_widget.share.enable
- var share_js = "https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js";
- if (
_.get(theme, 'cdn.share_js')
) share_js = theme.cdn.share_js;
- if (
theme.cdn.share_js
) share_js = theme.cdn.share_js;
script(src=share_js)
layout/_third-party/advertising/index.pug
浏览文件 @
f85772e6
if
_.get(theme, 'google_adsense.enable')
if
theme.google_adsense.enable
include ./google-adsense.pug
layout/_third-party/analytics/busuanzi.pug
浏览文件 @
f85772e6
if
_.get(theme, 'busuanzi.enable') && (_.get(theme, 'busuanzi.site_uv.enable') || _.get(theme, 'busuanzi.site_pv.enable') || _.get(theme, 'busuanzi.post_pv.enable')
)
if
theme.busuanzi.enable && (theme.busuanzi.site_uv.enable || theme.busuanzi.site_pv.enable || theme.busuanzi.post_pv.enable
)
- var busuanzi_js = "https://cdn.jsdelivr.net/gh/sukkaw/busuanzi@latest/bsz.pure.mini.js";
- if (
_.get(theme, 'cdn.busuanzi')
) busuanzi_js = theme.cdn.busuanzi;
- if (
theme.cdn.busuanzi
) busuanzi_js = theme.cdn.busuanzi;
script(src=busuanzi_js async)
layout/_third-party/comments/gitalk.pug
浏览文件 @
f85772e6
...
...
@@ -13,7 +13,7 @@ script(src=gitalk_js)&attributes(dataPjax)
script(src=gitalk_md5)&attributes(dataPjax)
-
var gtLang =
_.get(theme, "gitalk.language")
var gtLang =
theme.gitalk.language
? theme.gitalk.language
: config.language;
...
...
layout/_third-party/comments/index.pug
浏览文件 @
f85772e6
if page.comments ||
_.get(theme, 'pjax.enable')
if
_.get(theme, 'disqus.enable')
if page.comments ||
theme.pjax.enable
if
theme.disqus.enable
include ./disqus.pug
else if
_.get(theme, 'valine.enable')
else if
theme.valine.enable
include ./valine.pug
else if
_.get(theme, 'gitalk.enable')
else if
theme.gitalk.enable
include ./gitalk.pug
else if
_.get(theme, 'utterances.enable')
else if
theme.utterances.enable
include ./utterances.pug
else if
_.get(theme, 'livere.enable')
else if
theme.livere.enable
include ./livere.pug
else if
_.get(theme, 'valine.enable') && _.get(theme, 'valine.visitor')
else if
theme.valine.enable && theme.valine.visitor
include ./valine.pug
layout/_third-party/pjax.pug
浏览文件 @
f85772e6
...
...
@@ -31,9 +31,9 @@
}
pjaxArgs = JSON.stringify(pjaxArgs);
if
_.get(theme, 'pjax.enable')
if
theme.pjax.enable
- var pjax_js = "https://cdn.jsdelivr.net/npm/pjax@latest/pjax.min.js";
- if (
_.get(theme, 'cdn.pjax')
) pjax_js = theme.cdn.pjax;
- if (
theme.cdn.pjax
) pjax_js = theme.cdn.pjax;
script(src=pjax_js)
script.
...
...
layout/_third-party/quicklink.pug
浏览文件 @
f85772e6
...
...
@@ -2,7 +2,7 @@ if theme.quicklink.enable
-
var loadQuicklink = false;
var quicklink_js = "https://cdn.jsdelivr.net/npm/quicklink@1.0.1/dist/quicklink.umd.js";
if (
_.get(theme, 'cdn.quicklink')
) quicklink_js = theme.cdn.quicklink;
if (
theme.cdn.quicklink
) quicklink_js = theme.cdn.quicklink;
if is_home() && theme.quicklink.home
- loadQuicklink = true;
...
...
@@ -10,7 +10,7 @@ if theme.quicklink.enable
- loadQuicklink = true;
if theme.pjax.enable
- loadQuicklink = true;
if loadQuicklink || (
_.get(page, 'quicklink') || _.get(post, 'quicklink')
)
if loadQuicklink || (
page.quicklink || post.quicklink
)
script(src=quicklink_js)
script.
function initQuicklink() {
...
...
layout/_third-party/search/algolia.pug
浏览文件 @
f85772e6
-
var instantsearch_js = "https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js";
if (
_.get(theme, 'cdn.instantsearch_js')
) {
if (
theme.cdn.instantsearch_js
) {
instantsearch_js = theme.cdn.instantsearch_js;
}
...
...
layout/_third-party/search/index.pug
浏览文件 @
f85772e6
if
_.get(theme, 'algolia_search.enable')
if
theme.algolia_search.enable
include ./algolia.pug
else if
_.get(theme, 'local_search.enable')
else if
theme.local_search.enable
include ./localsearch.pug
layout/page.pug
浏览文件 @
f85772e6
...
...
@@ -20,9 +20,9 @@ block content
!= list_categories()
else
div.custom-page
if
_.get(page, 'photos.length')
if
page.photos && page.photos.length
+gallery(page)
!= page.content
if (page.reward === true) &&
_.get(theme, 'reward.enable')
if (page.reward === true) &&
theme.reward.enable
include ./_partials/widgets/reward.pug
layout/post.pug
浏览文件 @
f85772e6
...
...
@@ -9,7 +9,7 @@ block content
+postHeader(page)
div.post-body
if
_.get(page, 'photos.length')
if
page.photos && page.photos.length
+gallery(page)
!= page.content
...
...
@@ -32,10 +32,10 @@ block content
i.post-tags-item__i(class=`${faPrefix} fa-tags`)
a.post-tags-item__a(href=tag.permalink)= tag.name
if
_.get(theme, 'post_widget.share.enable')
if
theme.post_widget.share.enable
include ./_partials/widgets/share.pug
if (page.reward !== false) &&
_.get(theme, 'reward.enable')
if (page.reward !== false) &&
theme.reward.enable
include ./_partials/widgets/reward.pug
include ./_partials/widgets/pagination.pug
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录