mirror of
https://github.com/KivotosRailway/website.git
synced 2026-11-03 11:06:32 +09:00
Add solitude
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
- page.type = is_post() ? 'post' : page.type
|
||||
|
||||
mixin katex
|
||||
if theme.katex.copytex
|
||||
script(src=url_for(theme.cdn.katex_copytex))
|
||||
script.
|
||||
(() => {
|
||||
document.querySelectorAll('#article-container span.katex-display').forEach(item => {
|
||||
utils.wrap(item, 'div', {class: 'katex-wrap'})
|
||||
})
|
||||
})();
|
||||
|
||||
div
|
||||
script(src=url_for(theme.cdn.utils))
|
||||
script(src=url_for(theme.cdn.main))
|
||||
script(src=url_for(theme.cdn.waterfall))
|
||||
script(src=url_for(theme.cdn.pjax))
|
||||
|
||||
if theme.mermaid
|
||||
script(src=url_for(theme.cdn.mermaid_js))
|
||||
if theme.post.share.enable && theme.post.share.list && theme.post.share.list.includes('qrcode')
|
||||
script(src=url_for(theme.cdn.qrcode))
|
||||
|
||||
if theme.display_mode.universe
|
||||
script(src=url_for(theme.cdn.universe_js))
|
||||
script.
|
||||
dark()
|
||||
|
||||
if theme.right_menu.enable && theme.right_menu.translate.enable
|
||||
script(src=url_for(theme.cdn.translate_js))
|
||||
|
||||
if theme.katex && theme.katex.enable
|
||||
if theme.katex.per_page && (is_post() || is_page())
|
||||
+katex
|
||||
else if page.katex
|
||||
+katex
|
||||
|
||||
if theme.lazyload.enable
|
||||
script(src=url_for(theme.cdn.lazyload))
|
||||
script(src=url_for(theme.cdn.snackbar))
|
||||
if theme.lightbox
|
||||
if theme.mediumZoom
|
||||
script(src=url_for(theme.cdn.medium_zoom))
|
||||
if theme.fancybox
|
||||
script(src=url_for(theme.cdn.fancyapps_ui))
|
||||
if (theme.says.home_mini && theme.says.enable) || theme.carousel
|
||||
script(src=url_for(theme.cdn.swiper_js))
|
||||
|
||||
if theme.post_ai.enable
|
||||
script(src=url_for(theme.cdn.efu_ai))
|
||||
|
||||
if theme.capsule.enable || theme.music.enable || theme.says.enable
|
||||
script.
|
||||
var meting_api = '!{theme.meting_api}';
|
||||
script(src=url_for(theme.cdn.aplayer_js))
|
||||
script(src=url_for(theme.cdn.meting_js))
|
||||
|
||||
if theme.post.covercolor.enable
|
||||
case theme.post.covercolor.mode
|
||||
when 'local'
|
||||
script(src=url_for(theme.cdn.cover_local))
|
||||
when 'api'
|
||||
script.
|
||||
const coverColorConfig = {
|
||||
api: '!{theme.post.covercolor.api}',
|
||||
time: !{theme.post.covercolor.time}
|
||||
}
|
||||
script(src=url_for(theme.cdn.cover_api))
|
||||
|
||||
if theme.loading.pace
|
||||
script(src=url_for(theme.cdn.pace_js))
|
||||
|
||||
if theme.search.enable && theme.search.type === "algolia"
|
||||
script(src=url_for(theme.cdn.instantsearch))
|
||||
script(src=url_for(theme.cdn.algolia_search))
|
||||
|
||||
if theme.right_menu.enable
|
||||
script(src=url_for(theme.cdn.right_menu_js))
|
||||
|
||||
if theme.extends.body
|
||||
each item in theme.extends.body
|
||||
!= item
|
||||
|
||||
.js-pjax
|
||||
if is_home() && theme.says.enable && theme.says.home_mini
|
||||
script.
|
||||
sco.initbbtalk()
|
||||
if page.type === 'says' && theme.says.enable
|
||||
script.
|
||||
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
||||
sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
|
||||
if comment_js
|
||||
include ../widgets/third-party/comments/js
|
||||
if theme.mermaid
|
||||
script.
|
||||
mermaid.run();
|
||||
if is_home() && theme.carousel && site.posts.data.filter(item => item.recommend === true).slice(0, 6) || false
|
||||
script.
|
||||
carousel_swiper()
|
||||
if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
|
||||
if theme.busuanzi_use === 0
|
||||
script(defer pjax src=url_for(theme.cdn.busuanzi_js))
|
||||
else
|
||||
script(defer pjax src=url_for(theme.cdn.busuanzi_qj_js))
|
||||
|
||||
|
||||
if theme.footer.randomlink
|
||||
include ../widgets/randomlink.pug
|
||||
|
||||
// pjax
|
||||
!= partial("includes/widgets/third-party/pjax", {}, {cache: true})
|
||||
|
||||
// theme
|
||||
include ../body/mode
|
||||
|
||||
// google adsense
|
||||
include ../body/gadsense
|
||||
@@ -0,0 +1,52 @@
|
||||
each item in theme.verify_site || []
|
||||
meta(name=item.name, content=item.content)
|
||||
|
||||
link(rel="canonical" href=urlNoIndex())
|
||||
link(rel="stylesheet", href=url_for(theme.cdn.solitude_css))
|
||||
|
||||
// aplayer
|
||||
if theme.capsule.enable || theme.music.enable
|
||||
link(rel="stylesheet", href=url_for(theme.cdn.aplayer_css))
|
||||
|
||||
// swiper
|
||||
if (theme.says.home_mini && theme.says.enable) || theme.carousel
|
||||
link(rel="stylesheet", href=url_for(theme.cdn.swiper_css))
|
||||
|
||||
// fancybox ui
|
||||
if theme.lightbox && theme.fancybox
|
||||
link(rel="stylesheet", href=url_for(theme.cdn.fancyapps_css))
|
||||
|
||||
// katex
|
||||
if theme.katex && theme.katex.enable
|
||||
link(rel="stylesheet", href=url_for(theme.cdn.katex))
|
||||
|
||||
// Open Graph
|
||||
include ../head/opengraph.pug
|
||||
|
||||
// pwa
|
||||
include ../head/pwa.pug
|
||||
|
||||
script.
|
||||
console.log(
|
||||
"%c Program: Hexo %c Theme: Solitude %c Version: v1.12.2",
|
||||
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
||||
"padding: 5px 10px;color:white;background:#3e9f50;",
|
||||
"padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0",
|
||||
)
|
||||
|
||||
if theme.memorial.enable
|
||||
script.
|
||||
let mdate = "!{theme.memorial.date}";
|
||||
mdate = (mdate.split(","));
|
||||
let ndate = new Date();
|
||||
for (let i of mdate) {
|
||||
if (i === (ndate.getMonth()+1) + "-" + (ndate.getDate())) {
|
||||
document.documentElement.classList.add('memorial');
|
||||
}
|
||||
}
|
||||
|
||||
if theme.extends.head
|
||||
each item in theme.extends.head
|
||||
!= item
|
||||
|
||||
!=fragment_cache('injectHeadJs', function(){return inject_head_js()})
|
||||
Reference in New Issue
Block a user