Commit e47248b0 authored by caihaifei's avatar caihaifei

update theme files.

parent ff99bd48
Pipeline #15357 canceled with stage
stun @ 7d8f6db2
Subproject commit 7d8f6db2692a8d1284c346d7af26f22f5867cf6e
This diff is collapsed.
# Site title
title:
home: Home
archive: Archive
category: Category
tag: Tag
# Header nav
nav:
search: Search
# Header menu
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
# Archives page, Categories page, Tags page
page:
tags: Tags
categories: Categories
posts-empty: No articles
posts-total: Total %s Articles, Go on!
# Sidebar
sidebar:
overview: Overview
catalog: Catalog
subscribe: Subscribe
archives: Archives
categories: Categories
tags: Tags
read_info: You have read
# Social link
social:
github: Github
google: Google
twitter: Twitter
youtube: Youtube
segmentfault: Segmentfault
zhihu: Zhihu
weibo: Weibo
wechat: Wechat
telegram: Telegram
qq: QQ
# Article
post:
created: Created
updated: Updated
word_count: Words
reading_count: Visited
reading_time: Reading
reading_unit: m
read_more: Read More
sticky: Sticky
untitled: "[ Untitled ]"
end: ------ END ------
copyright:
author: Author
link: Link
license_title: Copyright
license_content: All articles in this blog are licensed under <a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally
# Algolia search
algolia_search:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: '${hits} results found in ${time} ms'
# Local search
local_search:
input_placeholder: Search for Posts (Support multiple keywords)
hits_empty: We didn't find any results for the search
# Auxiliary search buttons
assist_search:
prompt_label: "Search by:"
prompt_input: Please enter characters
google: Google
bing: Bing
baidu: Baidu
# Reward
reward:
btn_text: Buy me a coffee
alipay: Alipay
wechat: Wechat
# Site footer
footer:
powered: Powered by %s
theme: Theme
site_uv: Visitors
site_pv: Views
# Prompt message
prompt:
copy_success: Copy Success
copy_error: Copy Error
popover:
copy_button: Copy
creative_commons: Creative Commons
post:
create_time: Created Time
update_time: Updated Time
word_count: Words Count
reading_time: Reading Time
visit_num: Visitors
site_uv: Unique Visitor
site_pv: Page View
# Site title
title:
home: Inicio
archive: Archivo
category: Categoría
tag: Etiqueta
# Header nav
nav:
search: Búsqueda
# Header menu
menu:
home: Inicio
archives: Archivos
categories: Categorías
tags: Etiquetas
about: Sobre Nosotros
# Archives page, Categories page, Tags page
page:
tags: Etiquetas
categories: Categorías
posts-empty: Sin artículos
posts-total: Hay %s artículos en total, ¡Adelante!
# Sidebar
sidebar:
overview: Reseña
catalog: Contenido
subscribe: Suscríbete
archives: Archivo
categories: Categorías
tags: Etiquetas
read_info: Has leído
# Social link
social:
github: Github
google: Google
twitter: Twitter
youtube: Youtube
segmentfault: Segmentfault
zhihu: Zhihu
weibo: Weibo
wechat: Wechat
telegram: Telegram
qq: QQ
# Article
post:
created: Creado
updated: Actualizado
word_count: Palabras
reading_count: Visitado
reading_time: Leyendo
reading_unit: m
read_more: Leer más
sticky: pegajoso
untitled: "[ Sin título ]"
end: ------ FIN ------
copyright:
author: Autor
link: Enlace
license_title: Copyright
license_content: Todos los artículos de este blog están bajo licencia de <a href="%s" rel="external nofollow" target="_blank">%s</a> a menos que se indique lo contrario
# Algolia search
algolia_search:
input_placeholder: Buscar entradas
hits_empty: "No encontramos resultados para la búsqueda: ${query}"
hits_stats: '${hits} resultados encontrados en ${time} ms'
# Local search
local_search:
input_placeholder: Buscar entradas (Soporte para varias palabras)
hits_empty: No encontramos resultados para la búsqueda
# Reward
reward:
btn_text: Cómprame un café
alipay: Alipay
wechat: Wechat
# Site footer
footer:
powered: Potenciado por %s
theme: Tema
site_uv: Visitantes
site_pv: Vistas
# Prompt message
prompt:
copy_success: Éxito en copia
copy_error: Error en copia
popover:
copy_button: Copiar
creative_commons: Creative Commons
post:
create_time: Hora de creación
update_time: Hora de actualización
word_count: Conteo de palabras
reading_time: Tiempo de lectura
visit_num: Visitantes
site_uv: Visitantes únicos
site_pv: Vista de página
# 网站标题
title:
home: 首页
archive: 归档
category: 分类
tag: 标签
# 导航栏
nav:
search: 搜索
# 导航栏菜单
menu:
home: 首页
archives: 归档
categories: 分类
tags: 标签
about: 关于
# 归档页、分类页、标签页
page:
tags: 标签
categories: 分类
posts-empty: 目前还没有文章哦!
posts-total: 目前共计 %s 篇文章,继续加油!
# 侧边栏
sidebar:
overview: 站点概览
catalog: 文章目录
subscribe: 订阅
archives: 归档
categories: 分类
tags: 标签
read_info: 你已阅读了
# 社交链接
social:
github: Github
google: Google
twitter: Twitter
youtube: Youtube
segmentfault: 思否
zhihu: 知乎
weibo: 微博
wechat: 微信
telegram: Telegram
qq: QQ
# 文章
post:
created: 发表于
updated: 更新于
word_count: 字数统计
reading_count: 阅读次数
reading_time: 阅读时长
reading_unit:
read_more: 阅读全文
sticky: 置顶文章
untitled: "[ 文章无标题 ]"
end: ------ 本文结束,感谢您的阅读 ------
copyright:
author: 本文作者
link: 本文链接
license_title: 版权声明
license_content: 本博客所有文章除特别声明外,均采用 <a href="%s" rel="external nofollow" target="_blank">%s</a> 许可协议。转载请注明出处!
# Algolia 搜索
algolia_search:
input_placeholder: 搜索文章
hits_empty: '没有找到任何搜索结果:${query}'
hits_stats: '找到 ${hits} 条搜索结果,耗时 ${time} 毫秒'
# 本地搜索
local_search:
input_placeholder: 搜索文章(支持多关键词,请用空格分隔)
hits_empty: 没有找到任何搜索结果
# 搜索的辅助按钮
assist_search:
prompt_label: "使用搜索:"
prompt_input: 请输入字符
google: 谷歌
bing: 必应
baidu: 百度
# 打赏
reward:
btn_text: 请我喝杯咖啡~
alipay: 支付宝打赏
wechat: 微信打赏
# 网站底部
footer:
powered: 由 %s 强力驱动
theme: 主题
site_uv: 访问人数
site_pv: 浏览总量
# 提示信息
prompt:
copy_success: 复制成功
copy_error: 复制失败
popover:
copy_button: 复制
creative_commons: 知识共享许可协议
post:
create_time: 发表时间
update_time: 修改时间
word_count: 字数统计
reading_time: 阅读时间
visit_num: 阅读次数
site_uv: 访问人数
site_pv: 浏览总量
# 網站標題
title:
home: 首頁
archive: 歸檔
category: 分類
tag: 標籤
# 巡覽列
nav:
search: 檢索
# 巡覽列選單
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
# 歸檔頁、分類頁、標籤頁
page:
tags: 標籤
categories: 分類
posts-empty: 現時還沒有文章哦!
posts-total: 現時共計 %s 篇文章,繼續加油!
# 側邊欄
sidebar:
overview: 本站概覽
catalog: 文章目錄
subscribe: 訂閱
archives: 歸檔
categories: 分類
tags: 標籤
read_info: 你已閱讀了
# 社交連結
social:
github: Github
google: Google
twitter: Twitter
youtube: Youtube
segmentfault: 思否
zhihu: 知乎
weibo: 微博
wechat: 微信
telegram: Telegram
qq: QQ
# 文章
post:
created: 發表於
updated: 更新於
word_count: 字數統計
reading_count: 閱讀次數
reading_time: 閱讀時長
reading_unit:
read_more: 閱讀全文
sticky: 置頂文章
untitled: "[ 文章無標題 ]"
end: ------ 本文結束,感謝您的閱讀 ------
copyright:
author: 本文作者
link: 本文連結
license_title: 版權聲明
license_content: 本部落格所有文章除特別聲明外,均採用 <a href="%s" rel="external nofollow" target="_blank">%s</a> 許可協議。轉載請注明出處!
# Algolia 檢索
algolia_search:
input_placeholder: 檢索文章
hits_empty: '沒有找到任何檢索結果:${query}'
hits_stats: '找到 ${hits} 條檢索結果,耗時 ${time} 毫秒'
# 本地檢索
local_search:
input_placeholder: 檢索文章(支持多關鍵字,請用空格分隔)
hits_empty: 沒有找到任何檢索結果
# 搜索的輔助按鈕
assist_search:
prompt_label: "使用搜索:"
prompt_input: 請輸入字符
google: 谷歌
bing: 必應
baidu: 百度
# 打賞
reward:
btn_text: 請我喝杯咖啡~
alipay: 支付寶打賞
wechat: 微信打賞
# 網站底部
footer:
powered: 由 %s 強力驅動
theme: 主題
site_uv: 訪客總數
site_pv: 總瀏覽次數
# 提示信息
prompt:
copy_success: 複製成功
copy_error: 複製失敗
popover:
copy_button: 複製
creative_commons: 知識共享許可協議
post:
create_time: 發表時間
update_time: 修改時間
word_count: 字數統計
reading_time: 閱讀時間
visit_num: 閱讀次數
site_uv: 訪客總數
site_pv: 總瀏覽次數
-
var HEXO_URL = 'http://hexo.io/';
var STUN_URL = 'https://github.com/liuyib/hexo-theme-stun/';
var isNoHeader = !theme.header.enable || (is_post() && !theme.header.show_on.post);
var isEnableNoHeader = !theme.header.enable || !theme.header.show_on.post;
var isShowReward = typeof page.reward === 'boolean' ? page.reward === true : (theme.reward.enable && is_post());
var isShowCC = typeof page.copyright === 'boolean' ? page.copyright === true : (theme.creative_commons.enable && is_post());
var pjax = false;
var dataPjax = {};
if (theme.pjax.enable) {
pjax = true;
dataPjax = { 'data-pjax': '' };
}
var ccLicense = '';
var ccLanguage = '';
if (theme.creative_commons) {
var cc = theme.creative_commons;
ccLicense = cc.license && cc.license.toLowerCase();
ccLanguage = cc.language && cc.language.toLowerCase() || 'en';
}
var ccUrl = `https://creativecommons.org/licenses/${ccLicense}/4.0/deed.${ccLanguage}`;
doctype html
html(lang=config.language)
head
include ./_partials/head/head.pug
body
div#container.container
header#header.header
div.header-inner(class=`${isNoHeader ? 'header-inner--height header-inner--bgcolor' : ''}`)
include ./_partials/header/header.pug
main#main.main
div.main-inner
div#content-wrap.content-wrap(
class=`${page.sidebar === false ? 'content-wrap--noside' : ''}`
)
div#content.content(class=`${is_home() ? 'content-home' : ''}`)
block content
if (is_archive() && theme.post_list.paginate.archives) || is_category() || is_tag()
include ./_partials/widgets/paginator.pug
if page.comments
include ./_partials/widgets/comments.pug
if page.sidebar !== false && theme.sidebar.enable
div#sidebar-wrap.sidebar-wrap
aside#sidebar.sidebar
include ./_partials/sidebar/sidebar.pug
div.clearfix
footer#footer.footer
div.footer-inner
include ./_partials/footer/footer.pug
include ./_partials/widgets/loading-bar.pug
if theme.back2top.enable
include ./_partials/widgets/back2top.pug
include ./_partials/search/index.pug
include ./_scripts/vendors.pug
include ./_third-party/search/index.pug
if pjax
include ./_third-party/pjax.pug
div#pjax-reload
include ./_third-party/math/index.pug
include ./_third-party/quicklink.pug
include ./_third-party/analytics/busuanzi.pug
else
include ./_third-party/math/index.pug
include ./_third-party/quicklink.pug
include ./_third-party/analytics/busuanzi.pug
include ./_third-party/comments/index.pug
include ./_scripts/stun.pug
mixin gallery(post)
div.gallery
each photo in post.photos
img(src=url_for(photo))
mixin menuItem(menu, className)
each value, name in (menu || {})
if name && value
-
var item = value.split('||');
var menuPath = item[0] ? item[0].trim() : '/';
var menuIcon = item[1] ? item[1].trim() : false;
var hasSubMenu = menuPath.toLowerCase() === 'javascript:;';
var aTagAttr = {};
if (hasSubMenu) aTagAttr.onclick = 'return false;';
div(class=`header-nav-${className || ''}menu-item`)
a(
href=hasSubMenu ? 'javascript:;' : menuPath
class=`header-nav-${className || ''}menu-item__link`
)&attributes(aTagAttr)
if !theme.menu_settings.text_only && menuIcon
span(class=`header-nav-${className || ''}menu-item__icon`)
i(class=menuIcon)
if !theme.menu_settings.icon_only
span(class=`header-nav-${className || ''}menu-item__text`)= __(`menu.${name}`)
if hasSubMenu
div.header-nav-submenu
+menuItem(theme.submenu[name], 'sub')
mixin postMetaItem({ isIconOnly, iconClass, iconText, popoverPos, popoverText, valueText, valueAttr })
-
var iconElemAttr = {};
var valElemAttr = {};
if (isIconOnly) {
iconElemAttr['data-popover'] = popoverText;
iconElemAttr['data-popover-pos'] = popoverPos;
}
if (valueAttr) {
valElemAttr = valueAttr;
}
span.post-meta-item__icon&attributes(iconElemAttr)
i(class=iconClass)
if !isIconOnly
span.post-meta-item__info= iconText
span.post-meta-item__value&attributes(valElemAttr)= valueText
include ./meta-item.pug
mixin postHeader(post)
header.post-header
if post.top
include ../_partials/widgets/sticky-top.pug
h1.post-title
if post.link
a.post-title__link(href=url_for(post.link) target="_blank" rel="noopener" )
= post.title || post.link
else if is_post()
= post.title || __('post.untitled')
else
a.post-title__link(href=url_for(post.path))
= post.title || __('post.untitled')
if !post.link
- var isPostMetaIconOnly = theme.post_meta.icon_only;
div.post-meta
if theme.post_meta.created.enable
span.post-meta-item.post-meta-item--createtime
- var iconClass = theme.post_meta.created.icon;
+postMetaItem({
isIconOnly: isPostMetaIconOnly,
iconClass: iconClass,
iconText: __('post.created'),
popoverPos: 'up',
popoverText: __('popover.post.create_time'),
valueText: full_date(post.date, 'YYYY-MM-DD')
})
if theme.post_meta.updated.enable
span.post-meta-item.post-meta-item--updatetime
- var iconClass = theme.post_meta.updated.icon;
+postMetaItem({
isIconOnly: isPostMetaIconOnly,
iconClass: iconClass,
iconText: __('post.updated'),
popoverPos: 'up',
popoverText: __('popover.post.update_time'),
valueText: full_date(post.updated, 'YYYY-MM-DD')
})
if theme.post_meta.word_count.enable
span.post-meta-item.post-meta-item--wordcount
- var iconClass = theme.post_meta.word_count.icon;
+postMetaItem({
isIconOnly: isPostMetaIconOnly,
iconClass: iconClass,
iconText: __('post.word_count'),
popoverPos: 'up',
popoverText: __('popover.post.word_count'),
valueText: wordcount(post.content)
})
if theme.post_meta.reading_time.enable
span.post-meta-item.post-meta-item--readtime
- var iconClass = theme.post_meta.reading_time.icon;
- var postRead = theme.post_meta.reading_time;
+postMetaItem({
isIconOnly: isPostMetaIconOnly,
iconClass: iconClass,
iconText: __('post.reading_time'),
popoverPos: 'up',
popoverText: __('popover.post.reading_time'),
valueText: `${min2read(post.content, { cn: postRead.speed.zh, en: postRead.speed.en })}${__('post.reading_unit')}`
})
if theme.waline.enable && theme.waline.visitor
span(id=url_for(post.path) data-flag-title=post.title).post-meta-item.post-meta-item--visitors.leancloud_visitors
- var iconClass = theme.icon.waline_visitor;
+postMetaItem({
isIconOnly: isPostMetaIconOnly,
iconClass: iconClass,
iconText: __('post.reading_count'),
popoverPos: 'up',
popoverText: __('popover.post.visit_num'),
valueAttr: {
class: 'leancloud-visitors-count'
}
})
if theme.valine.enable && theme.valine.visitor
span(id=url_for(post.path) data-flag-title=post.title).post-meta-item.post-meta-item--visitors.leancloud_visitors
- var iconClass = theme.icon.valine_visitor;
+postMetaItem({
isIconOnly: isPostMetaIconOnly,
iconClass: iconClass,
iconText: __('post.reading_count'),
popoverPos: 'up',
popoverText: __('popover.post.visit_num'),
valueAttr: {
class: 'leancloud-visitors-count'
}
})
//- Can`t show the result of busuanzi counting in homepage, because will conflict by ID selector.
if is_post()
if theme.busuanzi.enable && theme.busuanzi.post_pv.enable
span.post-meta-item.post-meta-item--visitors
- var iconClass = theme.busuanzi.post_pv.icon;
+postMetaItem({
isIconOnly: isPostMetaIconOnly || theme.busuanzi.icon_only,
iconClass: iconClass,
iconText: __('post.reading_count'),
popoverPos: 'up',
popoverText: __('popover.post.visit_num'),
valueAttr: {
id: 'busuanzi_value_page_pv'
}
})
mixin timeline(posts)
section.timeline
- var year, tmpYear;
- var sortPosts = [];
//- Sort posts by date in descending order.
each post in posts
if sortPosts.length === 0
- sortPosts.push(post)
else
each sPost, index in sortPosts
- var isBigTime = new Date(post.date).getTime() > new Date(sPost.date).getTime();
if post.top
if !sPost.top || isBigTime
- sortPosts.splice(index, 0, post)
- break
else if index + 1 === sortPosts.length
- sortPosts.push(post)
- break
else
if !sPost.top && isBigTime
- sortPosts.splice(index, 0, post)
- break
else if index + 1 === sortPosts.length
- sortPosts.push(post)
- break
each post in sortPosts
if post.date
- tmpYear = full_date(post.date, 'YYYY')
if tmpYear !== year
- year = tmpYear
time.timeline-item.timeline-item--year= year
article.timeline-item
if post.date
time.timeline-item__time= full_date(post.date, 'MM-DD')
h2.timeline-item__title
if post.link
a(
class="timeline-item__link"
href=url_for(post.link)
target="_blank"
rel="noopener"
)= post.title || post.link
else
a(
class="timeline-item__link"
href=url_for(post.path)
)= post.title || __('post.untitled')
if post.top
include ../_partials/widgets/sticky-top.pug
div.busuanzi
-
var isBszIconOnly = theme.busuanzi.icon_only;
var iconElemAttr = {};
if (isBszIconOnly) iconElemAttr['data-popover-pos'] = 'up';
if theme.busuanzi.site_uv.enable
span.busuanzi-siteuv
- if (isBszIconOnly) iconElemAttr['data-popover'] = __('popover.site_uv');
span.busuanzi-siteuv__icon&attributes(iconElemAttr)
i(class=theme.busuanzi.site_uv.icon)
if !isBszIconOnly
span.busuanzi-siteuv__info= __('footer.site_uv')
span.busuanzi-siteuv__value#busuanzi_value_site_uv
if theme.busuanzi.site_pv.enable
span.busuanzi-sitepv
- if (isBszIconOnly) iconElemAttr['data-popover'] = __('popover.site_pv');
span.busuanzi-siteuv__icon&attributes(iconElemAttr)
i(class=theme.busuanzi.site_pv.icon)
if !isBszIconOnly
span.busuanzi-siteuv__info= __('footer.site_pv')
span.busuanzi-siteuv__value#busuanzi_value_site_pv
-
var algolia = 'undefined';
var env = process.env;
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,
indexName: env.ALGOLIA_INDEX_NAME || config.algolia.indexName,
hits: theme.algolia_search.hits,
languages: {
inputPlaceholder: __('algolia_search.input_placeholder'),
hitsEmpty: __('algolia_search.hits_empty'),
hitsStats: __('algolia_search.hits_stats')
}
});
}
var assistSearch = 'undefined';
if (theme.assist_search.enable) {
assistSearch = [];
for (var key in theme.assist_search) {
var value = theme.assist_search[key];
if (value && key !== 'enable') {
assistSearch.push(key);
}
}
assistSearch = JSON.stringify(assistSearch);
}
var fontIcon = 'undefined';
if (theme.icon) {
fontIcon = JSON.stringify({
prompt: {
success: theme.icon.prompt_success,
info: theme.icon.prompt_info,
warning: theme.icon.prompt_warning,
error: theme.icon.prompt_error
},
copyBtn: theme.icon.copy_btn
});
}
var sidebar = 'undefined';
if (theme.sidebar.enable) {
sidebar = JSON.stringify({
offsetTop: theme.sidebar.offsetTop,
tocMaxDepth: theme.toc.max_depth
});
}
var header = 'undefined';
if (theme.header.enable) {
var isScrollDownIcon = theme.header.scroll_down_icon.enable || false;
header = JSON.stringify({
enable: theme.header.enable,
showOnPost: theme.header.show_on.post,
scrollDownIcon: isScrollDownIcon,
});
}
var postWidget = 'undefined';
if (theme.post_widget) {
var endText = theme.post_widget.end_text.enable || false;
if (endText) {
postWidget = JSON.stringify({
endText: endText,
});
}
}
var nightMode = 'undefined';
if (theme.night_mode.enable) {
nightMode = JSON.stringify({
enable: theme.night_mode.enable,
});
}
var back2top = 'undefined';
if (theme.back2top.enable) {
back2top = JSON.stringify({
enable: theme.back2top.enable
});
}
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,
wordWrap: wordWrap
});
var zoomImage = 'undefined';
if (theme.zoom_image.enable) {
zoomImage = JSON.stringify({
gapAside: theme.zoom_image.gap_aside
});
}
var galleryWaterfall = 'undefined';
if (theme.gallery_waterfall.enable) {
galleryWaterfall = JSON.stringify({
colWidth: theme.gallery_waterfall.col_width,
gapX: theme.gallery_waterfall.gap_x
});
}
var pjaxConfig = 'undefined';
if (theme.pjax.enable) {
pjaxConfig = JSON.stringify({
avoidBanner: theme.pjax.avoid_banner
});
}
var externalLink = 'undefined';
if (theme.external_link) {
var iconEnable = theme.external_link.icon.enable || false;
var iconName = theme.external_link.icon.name || '';
if (iconEnable) {
externalLink = JSON.stringify({
icon: {
enable: iconEnable,
name: iconName
}
});
}
}
var shortcuts = 'undefined';
if (theme.shortcuts) {
var isSwitchPost = theme.shortcuts.switch_post.enable || false;
if (isSwitchPost) {
shortcuts = JSON.stringify({
switchPost: isSwitchPost
});
}
}
var prompt = JSON.stringify({
copyButton: __('popover.copy_button'),
copySuccess: __('prompt.copy_success'),
copyError: __('prompt.copy_error')
});
var sourcePath = JSON.stringify({
js: theme.js,
css: theme.css,
images: theme.images
});
script.
var Stun = window.Stun || {};
var CONFIG = {
root: '!{ config.root }',
algolia: !{ algolia },
assistSearch: !{ assistSearch },
fontIcon: !{ fontIcon },
sidebar: !{ sidebar },
header: !{ header },
postWidget: !{ postWidget },
nightMode: !{ nightMode },
back2top: !{ back2top },
codeblock: !{ codeblock },
reward: !{ isShowReward },
fancybox: !{ theme.fancybox },
zoomImage: !{ zoomImage },
galleryWaterfall: !{ galleryWaterfall },
lazyload: !{ theme.lazyload.enable },
pjax: !{ pjaxConfig },
externalLink: !{ externalLink },
shortcuts: !{ shortcuts },
prompt: !{ prompt },
sourcePath: !{ sourcePath },
};
window.CONFIG = CONFIG;
-
var footer = theme.footer;
var nowYear = new Date().getFullYear();
var startYear = footer.copyright.since || nowYear;
var endYear = footer.copyright.end || nowYear;
var footerCopyright = footer.copyright.enable
var footerBeian = footer.beian.enable
if footerCopyright || footerBeian
div
if footerCopyright
span= `Copyright © ${startYear}` + ((startYear !== endYear) ? `~${endYear}` : '')
if footer.icon.enable
span(class="footer__icon")
i(class=footer.icon.name)
else
span.footer__devider
span!= footer.copyright.text || config.author
if footerCopyright && footerBeian
span.footer__devider= '|'
if footerBeian
span!= footer.beian.icp
-
var footerPowered = footer.powered.enable
var footerTheme = footer.theme.enable
if footerPowered || footerTheme
div
if footerPowered
span
!= _p('footer.powered', link_to(HEXO_URL, 'Hexo', { external: true }))
if footer.powered.version
span= ' v' + hexo_env('version')
if footerPowered && footerTheme
span.footer__devider= '|'
if footerTheme
span= __('footer.theme') + ' - '
!= link_to(STUN_URL, 'Stun', { external: true })
if footer.theme.version
span= ' v' + stun_env('version')
if theme.busuanzi.enable
include ../analytics/busuanzi.pug
if footer.custom.enable
div!= footer.custom.text
-
var title = __('title') !== 'title' ? __('title') : config.title;
var subtitle = __('subtitle') !== 'subtitle' ? __('subtitle') : config.subtitle;
var author = __('author') !== 'author' ? __('author') : config.author;
var description = __('description') !== 'description' ? __('description') : config.description;
var keywords = config.author + ', ' + config.title;
var title_suffix = ' | ' + title;
if (is_home()) {
title = title + ((theme.index_subtitle && subtitle) ? (' | ' + subtitle) : '');
} else if (is_archive()) {
title = __('title.archive') + title_suffix;
} else if (is_category()) {
title = __('title.category') + ': ' + page.category + title_suffix;
} else if (is_tag()) {
title = __('title.tag') + ': ' + page.tag + title_suffix;
} else if (is_post()) {
title = (page.title || __('post.untitled')) + title_suffix;
} else {
if (page.type === 'tags') {
title = __('title.tag') + title_suffix;
} else if (page.type === 'categories') {
title = __('title.category') + title_suffix;
} else {
title = page.title + title_suffix;
}
}
meta(charset="UTF-8")
meta(http-equiv="X-UA-Compatible" content="IE=edge")
if (theme.kill_old_ie && theme.kill_old_ie.enable)
include ./kill-old-ie.pug
meta(name="viewport" content="width=device-width, initial-scale=1")
meta(name="format-detection" content="telephone=no")
meta(name="apple-mobile-web-app-capable" content="yes")
meta(name="apple-mobile-web-app-status-bar-style" content="black")
if theme.pwa.enable
if theme.pwa.theme_color
meta(name="theme-color" content=theme.pwa.theme_color)
if theme.pwa.manifest
link(rel="manifest" href=`${url_for(theme.pwa.manifest)}?v=${stun_env('version')}`)
if theme.favicon.small
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" 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" 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")
if theme.favicon.msapplication
meta(name="msapplication-TileImage" content=`${url_for(theme.favicon.msapplication)}`)
meta(name="msapplication-TileColor" content="#000000")
if theme.google_site_verification
meta(name="google-site-verification" content=theme.google_site_verification)
if theme.bing_site_verification
meta(name="msvalidate.01" content=theme.bing_site_verification)
if theme.baidu_site_verification
meta(name="baidu-site-verification" content=theme.baidu_site_verification)
if theme.qihu360_site_verification
meta(name="360-site-verification" content=theme.qihu360_site_verification)
if theme.sougou_site_verification
meta(name="sogou_site_verification" content=theme.sougou_site_verification)
!= open_graph()
title= title
if theme.canonical
link(ref="canonical" href=full_url_for(page.path))
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")
- var fontawesome_css = 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.12.1/css/all.min.css';
- if (theme.cdn.fontawesome) fontawesome_css = theme.cdn.fontawesome;
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';
- if (theme.cdn.fancybox_css) fancybox_css = theme.cdn.fancybox_css;
link(rel="stylesheet" href=fancybox_css type="text/css")
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 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 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 (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')}`)
if theme.google_analytics
link(rel="dns-prefetch" href="https://www.googletagmanager.com")
if theme.baidu_analytics
link(rel="dns-prefetch" href="https://hm.baidu.com")
if theme.tencent_analytics
link(rel="dns-prefetch" href="https://tajs.qq.com")
include ../../_third-party/advertising/index.pug
include ../../_third-party/analytics/index.pug
include ../config.pug
meta(name="renderer" content="webkit")
meta(name="force-rendering" content="webkit")
script.
if (/*@cc_on!@*/false || (!!window.MSInputMethodContext && !!document.documentMode)) {
window.location.href = '!{ theme.kill_old_ie.warning_url }';
}
include ../../_mixins/menu-item.pug
nav.header-nav(class=`${isNoHeader ? 'header-nav--sticky' : 'header-nav--fixed'}`)
div.header-nav-inner
div.header-nav-menubtn
i(class=theme.icon.menu_btn)
div.header-nav-menu
+menuItem(theme.menu)
if theme.algolia_search.enable || theme.local_search.enable
div.header-nav-search
if !theme.menu_settings.text_only
span.header-nav-search__icon
i(class=theme.icon.search)
if !theme.menu_settings.icon_only
span.header-nav-search__text= __('nav.search')
if theme.night_mode.enable
div.header-nav-mode
include ../widgets/night-mode.pug
if !isNoHeader
div.header-banner(
style=`${
(theme.header.bg_image.enable && page.top_image)
? 'background: url(' + page.top_image + ') no-repeat center/cover;'
: ''
}`
)
div.header-banner-info
div.header-banner-info__title= config.title
div.header-banner-info__subtitle= config.subtitle
if theme.header.scroll_down_icon.enable
div.header-banner-arrow
div.header-banner-arrow__icon
i(class=theme.header.scroll_down_icon.name)
section.postlist
include ../../_mixins/post-header.pug
include ../../_mixins/gallery.pug
- var postLists = theme.post_list.paginate.home ? page.posts : site.posts;
- postLists.each(function (post) {
article.postlist-item.post
+postHeader(post)
div.post-body
if theme.post_list.cover_image.home && post.top_image
img(src=post.top_image)
if post.photos && post.photos.length
+gallery(post)
- var isExcerpt = true;
if post.excerpt
div.post-excerpt!= post.excerpt
else
- isExcerpt = false;
div.post-excerpt!= post.content
if !post.link && isExcerpt
div.post-readmore
a.post-readmore__link(href=url_for(post.path))
span.post-readmore__text= __('post.read_more')
span.post-readmore__icon
i(class=theme.icon.read_more_btn)
- })
div.search-mask
div.search-popup
span.search-close
div.search-input
include ./assist-btns.pug
div.search-results
div#algolia-hits
div#algolia-pagination
if theme.algolia_search.labels.show_stats
div#algolia-stats
if theme.assist_search.enable
div.search-btns
= __('assist_search.prompt_label')
if theme.assist_search.google
span.search-btns-item.search-btns-item--google
i(class=theme.icon.google)
= __('assist_search.google')
if theme.assist_search.bing
span.search-btns-item.search-btns-item--bing
i(class=theme.icon.bing)
= __('assist_search.bing')
if theme.assist_search.baidu
span.search-btns-item.search-btns-item--baidu
i(class=theme.icon.baidu)
= __('assist_search.baidu')
if theme.algolia_search.enable
include ./algolia.pug
else if theme.local_search.enable
include ./localsearch.pug
div.search-mask
div.search-popup
span.search-close
div.search-input
input(placeholder= __('local_search.input_placeholder'))
include ./assist-btns.pug
div.search-results
-
var isShowToc = page.toc === true;
if (typeof page.toc !== 'boolean') {
isShowToc = theme.toc.enable && is_post();
}
if isShowToc
div.sidebar-nav
span.sidebar-nav-toc.current= __('sidebar.catalog')
span.sidebar-nav-ov= __('sidebar.overview')
section.sidebar-toc(class=`${isShowToc ? '' : 'hide'}`)
if page.content
- var tocMaxDepth = page.toc_max_depth || theme.toc.max_depth || 6;
- var tocMinDepth = page.toc_min_depth || theme.toc.min_depth || 1;
!= toc(page.content, {list_number: theme.toc.list_number, min_depth: tocMinDepth, max_depth: tocMaxDepth})
// ov = overview
section.sidebar-ov(class=`${isShowToc ? 'hide' : ''}`)
if theme.author.enable
div.sidebar-ov-author
if theme.author.avatar.url
div.sidebar-ov-author__avatar
img(
class="sidebar-ov-author__avatar_img"
src=theme.author.avatar.url
alt="avatar"
)
if theme.author.motto
p.sidebar-ov-author__text= theme.author.motto
if theme.social_setting.enable
div.sidebar-ov-social
for value, name in (theme.social || {})
if name && value
-
var item = value.split('||');
var socialPath = (item[0] + '').trim();
var socialIcon = (item[1] + '').trim();
var isSocialIconOnly = theme.social_setting.icon_only;
var elemAttr = {};
if (isSocialIconOnly) {
elemAttr['data-popover'] = __(`social.${name}`);
elemAttr['data-popover-pos'] = 'up';
}
a(
class="sidebar-ov-social-item"
href=socialPath
target="_blank"
rel="noopener"
)&attributes(elemAttr)
if socialIcon && socialIcon.match('origin:')
span.sidebar-ov-social-item__icon
= socialIcon.split('origin:')[1]
else
span.sidebar-ov-social-item__icon
i(class=socialIcon)
if !theme.social_setting.icon_only
span.sidebar-ov-social-item__text= name
if theme.feed.enable
div.sidebar-ov-feed
if theme.feed.email
span.sidebar-ov-feed-email
a(
class="sidebar-ov-feed-email__link"
href=theme.feed.email
target="_blank"
rel="noopener"
)
span.sidebar-ov-feed-email__icon
i(class=theme.icon.feed_email)
span= `Email ${__('sidebar.subscribe')}`
if theme.feed.rss
span.sidebar-ov-feed-rss
a(
class="sidebar-ov-feed-rss__link"
href=url_for(theme.feed.rss)
target="_blank"
rel="noopener"
)
span.sidebar-ov-feed-rss__icon
i(class=theme.icon.feed_rss)
span= `RSS ${__('sidebar.subscribe')}`
if theme.menu && (theme.menu.archives || theme.menu.categories || theme.menu.tags)
div.sidebar-ov-state
if theme.menu.archives
- var menuArchives = (theme.menu.archives.split('||')[0] + '').trim();
a.sidebar-ov-state-item.sidebar-ov-state-item--posts(href=menuArchives)
div.sidebar-ov-state-item__count= site.posts.length
div.sidebar-ov-state-item__name= __('sidebar.archives')
if theme.menu.categories
- var menuCategories = (theme.menu.categories.split('||')[0] + '').trim();
a.sidebar-ov-state-item.sidebar-ov-state-item--categories(href=menuCategories)
div.sidebar-ov-state-item__count= site.categories.length
div.sidebar-ov-state-item__name= __('sidebar.categories')
if theme.menu.tags
- var menuTags = (theme.menu.tags.split('||')[0] + '').trim();
a.sidebar-ov-state-item.sidebar-ov-state-item--tags(href=menuTags)
div.sidebar-ov-state-item__count= site.tags.length
div.sidebar-ov-state-item__name= __('sidebar.tags')
if theme.creative_commons.enable && theme.creative_commons.sidebar
div.sidebar-ov-cc
a(
href=ccUrl
target="_blank"
rel="noopener"
data-popover=__('popover.creative_commons')
data-popover-pos="up"
)
img(src=url_for(`/${theme.images}/cc-${ccLicense}.svg`))
if theme.reading_progress.enable && is_post()
div.sidebar-reading
div.sidebar-reading-info
span.sidebar-reading-info__text= __('sidebar.read_info') + ' '
span.sidebar-reading-info__num= '0'
span.sidebar-reading-info__perc= '%'
div.sidebar-reading-line
div#back2top.back2top
span.back2top__icon
i(class=theme.back2top.icon.name)
if theme.disqus.enable
div#comments.comments
div#disqus_thread
else if theme.waline.enable
div#comments.comments
div#waline-container
else if theme.valine.enable
div#comments.comments
div#valine-container
else if theme.minivaline.enable
div#comments.comments
div#minivaline-container
else if theme.gitalk.enable
div#comments.comments
div#gitalk-container
else if theme.utterances.enable
div#comments.comments
div#utterances-container
else if theme.livere.enable
div#comments.comments
div#lv-container(data-id="city" data-uid=theme.livere.uid)
else if theme.fbcomments.enable
div#comments.comments
div#fb-root
div.fb-comments(
data-href=page.permalink
data-lazy=theme.fbcomments.lazy
data-mobile=theme.fbcomments.mobile
data-numposts=theme.fbcomments.numPosts
data-order-by=theme.fbcomments.order_by
data-width=theme.fbcomments.width
)
div(class=`${is_post() ? 'post-copyright' : ''}`).copyright
div.copyright-author
span.copyright-author__name
= __('post.copyright.author') + ': '
span.copyright-author__value
if config.url && config.author
a(href=config.url)= config.author
div.copyright-link
span.copyright-link__name
= __('post.copyright.link') + ': '
span.copyright-link__value
if config.url
a(href=page.permalink)= page.permalink
div.copyright-notice
span.copyright-notice__name
= __('post.copyright.license_title') + ': '
span.copyright-notice__value
!= _p('post.copyright.license_content', ccUrl, ccLicense.toUpperCase())
div#loading-bar.loading-bar
div.loading-bar__progress
div.mode
div.mode-track
span.mode-track-moon
span.mode-track-sun
div.mode-thumb
nav(class=`${is_post() ? 'post-paginator' : ''}`).paginator
if !is_post()
- var prevText = `<i class="${theme.icon.paginator_prev}"></i>`;
- var nextText = `<i class="${theme.icon.paginator_next}"></i>`;
div.paginator-inner
!= paginator({ prev_text: prevText, next_text: nextText, mid_size: 1, escape: false })
else
if page.prev
div.paginator-prev
a.paginator-prev__link(href=url_for(page.prev.path))
span.paginator-prev__icon
i(class=theme.icon.paginator_prev)
span.paginator-prev__text= page.prev.title || __('post.untitled')
if page.next
div.paginator-next
a.paginator-next__link(href=url_for(page.next.path))
span.paginator-prev__text= page.next.title || __('post.untitled')
span.paginator-next__icon
i(class=theme.icon.paginator_next)
div(class=`${is_post() ? 'post-reward' : ''}`).reward
div.reward-button= __('reward.btn_text')
div.reward-qrcode
span.reward-qrcode-alipay
img.reward-qrcode-alipay__img(src=theme.reward.alipay)
div.reward-qrcode-alipay__text= __('reward.alipay')
span.reward-qrcode-wechat
img.reward-qrcode-wechat__img(src=theme.reward.wechat)
div.reward-qrcode-wechat__text= __('reward.wechat')
-
var socialShare = theme.post_widget.share;
var socialShareLabel = socialShare.label || 'Share to: ';
if socialShare.target
div.post-share
if socialShare.target
div.social-share(data-sites=`${socialShare.target}`)
= socialShareLabel
div.sticky-top(
data-popover=__('post.sticky')
data-popover-pos="up"
)
span.sticky-top__icon
i(class=theme.stick_top.icon)
script(src=`${url_for(theme.js)}/utils.js?v=${stun_env('version')}`)
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 theme.sidebar.enable
script(src=`${url_for(theme.js)}/sidebar.js?v=${stun_env('version')}`)
if theme.local_search.enable
script(type="application/json" src=`${config.root}${config.search.path}`)
-
var jquery_js = 'https://cdn.jsdelivr.net/npm/jquery@v3.4.1/dist/jquery.min.js';
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 (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 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 (theme.cdn.canvas_ribbon) ribbon_js = theme.cdn.canvas_ribbon;
script(src=ribbon_js size=ribbon.size alpha=ribbon.alpha zIndex=ribbon.zIndex)
if theme.canvas_nest.enable
- var nest_js = 'https://cdn.jsdelivr.net/npm/canvas-nest.js@1.0.1/dist/canvas-nest.min.js';
- var nest = theme.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 (theme.cdn.fancybox_js) fancybox_js = theme.cdn.fancybox_js;
script(src=fancybox_js)
if theme.gallery_waterfall.enable
- var masonry_js = 'https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js';
- if (theme.cdn.masonry) masonry_js = theme.cdn.masonry;
script(src=masonry_js)
if theme.lazyload.enable
- var lazyload_js = 'https://cdn.jsdelivr.net/npm/lazyload@2.0.0-rc.2/lazyload.min.js';
- if (theme.cdn.lazyload) lazyload_js = theme.cdn.lazyload;
script(src=lazyload_js)
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 (theme.cdn.share_js) share_js = theme.cdn.share_js;
script(src=share_js)
script(
src=theme.google_adsense.js_src
data-ad-client=theme.google_adsense.client
async=""
)&attributes(dataPjax)
if theme.google_adsense.enable
include ./google-adsense.pug
script.
var _hmt = _hmt || [];
(function() {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?!{ theme.baidu_analytics }';
hm.async = true;
if (!{ theme.pjax.enable }) {
hm.setAttribute('data-pjax', '');
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
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 (theme.cdn.busuanzi) busuanzi_js = theme.cdn.busuanzi;
script(src=busuanzi_js async)
- var scriptSrc = `https://www.googletagmanager.com/gtag/js?id=${theme.google_analytics}`;
script(src=scriptSrc async='')&attributes(dataPjax)
script&attributes(dataPjax).
if (window.location.hostname !== 'localhost') {
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '!{ theme.google_analytics }');
}
if theme.google_analytics
include ./google-analytics.pug
if theme.baidu_analytics
include ./baidu-analytics.pug
if theme.tencent_analytics
include ./tencent-analytics.pug
script.
(function() {
var hm = document.createElement('script');
hm.src = 'https://tajs.qq.com/stats?sId=!{ theme.tencent_analytics }';
hm.async = true;
if (!{ theme.pjax.enable }) {
hm.setAttribute('data-pjax', '');
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
script&attributes(dataPjax).
function loadDisqus () {
if (!document.getElementById('disqus_thread')) {
return;
}
if (window.DISQUS) {
DISQUS.reset({
reload: true,
config: function () {
this.page.url = '!{ page.permalink }';
this.page.identifier = '!{ page.path }';
this.page.title = '!{ page.title }';
}
});
} else {
var d = document;
var sc = d.createElement('script');
var se = d.createElement('script');
if (!{ theme.disqus.count }) {
sc.src = 'https://!{ theme.disqus.shortname }.disqus.com/count.js';
sc.id = 'dsq-count-scr';
sc.async = true;
if (!{ pjax }) {
sc.setAttribute('data-pjax', '');
}
(d.head || d.body).appendChild(sc);
}
se.src = 'https://!{ theme.disqus.shortname }.disqus.com/embed.js';
(d.head || d.body).appendChild(se);
}
}
if (!{ pjax }) {
loadDisqus();
} else {
window.addEventListener('DOMContentLoaded', loadDisqus, false);
}
- let fbCommentsSrc = `https://connect.facebook.net/${theme.fbcomments.lang}/sdk.js#xfbml=1&version=v8.0`;
- if (pjax) {
script(src=fbCommentsSrc)
script&attributes(dataPjax).
function loadFBComments() {
if (!'!{ theme.fbcomments.appId }') {
console.error('Stun Error: Facebook AppId not found. Please search for `fbcomments` in _config.yml of «Stun» theme and set `fbcomments.appId`.');
return;
}
window.FB.init({
appId : '!{ theme.fbcomments.appId }',
autoLogAppEvents : true,
xfbml : true,
version : 'v8.0'
});
}
loadFBComments();
- } else {
script(async defer crossorigin="anonymous" src=fbCommentsSrc)
- }
-
var gitalk_js = 'https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js';
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_md5) {
gitalk_md5 = theme.cdn.gitalk_md5;
}
script(src=gitalk_js)&attributes(dataPjax)
script(src=gitalk_md5)&attributes(dataPjax)
-
var gtLang = theme.gitalk.language
? theme.gitalk.language
: config.language;
script&attributes(dataPjax).
function loadGitalk () {
if (!document.getElementById('gitalk-container')) {
return;
}
var gitalk = new Gitalk({
id: md5(window.location.pathname.slice(1)),
clientID: '!{ theme.gitalk.client_id }',
clientSecret: '!{ theme.gitalk.client_secret }',
repo: '!{ theme.gitalk.repo }',
owner: '!{ theme.gitalk.owner }',
admin: ['!{ theme.gitalk.admin }'],
distractionFreeMode: '!{ theme.gitalk.distraction_free_mode }',
language: '!{ gtLang }'
});
gitalk.render('gitalk-container');
}
if (!{ pjax }) {
loadGitalk();
} else {
window.addEventListener('DOMContentLoaded', loadGitalk, false);
}
if page.comments || theme.pjax.enable
if theme.disqus.enable
include ./disqus.pug
else if theme.waline.enable
include ./waline.pug
else if theme.valine.enable
include ./valine.pug
else if theme.minivaline.enable
include ./minivaline.pug
else if theme.gitalk.enable
include ./gitalk.pug
else if theme.utterances.enable
include ./utterances.pug
else if theme.livere.enable
include ./livere.pug
else if theme.fbcomments.enable
include ./fbcomments.pug
else if theme.waline.enable && theme.waline.visitor
include ./waline.pug
else if theme.valine.enable && theme.valine.visitor
include ./valine.pug
script&attributes(dataPjax).
function loadLivere () {
var d = document, s = d.createElement('script');
if (!d.getElementById('lv-container')) {
return;
}
if (typeof LivereTower === 'function') {
return;
}
s.src = 'https://cdn-city.livere.com/js/embed.dist.js';
if (!{ pjax }) {
s.setAttribute('data-pjax-rm', '');
}
(d.head || d.body).appendChild(s);
}
if (!{ pjax }) {
loadLivere();
} else {
window.addEventListener('DOMContentLoaded', loadLivere, false);
}
-
var minivaline_js = 'https://cdn.jsdelivr.net/npm/minivaline/dist/MiniValine.min.js';
if (theme.cdn.minivaline) {
minivaline_js = theme.cdn.minivaline;
}
script(src=minivaline_js)
script&attributes(dataPjax).
function loadminivaline () {
new MiniValine({
el: '#minivaline-container',
appId: '!{ theme.minivaline.appId }',
appKey: '!{ theme.minivaline.appKey }',
placeholder: '!{ theme.minivaline.placeholder }',
lang: '!{ theme.minivaline.lang }',
adminEmailMd5: '!{ theme.minivaline.adminEmailMd5 }',
math: !{ theme.minivaline.math },
md: !{ theme.minivaline.md }
});
}
if (!{ pjax }) {
loadminivaline();
} else {
window.addEventListener('DOMContentLoaded', loadminivaline, false);
}
script&attributes(dataPjax).
function loadUtterances() {
var d = document, s = d.createElement('script');
var container = d.getElementById('utterances-container');
if (!container) {
return;
}
s.src = '!{ theme.utterances.script_url }';
s.setAttribute('repo', '!{ theme.utterances.owner }/!{ theme.utterances.repo }');
s.setAttribute('issue-term', '!{ theme.utterances.mapping }');
s.setAttribute('label', '!{ theme.utterances.label }');
s.setAttribute('theme', '!{ theme.utterances.theme }');
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
if (!{ pjax }) {
s.setAttribute('data-pjax-rm', '');
}
container.append(s);
}
if (!{ pjax }) {
loadUtterances();
} else {
window.addEventListener('DOMContentLoaded', loadUtterances, false);
}
-
var leancloud_storage_js = 'https://cdn.jsdelivr.net/npm/leancloud-storage@latest/dist/av-min.js';
var valine_js = 'https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js';
if (theme.cdn.leancloud_storage) {
leancloud_storage_js = theme.cdn.leancloud_storage;
}
if (theme.cdn.valine) {
valine_js = theme.cdn.valine;
}
script(src=leancloud_storage_js)
script(src=valine_js)
script&attributes(dataPjax).
function loadValine () {
var GUEST_INFO = ['nick', 'mail', 'link'];
var guest_info = '!{ theme.valine.meta }';
guest_info = guest_info.split(',').filter(function(item) {
return GUEST_INFO.indexOf(item) > -1;
});
new Valine({
el: '#valine-container',
appId: '!{ theme.valine.appid }',
appKey: '!{ theme.valine.appkey }',
notify: !{ theme.valine.notify },
verify: !{ theme.valine.verify },
placeholder: '!{ theme.valine.placeholder }',
avatar: '!{ theme.valine.avatar }',
meta: guest_info,
pageSize: '!{ theme.valine.pageSize }' || 10,
visitor: !{ theme.valine.visitor },
recordIP: !{ theme.valine.recordIP },
lang: '!{ theme.valine.language }' || 'zh-cn',
path: window.location.pathname
});
}
if (!{ pjax }) {
loadValine();
} else {
window.addEventListener('DOMContentLoaded', loadValine, false);
}
-
var waline_js = 'https://unpkg.com/@waline/client/dist/Waline.min.js';
if (theme.cdn.waline) {
waline_js = theme.cdn.waline;
}
script(src=waline_js)
script&attributes(dataPjax).
function loadWaline () {
var GUEST_INFO = ['nick', 'mail', 'link'];
var guest_info = '!{ theme.waline.meta }';
guest_info = guest_info.split(',').filter(function(item) {
return GUEST_INFO.indexOf(item) > -1;
});
new Waline({
el: '#waline-container',
serverURL: '!{ theme.waline.serverURL }',
placeholder: '!{ theme.waline.placeholder }',
pageSize: '!{ theme.waline.pageSize }' || 10,
lang: '!{ theme.waline.language }' || 'zh-cn',
visitor: !{ theme.waline.visitor },
avatar: '!{ theme.waline.avatar }',
path: window.location.pathname,
meta: guest_info
});
}
if (!{ pjax }) {
loadWaline();
} else {
window.addEventListener('DOMContentLoaded', loadWaline, false);
}
if theme.math.enable
- var isHomeHasMath = false;
if is_home()
- page.posts.each(function (post) {
if post.math && !isHomeHasMath
- isHomeHasMath = true;
- })
if pjax || (!is_tag() && !is_category() && !is_archive())
if pjax || isHomeHasMath || (theme.math.per_page || page.math)
if theme.math.engine === 'mathjax'
include ./mathjax.pug
else if theme.math.engine === 'katex'
include ./katex.pug
link(href=theme.math.katex.cdn rel="stylesheet" type="text/css")
if theme.math.katex.copy_tex.enable
if theme.math.katex.copy_tex.copy_tex_css
link(href=theme.math.katex.copy_tex.copy_tex_css rel="stylesheet" type="text/css")
if theme.math.katex.copy_tex.copy_tex_js
script(src=theme.math.katex.copy_tex.copy_tex_js)
script(type="text/x-mathjax-config").
var mathjaxMhchem = '';
var mathJaxTex = {
equationNumbers: {
autoNumber: 'AMS'
}
};
if (!{ theme.math.mathjax.mhchem.enable }) {
mathjaxMhchem = '!{ theme.math.mathjax.mhchem.mhchem_js }';
MathJax.Ajax.config.path['mhchem'] = mathjaxMhchem;
mathJaxTex.extensions = [mathjaxMhchem];
} else {
mathJaxTex.extensions = ['AMSmath.js','AMSsymbols.js'];
}
MathJax.Hub.Config({
menuSettings: {
zoom: 'None'
},
showMathMenu: false,
jax: ['input/TeX','output/CommonHTML'],
extensions: ['tex2jax.js'],
TeX: mathJaxTex,
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['\\[', '\\]']],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
MathJax.Hub.Register.StartupHook('TeX Jax Ready', function() {
MathJax.InputJax.TeX.prefilterHooks.Add(function(data) {
if (data.display) {
var next = data.script.nextSibling;
while (next && next.nodeName.toLowerCase() === '#text') { next = next.nextSibling; }
if (next && next.nodeName.toLowerCase() === 'br') { next.parentNode.removeChild(next); }
}
});
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for (i = 0; i < all.length; i++) {
document.getElementById(all[i].inputID + '-Frame').parentNode.className += ' has-jax';
}
});
script(src=theme.math.mathjax.cdn)
-
var pjaxSelectors = [
'head title',
'#main',
'.pjax-reload'
];
if (isEnableNoHeader) {
pjaxSelectors.push('.header-inner');
}
var pjaxArgs = {
'selectors': pjaxSelectors,
'history': theme.pjax.history,
'scrollTo': theme.pjax.scrollTo,
'scrollRestoration': theme.pjax.scrollRestoration,
'cacheBust': theme.pjax.cacheBust,
'debug': theme.pjax.debug,
'currentUrlFullReload': theme.pjax.currentUrlFullReload,
'timeout': theme.pjax.timeout
};
if (theme.pjax.elements) {
pjaxArgs.elements.push(theme.pjax.elements);
}
if (theme.pjax.selectors) {
pjaxArgs.selectors.push(theme.pjax.selectors);
}
if (theme.pjax.selectors) {
pjaxArgs.switches = theme.pjax.selectors;
}
if (theme.pjax.selectors) {
pjaxArgs.switchesOptions = theme.pjax.selectors;
}
pjaxArgs = JSON.stringify(pjaxArgs);
if theme.pjax.enable
- var pjax_js = 'https://cdn.jsdelivr.net/npm/pjax@latest/pjax.min.js';
- if (theme.cdn.pjax) pjax_js = theme.cdn.pjax;
script(src=pjax_js)
script.
window.addEventListener('DOMContentLoaded', function () {
var pjax = new Pjax(!{ pjaxArgs });
// 加载进度条的计时器
var loadingTimer = null;
// 重置页面 Y 方向上的滚动偏移量
document.addEventListener('pjax:send', function () {
$('.header-nav-menu').removeClass('show');
if (CONFIG.pjax && CONFIG.pjax.avoidBanner) {
$('html').velocity('scroll', {
duration: 500,
offset: $('#header').height(),
easing: 'easeInOutCubic'
});
}
var loadingBarWidth = 20;
var MAX_LOADING_WIDTH = 95;
$('.loading-bar').addClass('loading');
$('.loading-bar__progress').css('width', loadingBarWidth + '%');
clearInterval(loadingTimer);
loadingTimer = setInterval(function () {
loadingBarWidth += 3;
if (loadingBarWidth > MAX_LOADING_WIDTH) {
loadingBarWidth = MAX_LOADING_WIDTH;
}
$('.loading-bar__progress').css('width', loadingBarWidth + '%');
}, 500);
}, false);
window.addEventListener('pjax:complete', function () {
clearInterval(loadingTimer);
$('.loading-bar__progress').css('width', '100%');
$('.loading-bar').removeClass('loading');
setTimeout(function () {
$('.loading-bar__progress').css('width', '0');
}, 400);
$('link[rel=prefetch], script[data-pjax-rm]').each(function () {
$(this).remove();
});
$('script[data-pjax], #pjax-reload script').each(function () {
$(this).parent().append($(this).remove());
});
if (Stun.utils.pjaxReloadBoot) {
Stun.utils.pjaxReloadBoot();
}
if (Stun.utils.pjaxReloadScroll) {
Stun.utils.pjaxReloadScroll();
}
if (Stun.utils.pjaxReloadSidebar) {
Stun.utils.pjaxReloadSidebar();
}
if (!{ isEnableNoHeader }) {
if (Stun.utils.pjaxReloadHeader) {
Stun.utils.pjaxReloadHeader();
}
if (Stun.utils.pjaxReloadScrollIcon) {
Stun.utils.pjaxReloadScrollIcon();
}
if (Stun.utils.pjaxReloadLocalSearch) {
Stun.utils.pjaxReloadLocalSearch();
}
}
}, false);
}, false);
if theme.quicklink.enable
-
var loadQuicklink = false;
var quicklink_js = 'https://cdn.jsdelivr.net/npm/quicklink@1.0.1/dist/quicklink.umd.js';
if (theme.cdn.quicklink) quicklink_js = theme.cdn.quicklink;
if is_home() && theme.quicklink.home
- loadQuicklink = true;
if is_archive() && theme.quicklink.archive
- loadQuicklink = true;
if theme.pjax.enable
- loadQuicklink = true;
if loadQuicklink || ((page && page.quicklink) || (post && post.quicklink))
script(src=quicklink_js)
script.
function initQuicklink() {
quicklink({
timeout: '!{ theme.quicklink.timeout }',
priority: !{ theme.quicklink.priority },
ignores: [uri => uri.includes('#'), uri => uri === '!{ url.replace("index.html", '') }', !{ theme.quicklink.ignores }]
});
}
if (!{ pjax } || !{ !theme.quicklink.delay }) {
initQuicklink();
} else {
window.addEventListener('DOMContentLoaded', initQuicklink, false);
}
-
var instantsearch_js = 'https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js';
if (theme.cdn.instantsearch_js) {
instantsearch_js = theme.cdn.instantsearch_js;
}
script(src=instantsearch_js defer)
script.
window.addEventListener('DOMContentLoaded', function () {
$('.header-nav-search').on('click', function (e) {
e.stopPropagation();
$('body').css('overflow', 'hidden');
$('.search-popup')
.velocity('stop')
.velocity('transition.expandIn', {
duration: 300,
complete: function () {
$('.search-popup input').focus();
}
});
$('.search-mask')
.velocity('stop')
.velocity('transition.fadeIn', {
duration: 300
});
});
function closeSearch () {
$('body').css({ overflow: 'auto' });
$('.search-popup').css({ display: 'none' });
$('.search-mask').css({ display: 'none' });
}
$('.search-mask, .search-close').on('click', function () {
closeSearch();
});
$(document).on('keydown', function (e) {
// Escape <=> 27
if (e.keyCode === Stun.utils.codeToKeyCode('Escape')) {
closeSearch();
}
});
var algolia = CONFIG.algolia;
if (!algolia && !(algolia.appId && algolia.apiKey && algolia.indexName)) {
return console.error('Algolia setting is invalid.');
}
var search = instantsearch({
appId: algolia.appId,
apiKey: algolia.apiKey,
indexName: algolia.indexName,
searchParameters: {
hitsPerPage: algolia.hits.per_page || 10
},
searchFunction: function (helper) {
var searchInput = $('.search-input').find('input');
if (searchInput.val()) {
helper.search();
}
}
});
search.addWidget(
instantsearch.widgets.searchBox({
container: '.search-input',
reset: false,
magnifier: false,
placeholder: algolia.languages.inputPlaceholder
})
);
// The hits of search results.
search.addWidget(
instantsearch.widgets.hits({
container: '#algolia-hits',
templates: {
item: function (data) {
var link = data.permalink ? data.permalink : CONFIG.root + data.path;
return (
'<a href="' + link + '" class="algolia-hit-item-link">' +
data._highlightResult.title.value +
'</a>'
);
},
empty: function (data) {
return (
'<div id="algolia-hits-empty">' +
algolia.languages.hitsEmpty.replace(/\$\{query}/, data.query) +
'</div>'
);
}
},
cssClasses: {
item: 'algolia-hit-item'
}
})
);
// The stats of search results.
if ($('#algolia-stats')[0]) {
search.addWidget(
instantsearch.widgets.stats({
container: '#algolia-stats',
templates: {
body: function (data) {
var stats = algolia.languages.hitsStats
.replace(/\$\{hits}/, data.nbHits)
.replace(/\$\{time}/, data.processingTimeMS);
return (
stats +
'<span class="algolia-logo pull-right">' +
'<img src="' + CONFIG.root +
`${CONFIG.sourcePath.images}/algolia.svg" alt="Algolia" />` +
'</span>'
);
}
}
})
);
}
// The pagination of the results.
search.addWidget(
instantsearch.widgets.pagination({
container: '#algolia-pagination',
scrollTo: false,
showFirstLast: false,
labels: {
first: '<i class="fa fa-angle-double-left"></i>',
last: '<i class="fa fa-angle-double-right"></i>',
previous: '<i class="fa fa-angle-left"></i>',
next: '<i class="fa fa-angle-right"></i>'
},
cssClasses: {
root: 'pagination',
item: 'pagination-item',
link: 'page-number',
active: 'current',
disabled: 'disabled-item'
}
})
);
search.start();
});
if theme.algolia_search.enable
include ./algolia.pug
else if theme.local_search.enable
include ./localsearch.pug
This diff is collapsed.
extends ./_layout.pug
include ./_mixins/timeline.pug
block content
div.archive
div.archive-total
= site.posts.length === 0 ? __('page.posts-empty') : _p('page.posts-total', site.posts.length)
+timeline(theme.post_list.paginate.archives ? page.posts.data : site.posts.data)
extends ./_layout.pug
include ./_mixins/timeline.pug
block content
div.categorypage
div.categorypage-title
span.categorypage-title__text= `${__('page.categories')} -- `
span.categorypage-title__name= page.category
+timeline(page.posts.data)
extends ./_layout.pug
block content
include ./_partials/post/post-list.pug
if theme.post_list.paginate.home
include ./_partials/widgets/paginator.pug
extends ./_layout.pug
block content
include ./_mixins/gallery.pug
if page.type === 'tags'
div.tagcloud
div.tagcloud-total= __('page.tags') + ' - '
span= site.tags.length
- var min_font = theme.tag_cloud ? theme.tag_cloud.min_size : 14;
- var max_font = theme.tag_cloud ? theme.tag_cloud.max_size : 24;
- var start_color = theme.tag_cloud ? theme.tag_cloud.start_color : '#a4d8fa';
- var end_color = theme.tag_cloud ? theme.tag_cloud.end_color : '#1b9ef3';
div.tagcloud-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.type === 'categories'
div.category
div.category-total= __('page.categories') + ' - '
span= site.categories.length
!= list_categories()
else
div.custompage
if page.photos && page.photos.length
+gallery(page)
!= page.content
if isShowReward
include ./_partials/widgets/reward.pug
if isShowCC
include ./_partials/widgets/copyright.pug
extends ./_layout.pug
block content
// Just used to judge whether it is an article page
div#is-post
div.post
include ./_mixins/post-header.pug
include ./_mixins/gallery.pug
+postHeader(page)
div.post-body
if page.photos && page.photos.length
+gallery(page)
!= page.content
footer.post-footer
if theme.post_widget.end_text.enable
div.post-ending.ending
div.ending__text= __('post.end')
if page.copyright === true || (isShowCC && theme.creative_commons.post)
include ./_partials/widgets/copyright.pug
if theme.post_widget.tags
if page.tags && page.tags.length > 0
div.post-tags
each tag in page.tags.data
span.post-tags-item
span.post-tags-item__icon
i(class=theme.icon.post_tags)
a.post-tags-item__link(href=tag.permalink)= tag.name
if theme.post_widget.share.enable
include ./_partials/widgets/share.pug
if isShowReward
include ./_partials/widgets/reward.pug
include ./_partials/widgets/paginator.pug
extends ./_layout.pug
include ./_mixins/timeline.pug
block content
div.tagpage
div.tagpage-title
span.tagpage-title__text= `${__('page.tags')} -- `
span.tagpage-title__name= page.tag
+timeline(page.posts.data)
{
"name": "hexo-theme-stun",
"version": "2.6.2",
"description": "A beautiful & simple theme for Hexo",
"homepage": "https://liuyib.github.io",
"scripts": {
"commit": "git cz",
"release": "standard-version",
"release:lts": "npm run release -- --release-as",
"release:pre": "npm run release -- --prerelease",
"lint": "standard",
"lint:fix": "standard --fix"
},
"repository": {
"type": "git",
"url": "https://github.com/liuyib/hexo-theme-stun"
},
"keywords": [
"Stun",
"Hexo"
],
"author": "liuyib",
"license": "MIT",
"bugs": {
"url": "https://github.com/liuyib/hexo-theme-stun/issues"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"commitizen": "^4.2.2",
"commitlint-config-cz": "^0.13.3",
"cz-customizable": "^6.3.0",
"eslint": "^7.17.0",
"husky": "^4.3.6",
"standard": "^14.3.4",
"standard-version": "^9.1.0"
},
"standard": {
"globals": [
"$",
"CONFIG",
"hexo",
"Stun",
"instantsearch"
]
},
"husky": {
"hooks": {
"pre-commit": "npm run lint",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-customizable"
},
"cz-customizable": {
"config": "./.cz-config.js"
}
}
}
'use strict'
hexo.extend.helper.register('hexo_env', function (type) {
return this.env[type]
})
hexo.extend.helper.register('stun_env', function (type) {
var env = require('../package.json')
return env[type]
})
'use strict'
hexo.extend.filter.register(
'after_post_render',
function (data) {
var theme = hexo.theme.config
if (
!theme.external_link ||
!theme.external_link.icon ||
!theme.external_link.icon.enable
) {
return
}
var config = this.config
var url = new URL(config.url)
var siteHost = url.hostname || config.url
// Match 'a' tags that don't contain html children.
var regPureATag = /<a([^>]*)href="([^"]*)"([^>]*)>([^<]*)<\/a>/gim
data.content = data.content.replace(regPureATag, function (
match,
attrBegin,
href,
attrEnd,
html
) {
// Exit if the href attribute doesn't exists.
if (!href) {
return match
}
var link = ''
try {
link = new URL(href)
} catch (e) {
// Invalid url, e.g. Anchor link.
return match
}
// Exit if the url has same host with `config.url`, which means isn't an external link.
if (!link.protocol || link.hostname === siteHost) {
return match
}
return (
'<span class="exturl">' +
`<a class="exturl__link" ${attrBegin} href="${href}" ${attrEnd}>${html}</a>` +
`<span class="exturl__icon"><i class="${theme.external_link.icon.name}"></i></span>` +
'</span>'
)
})
},
0
)
'use strict'
hexo.extend.filter.register(
'after_post_render',
function (data) {
data.content = data.content.replace(
// Match 'img' tags width the src attribute.
/<img([^>]*)src="([^"]*)"([^>]*)>/gim,
function (match, attrBegin, src, attrEnd) {
// Exit if the src doesn't exists.
if (!src) {
return match
}
var search = src.split('?')[1]
// Exit if the src doesn't include query parameter.
if (!search) {
return match
}
var params = search.split('&').filter(i => i !== '')
// Exit if the query parameter is empty.
if (!params.length) {
return match
}
var size = ''
var show = ''
var style = ''
params.forEach(param => {
if (param.includes('size')) {
size = param.split('=')[1] || ''
}
if (param.includes('show')) {
show = param.split('=')[1] || ''
}
})
if (size !== '') {
// The sign between width and height.
var MULTIPLY_SIGN = 'x'
var w = size.split(MULTIPLY_SIGN)[0]
var h = size.split(MULTIPLY_SIGN)[1]
if (w) {
style += `width: ${w}px;`
}
if (h) {
style += `height: ${h}px;`
}
}
if (show === 'inline') {
style += 'display: inline-block;'
}
return `<img ${attrBegin} src="${src}" style="${style}" ${attrEnd}>`
}
)
},
0
)
'use strict'
hexo.extend.filter.register(
'after_post_render',
function (data) {
var theme = hexo.theme.config
if (!theme.lazyload || !theme.lazyload.enable) {
return
}
data.content = data.content.replace(
// Match 'img' tags width the src attribute.
/<img([^>]*)src="([^"]*)"([^>]*)>/gim,
function (match, attrBegin, src, attrEnd) {
// Exit if the src doesn't exists.
if (!src) {
return match
}
// Smallest 1 * 1 pixel transparent gif
var loadingBlock =
'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs='
var loadingGIF = `/${theme.images}/loading.svg`
var phClassName = theme.lazyload.placeholder
var placeholder = ''
if (phClassName === 'gif') {
placeholder = loadingGIF
} else if (phClassName === 'block') {
placeholder = loadingBlock
}
var className = `lazyload lazyload-${phClassName}`
return `
<img ${attrBegin} class="${className}"
src="${placeholder}" data-src="${src}" ${attrEnd}>
`
}
)
},
1
)
'use strict'
hexo.extend.filter.register(
'after_post_render',
function (data) {
var theme = hexo.theme.config
var tagName = 'h[1-6]'
var attrId = 'id="([^"]*)"'
var tagNotEnd = '([^>]*)'
var regAttrId = tagNotEnd + attrId + tagNotEnd
// Match the innermost 'h1~6' tags width the id attribute.
var regHTagInnermost = new RegExp(
`<(${tagName})${regAttrId}>((?:(?!<\\/?${tagName}${regAttrId}>)(?:\\s|\\S))*?)</${tagName}>`,
'gim'
)
data.content = data.content.replace(regHTagInnermost, function (
match,
tName,
attrBegin,
id,
attrEnd,
html
) {
if (!id) {
return match
}
return `
<${tName} id="${id}" ${attrBegin} ${attrEnd}>
<a href="#${id}" class="heading-link"><i class="${theme.icon &&
theme.icon.post_heading}"></i></a>${html}</${tName}>
`
})
},
0
)
'use strict'
hexo.extend.filter.register('after_generate', function () {
var theme = hexo.theme.config
if (!theme.shake_file) {
return
}
if (!(theme.sidebar && theme.sidebar.enable)) {
hexo.route.remove('js/sidebar.js')
}
})
'use strict'
hexo.extend.filter.register(
'after_post_render',
function (data) {
data.content = data.content.replace(
// Match the innermost 'table' tag.
/(<table[^>]*>(?:(?!<\/?table>)(?:\s|\S))*?<\/table>)/gim,
function (match, table) {
if (!table) {
return match
}
return `<div class="table-container">${table}</div>`
}
)
},
0
)
'use strict'
/**
* Flatten nested object.
* @param {Object} target
* @returns {Object}
* @example { a: { b: 1, c: 2 } } => { 'a.b': 1, 'a.c': 2 }
*/
function flatten (target) {
const output = {}
function step (object, prev) {
Object.keys(object).forEach(function (key) {
const value = object[key]
const type = Object.prototype.toString.call(value)
const isArray = Array.isArray(value)
const isObject = type === '[object Object]'
const hasOwnPrototype = Object.keys(value).length
const newKey = prev ? `${prev}.${key}` : key
if (!isArray && isObject && hasOwnPrototype) {
return step(value, newKey)
}
output[newKey] = value
})
}
step(target)
return output
}
hexo.on('generateBefore', function () {
var rootConfig = hexo.config
if (hexo.locals.get) {
var data = hexo.locals.get('data')
if (data && data.stun) {
hexo.theme.config = data.stun
}
var usingLang = rootConfig.language
var targetLangData = data[`languages/${usingLang}`]
if (targetLangData) {
var flattenData = flatten(targetLangData)
if (Object.keys(flattenData).length) {
hexo.theme.i18n.data[usingLang] = flattenData
}
}
}
hexo.theme.config.rootConfig = rootConfig
})
'use strict'
var pathFn = require('path')
var fs = require('hexo-fs')
function friends (args) {
var path = pathFn.join(hexo.source_dir, args[0])
fs.exists(path).then(function (exist) {
if (!exist) {
hexo.log.error('Include file not found!')
}
})
return fs.readFile(path).then(function (data) {
if (!data) {
hexo.log.warn('Include file empty.')
return
}
var imgClassName = 'friends-plugin__item-avatar '
var theme = hexo.theme.config
if (theme.lazyload && theme.lazyload.enable) {
imgClassName += `lazyload lazyload-${theme.lazyload.placeholder}`
}
var friends = JSON.parse(data)
var renderHtml = '<div class="friends-plugin">'
friends.forEach(f => {
renderHtml +=
`<a class="friends-plugin__item" href="${f.url}">` +
`<img class="${imgClassName}" src="${f.avatar}" data-zoom="none">` +
'<div class="friends-plugin__item-info">' +
`<p class="friends-plugin__item-info__name" title="${f.name}">${f.name}</p>` +
`<p class="friends-plugin__item-info__intro" title="${f.introduction}">${f.introduction}</p>` +
'</div>' +
'</a>'
})
renderHtml += '</div>'
return renderHtml
})
}
hexo.extend.tag.register('friends', friends, { ends: false, async: true })
'use strict'
function note (args, content) {
var theme = hexo.theme.config
var icon = theme.icon && theme.icon.notetag_default
var iconType = 'default'
var isIcon = true
if (args.includes('no-icon')) {
isIcon = false
}
if (isIcon && theme.icon) {
var tagTypes = ['default', 'success', 'info', 'warning', 'danger']
tagTypes.forEach(type => {
if (args.includes(type)) {
icon = theme.icon[`notetag_${type}`]
iconType = type
}
})
}
var className = args.join(' ')
return `
<div class="note-plugin ${className}">
${
isIcon
? `<span class="note-plugin__icon note-plugin__icon--${iconType}">
<i class="${icon}"></i>
</span>`
: ''
}
${hexo.render
.renderSync({ text: content, engine: 'markdown' })
.split('\n')
.join('')}
</div>
`
}
hexo.extend.tag.register('note', note, { ends: true })
'use strict'
var pathFn = require('path')
var fs = require('hexo-fs')
function table (args) {
var path = pathFn.join(hexo.source_dir, args[0])
var headers = args[1].split(',')
fs.exists(path).then(function (exist) {
if (!exist) {
hexo.log.error('Include file not found!')
}
})
return fs.readFile(path).then(function (data) {
if (!data) {
hexo.log.warn('Include file empty.')
return
}
var tableData = JSON.parse(data)
var result = '<table class="table-plugin"><thead><tr>'
headers.forEach(header => (result += `<th>${header}</th>`))
result += '</tr></thead><tbody>'
tableData.forEach(item => {
result += '<tr style="text-align: center;">'
for (var key in item) {
if (Object.prototype.hasOwnProperty.call(item, key)) {
var value = item[key]
result += `<td>${value}</td>`
}
}
result += '</tr>'
})
result += '</tbody></table>'
return result
})
}
hexo.extend.tag.register('table', table, { ends: false, async: true })
.busuanzi {
&-siteuv,
&-sitepv {
&__icon,
&__info,
&__value {
margin: 0 2px;
}
}
& > span:nth-child(2)::before {
content: '|';
margin: 0 10px;
}
}
@import './busuanzi.styl' if (hexo-config('busuanzi.enable'));
.footer {
if (hexo-config('footer.icon.enable')) {
&__icon {
display: inline-block;
margin: 0 .4rem;
font-size: 1em;
color: convert(hexo-config('footer.icon.color') || '#f00');
if (hexo-config('footer.icon.animation')) {
animation: footerHeartBeat 1.2s infinite;
@keyframes footerHeartBeat {
0% {
transform: scale(1);
}
15% {
transform: scale(1.2);
}
30% {
transform: scale(1);
}
45% {
transform: scale(1.2);
}
}
}
}
}
&-inner {
position: relative;
padding: 1rem;
font-size: $font-size-footer;
text-align: center;
color: $footer-text-color;
background-color: $footer-bg-color;
if (hexo-config('footer.bg_image.enable') && hexo-config('footer.bg_image.url')) {
z-index: $z-index0;
background: url(hexo-config('footer.bg_image.url')) no-repeat center / cover;
}
if (hexo-config('footer.mask.enable')) {
&::before {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
z-index: $z-index-1;
width: 100%;
height: 100%;
background-color: alpha(#000, hexo-config('footer.mask.opacity'));
}
}
}
a {
color: $footer-link-color;
transition: color .2s ease;
&:hover {
color: $footer-link-hover-color;
}
}
&__devider {
margin: 0 10px;
}
}
if (hexo-config('header.nav.height') && match('%', hexo-config('header.nav.height'))) {
header-nav-height = unit(convert(hexo-config('header.nav.height')), 'vh');
} else {
header-nav-height = convert(hexo-config('header.nav.height') || '50px');
}
.header {
&-inner {
width: 100%;
font-size: $font-size-header;
background-color: $header-bg-color;
if (hexo-config('header.enable')) {
if (hexo-config('header.height') && match('%', hexo-config('header.height'))) {
height: unit(convert(hexo-config('header.height')), 'vh');
} else {
height: convert(hexo-config('header.height') || '80vh');
}
}
&--bgcolor {
background-color: convert(hexo-config('header.nav.bg_color'));
}
&--height {
height: header-nav-height !important;
}
}
&-nav {
position: relative;
top: 0;
left: 0;
z-index: $z-index1;
width: 100%;
height: header-nav-height;
transition: transform .2s ease-out, background-color .2s ease;
&--fixed {
position: fixed;
transform: translateY(0);
}
&--sticky {
position: fixed;
background-color: convert(hexo-config('header.nav.bg_color') || '$header-nav-bg-color');
transform: translateY(-100%);
}
&.slider {
&--down {
transform: translateY(0);
}
&--up {
transform: translateY(-100%);
}
&--clear {
transition: background-color .2s ease;
}
}
&-inner {
margin: 0 auto;
padding: convert(hexo-config('layout.main_padding.default') || '20px');
padding-top: 0 !important;
padding-bottom: 0 !important;
width: 100%;
height: 100%;
}
&-menubtn {
display: none;
padding: 0 .5rem;
line-height: header-nav-height;
color: $header-text-color;
cursor: pointer;
}
menuItemHover(txtColor, bgColor) {
transition: color .2s ease, background-color .2s ease;
&:hover {
color: txtColor;
background-color: bgColor;
}
}
&-menu-item,
&-submenu-item {
&__link {
display: block;
color: $header-text-color;
}
&__icon,
&__text {
margin: 0 3px;
}
}
&-menu-item__link {
padding: 0 .5rem;
menuItemHover(#f4f5f5, #999);
}
&-submenu-item__link {
padding: .75rem .5rem;
menuItemHover(#f4f5f5, #999);
}
&-menu {
display: none;
height: 100%;
line-height: header-nav-height;
&-item {
float: left;
position: relative;
margin: 0 1rem 0 0;
height: header-nav-height;
text-align: center;
cursor: pointer;
&:last-child {
margin: 0;
}
}
}
&-submenu {
display: none;
position: absolute;
right: -.5rem;
left: -.5rem;
width: auto;
background-color: $header-nav-bg-color;
&.hide {
&--force {
display: none !important;
}
}
&-item {
margin: 0;
padding: 0;
width: 100%;
font-size: $font-size-header;
line-height: 1;
text-align: center;
}
}
if (hexo-config('night_mode.enable')) {
&-mode {
display: flex;
float: right;
padding: 0 .5rem;
height: 100%;
line-height: header-nav-height;
align-items: center;
}
}
if (hexo-config('algolia_search.enable') || hexo-config('local_search.enable')) {
&-search {
float: right;
padding: 0 .5rem;
height: 100%;
line-height: header-nav-height;
color: $header-text-color;
transition: color .2s ease;
cursor: pointer;
&:hover {
color: $header-menu-hover-color;
}
&__icon,
&__text {
margin: 0 3px;
}
}
}
}
&-banner {
position: relative;
z-index: $z-index0;
width: 100%;
height: 100%;
if (hexo-config('header.bg_image.enable') && hexo-config('header.bg_image.url')) {
background: url(hexo-config('header.bg_image.url')) no-repeat center / cover;
}
if (hexo-config('header.mask.enable')) {
&::before {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
z-index: $z-index-1;
width: 100%;
height: 100%;
background-color: alpha(#000, hexo-config('header.mask.opacity'));
}
}
&-info {
position: absolute;
top: 50%;
left: 0;
padding: 0 .5rem;
width: 100%;
text-align: center;
transform: translateY(-50%);
&__title {
margin-bottom: 2rem;
font-size: 4rem;
font-weight: $font-weight-bolder;
line-height: 1;
color: $header-text-color;
}
&__subtitle {
font-size: 1.2rem;
font-weight: $font-weight-normal;
color: $header-text-color;
}
}
if (hexo-config('header.scroll_down_icon.enable')) {
&-arrow {
position: absolute;
bottom: 1rem;
left: calc(50% - 1rem);
width: 2rem;
height: 2rem;
text-align: center;
cursor: pointer;
if (hexo-config('header.scroll_down_icon.animation')) {
animation: arrowUpDown 2s infinite;
@keyframes arrowUpDown {
0%,
100% {
opacity: .8;
transform: translateY(0);
}
50% {
opacity: .4;
transform: translateY(-20px);
}
}
}
&__icon {
width: 100%;
height: 100%;
font-size: 2rem;
font-weight: $font-weight-bolder;
line-height: 1;
text-align: center;
color: #fff;
}
}
}
}
}
highlight_theme = hexo-config('codeblock.highlight') || 'light';
if (highlight_theme == 'light') {
$highlight-addition-color = #229922;
$highlight-addition-bg-color = #f0fff4;
$highlight-deletion-color = #dd4444;
$highlight-deletion-bg-color = #ffeef0;
} else if (highlight_theme == 'dark') {
$highlight-addition-color = #229922;
$highlight-addition-bg-color = transparent;
$highlight-deletion-color = #dd4444;
$highlight-deletion-bg-color = transparent;
} else if (highlight_theme == 'ocean') {
$highlight-addition-color = #99c794;
$highlight-addition-bg-color = transparent;
$highlight-deletion-color = #eb606b;
$highlight-deletion-bg-color = transparent;
}
@require './theme.styl';
@require './diff.styl';
codeStyle = hexo-config('codeblock.style') || 'default';
wordWrap = hexo-config('codeblock.word_wrap') || false;
// Show lang in tag plugin.
languages = 'markdown' 'md' 'diff' 'javascript' 'js' 'typescript' 'ts' 'java' 'json' 'html' 'xml' 'css' 'less' 'scss' 'stylus' 'styl' 'sql' 'bash' 'shell' 'python' 'py' 'ruby' 'cpp' 'c\+\+' 'c\#' 'go' 'kotlin' 'kt' 'objectivec' 'php' 'perl' 'pl' 'pm' 'rust' 'rs' 'swift' 'coffeescript' 'coffee' 'lua' 'yaml' 'yml' 'nginx' 'dockerfile' 'makefile';
.highlight {
figcaption {
span {
&:first-child::before {
margin: 0 .6rem 0 0;
color: $highlight-code-lang-color;
}
}
}
}
for lang in languages {
.highlight {
&{'.' + lang} {
figcaption {
span {
&:first-child::before {
content: lang;
}
}
}
}
}
}
.highlight {
margin: 0 0 1rem;
border-radius: .25rem;
width: 100%;
line-height: $line-height-codeblock;
color: $highlight-color;
background-color: $highlight-background;
pre,
code {
font-family: $font-family-code;
}
pre {
margin: 0;
if (wordWrap) {
white-space: pre-wrap;
counter-reset: line;
}
}
td {
border-width: 0;
}
figcaption {
position: relative;
width: 100%;
color: $highlight-header-color;
background-color: $highlight-header-bg-color;
clearfix();
if (codeStyle == 'carbon') {
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
}
if (codeStyle == 'default') {
padding: .1rem 0;
}
span {
&:first-child {
float: left;
margin-left: .5rem;
color: $highlight-code-note-color;
}
&.external-link {
float: right;
margin-right: 2em;
}
}
}
figcaption.custom {
min-height: 1.5rem;
if (codeStyle == 'default') {
border-radius: .25rem;
}
if (codeStyle == 'carbon') {
display: flex;
}
.custom-lang {
float: left;
margin: 0 .6rem;
color: $highlight-code-lang-color;
}
if (codeStyle == 'carbon') {
.custom-carbon {
display: flex;
margin: .2rem 0 0 .5rem;
font-size: 0;
align-items: center;
&-dot {
display: inline-block;
margin: 0 4px;
border-radius: 50%;
width: 10px;
height: 10px;
&--red {
background-color: #ff5f56;
}
&--yellow {
background-color: #ffbd2e;
}
&--green {
background-color: #27c93f;
}
}
}
}
}
addLineNumber() {
.line {
&::before {
content: counter(line);
display: inline-block;
margin-right: .5rem;
box-sizing: content-box;
padding: 0 .8rem 0 .4rem;
min-width: 1rem;
text-align: right;
color: $highlight-side-color;
background-color: $highlight-side-bg-color;
counter-increment: line;
}
}
}
& figcaption:not(.custom) {
if (codeStyle == 'carbon') {
background-color: $highlight-side-bg-color;
}
if (codeStyle == 'simple' || (codeStyle == 'carbon')) {
& + .table-container,
& + table {
if (wordWrap) {
td.code {
padding: 0;
}
addLineNumber();
} else {
td.gutter {
display: table-cell;
}
}
}
}
}
td.gutter {
border-right: 1px solid $gap-line-color;
padding: .4rem .6rem;
width: 2rem;
background-color: $highlight-side-bg-color;
if (codeStyle == 'default') {
border-radius: .25rem;
}
if (wordWrap || (codeStyle == 'simple' || (codeStyle == 'carbon'))) {
display: none;
}
pre {
text-align: right;
white-space: nowrap;
color: $highlight-side-color;
background-color: inherit;
}
}
td.code {
if (codeStyle == 'simple' || (codeStyle == 'carbon')) {
padding: .5rem .75rem;
} else if (codeStyle == 'default') {
if (wordWrap) {
padding: 0;
} else {
padding: .5rem .6rem;
}
}
}
if (wordWrap && (codeStyle == 'default')) {
addLineNumber();
}
.marked {
background-color: $marked-line-bg-color;
}
.emphasis {
font-style: italic;
}
.strong {
font-weight: bold;
}
.comment {
color: $highlight-comment;
}
.quote,
.params {
color: $highlight-color;
}
.selector-tag,
.template-variable,
.variable,
.deletion,
.regexp,
.name,
.tag {
color: $highlight-red;
}
.builtin-name,
.literal,
.number,
.type,
.meta,
.link {
color: $highlight-orange;
}
.class .keyword:first-child + .title,
.built_in,
.attribute {
color: $highlight-yellow;
}
.class .keyword ~ .title,
.string .template-variable,
.meta-string,
.tag,
.class,
.subst,
.regexp {
color: $highlight-green;
}
.string,
.symbol,
.bullet,
.addition {
color: $highlight-aqua;
}
.title,
.section {
color: $highlight-blue;
}
.meta-keyword,
.doctag,
.selector-id,
.selector-attr,
.selector-class,
.selector-pseudo,
.function,
.tag .attr,
.keyword {
color: $highlight-purple;
}
}
.bash .meta,
.rust .meta {
color: $highlight-comment;
}
.c\\+\\+ .built_in,
.cpp .built_in,
.ini .variable,
.ini .literal,
.ini .number,
.less .variable,
.scss .variable,
.styl .variable,
.stylus .variable {
color: $highlight-color;
}
.html .meta,
.xml .meta,
.yaml .attr,
.yml .attr {
color: $highlight-red;
}
.js .params,
.javascript .params {
color: $highlight-orange;
}
.json .attr,
.swift .type {
color: $highlight-yellow;
}
.variable .variable,
.bash .variable,
.c\\+\\+ .meta,
.cpp .meta,
.c\\# .meta,
.css .number,
.diff .meta {
color: $highlight-green;
}
.md .section,
.markdown .section,
.py .string .meta,
.python .string .meta {
color: $highlight-aqua;
}
.bash .built_in,
.css .built_in,
.go .built_in,
.py .meta,
.python .meta,
.shell .meta,
.shell .keyword,
.shell .built_in {
color: $highlight-blue;
}
.ini .attr,
.objectivec .meta,
.yaml .type,
.yml .type {
color: $highlight-purple;
}
.diff {
.addition {
color: $highlight-addition-color;
background-color: $highlight-addition-bg-color;
}
.deletion {
color: $highlight-deletion-color;
background-color: $highlight-deletion-bg-color;
}
}
if (hexo-config('night_mode.enable')) {
.nightmode {
if (hexo-config('codeblock.highlight') == 'light') {
.diff {
.addition {
background-color: transparent;
}
.deletion {
background-color: transparent;
}
}
}
}
}
@import './theme.styl';
@import './highlight.styl';
@import './diff.styl';
codeStyle = hexo-config('codeblock.style') || 'default';
highlight_theme = hexo-config('codeblock.highlight') || 'light';
if (highlight_theme == 'light') {
$highlight-color = #333333;
$highlight-background = #f5f6f7;
$highlight-side-color = lighten($highlight-color, 60%);
$highlight-side-bg-color = $highlight-background;
$highlight-header-color = $highlight-color;
$highlight-header-bg-color = $highlight-side-bg-color;
$highlight-code-lang-color = lighten($highlight-header-color, 60%);
$highlight-code-note-color = $highlight-header-color;
$copy-button-color = lighten($highlight-header-color, 60%);
$gap-line-color = darken($highlight-background, 10%);
$marked-line-bg-color = darken($highlight-background, 6%);
$highlight-comment = #969896;
$highlight-red = #c82829;
$highlight-orange = #ee8019;
$highlight-yellow = #eab700;
$highlight-green = #4eb4b4;
$highlight-aqua = #4dc14c;
$highlight-blue = #2a75c8;
$highlight-purple = #be4dbc;
if (hexo-config('night_mode.enable')) {
$highlight-color = var(--color-gray-850);
$highlight-background = var(--color-gray-200);
$highlight-side-color = var(--color-gray-550);
$highlight-side-bg-color = var(--color-gray-200);
$highlight-header-color = var(--color-gray-850);
$highlight-header-bg-color = var(--color-gray-200);
$highlight-code-lang-color = var(--color-gray-550);
$highlight-code-note-color = var(--color-gray-850);
$copy-button-color = var(--color-gray-550);
$gap-line-color = var(--color-gray-300);
$marked-line-bg-color = var(--color-gray-260);
}
}
if (highlight_theme == 'dark') {
$highlight-color = #abb2bf;
$highlight-background = #282c34;
$highlight-side-color = darken($highlight-color, 40%);
$highlight-side-bg-color = $highlight-background;
$highlight-header-color = $highlight-color;
$highlight-header-bg-color = $highlight-side-bg-color;
$highlight-code-lang-color = darken($highlight-header-color, 40%);
$highlight-code-note-color = $highlight-header-color;
$copy-button-color = darken($highlight-header-color, 40%);
$gap-line-color = lighten($highlight-background, 10%);
$marked-line-bg-color = lighten($highlight-background, 6%);
$highlight-comment = #5c6370;
$highlight-red = #f45a5a;
$highlight-orange = #de812c;
$highlight-yellow = #eedc6e;
$highlight-green = #56b6c2;
$highlight-aqua = #98c379;
$highlight-blue = #4a98d8;
$highlight-purple = #be74d5;
}
if (highlight_theme == 'ocean') {
$highlight-color = #f8f8f8;
$highlight-background = #304148;
$highlight-side-color = darken($highlight-color, 40%);
$highlight-side-bg-color = $highlight-background;
$highlight-header-color = $highlight-color;
$highlight-header-bg-color = $highlight-side-bg-color;
$highlight-code-lang-color = darken($highlight-header-color, 40%);
$highlight-code-note-color = $highlight-header-color;
$copy-button-color = darken($highlight-header-color, 40%);
$gap-line-color = lighten($highlight-background, 10%);
$marked-line-bg-color = lighten($highlight-background, 6%);
$highlight-comment = #65737e;
$highlight-red = #eb606b;
$highlight-orange = #f99157;
$highlight-yellow = #fac863;
$highlight-green = #5fb3b3;
$highlight-aqua = #99c794;
$highlight-blue = #6699cc;
$highlight-purple = #c594c5;
}
if (codeStyle == 'carbon') {
$highlight-header-bg-color = $highlight-background;
}
@import './header/index.styl';
@import './footer/index.styl';
@import './sidebar/index.styl';
@import './search/index.styl';
@import './pages/index.styl';
@import './post/index.styl';
@import './highlight/index.styl';
@import './widgets/index.styl';
@import './plugins/index.styl';
@import './analytics/index.styl';
@import './page.styl';
@import './timeline.styl';
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@import './table.styl';
@import './note.styl';
@import './friends.styl';
This diff is collapsed.
.table-plugin {
tr {
transition: background-color .2s ease;
&:nth-of-type(even) {
background-color: var(--color-gray-150);
}
&:hover {
background-color: var(--color-gray-200);
}
}
th,
td {
min-width: 5rem;
}
}
@import './post-list.styl';
@import './post.styl';
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@import './common.styl' if (hexo-config('algolia_search.enable') || hexo-config('local_search.enable'));
@import './algolia.styl' if (hexo-config('algolia_search.enable'));
@import './localsearch.styl' if (hexo-config('local_search.enable'));
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment