mirror of
https://github.com/KivotosRailway/website.git
synced 2026-11-03 19:07:56 +09:00
Add solitude
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
.aside-content#aside-content
|
||||
- var noSticky, Sticky
|
||||
if(is_home())
|
||||
- noSticky = theme.aside.home.noSticky.split(',')
|
||||
- Sticky = theme.aside.home.Sticky.split(',')
|
||||
else if(is_post())
|
||||
- noSticky = theme.aside.post.noSticky.split(',')
|
||||
- Sticky = theme.aside.post.Sticky.split(',')
|
||||
else if(is_page() || is_archive() || is_tag() || is_category())
|
||||
- noSticky = theme.aside.page.noSticky.split(',')
|
||||
- Sticky = theme.aside.page.Sticky.split(',')
|
||||
each item in noSticky
|
||||
include ./asideSwitch.pug
|
||||
.sticky_layout
|
||||
if page.toc
|
||||
include ./asideToc.pug
|
||||
each item in Sticky
|
||||
include ./asideSwitch.pug
|
||||
@@ -0,0 +1,5 @@
|
||||
if theme.google_adsense.enable && !theme.google_adsense.auto_ads && theme.google_adsense.aside_card
|
||||
.card-widget.card-adsense
|
||||
ins.adsbygoogle(style="display:block; text-align:center; min-height:120px; min-width: 100%", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
|
||||
script.
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
@@ -0,0 +1,8 @@
|
||||
.card-widget.card-tags.card-archives.card-webinfo.card-allinfo
|
||||
if theme.aside.tags.enable
|
||||
include ./asideTag
|
||||
hr
|
||||
if theme.aside.archive.enable
|
||||
include ./asideArchive
|
||||
hr
|
||||
include ./asideWebInfo
|
||||
@@ -0,0 +1,11 @@
|
||||
- var archive = theme.aside.archive
|
||||
|
||||
ul.card-archive-list
|
||||
- var type = archive.type ? archive.type : 'year'
|
||||
each value, key in getArchiveLength(type)
|
||||
li.card-archive-list-item
|
||||
a.card-archive-list-link(href=`/archives/${key}/`)
|
||||
span.card-archive-list-date= key
|
||||
.card-archive-list-count-group
|
||||
span.card-archive-list-count= value
|
||||
span.card-archive-list-count-unit= __('console.archive_unit')
|
||||
@@ -0,0 +1,7 @@
|
||||
.card-widget(class=custom.class, id=custom.id)
|
||||
if !custom.no_head
|
||||
.item-headline
|
||||
i(class=custom.icon)
|
||||
span=custom.title
|
||||
div(class=custom.content_class ||'item-content', id=custom.content_id, style=custom.content_css)
|
||||
!= custom.content_html
|
||||
@@ -0,0 +1,5 @@
|
||||
.card-widget.card-platform
|
||||
#flip-wrapper
|
||||
#flip-content
|
||||
.face
|
||||
.back.face
|
||||
@@ -0,0 +1,86 @@
|
||||
- const {style ,url} = theme.aside.card
|
||||
.card-widget.card-info
|
||||
.card-content
|
||||
case style
|
||||
when 0
|
||||
.card-info-avatar.is-center
|
||||
.author-info__top-group
|
||||
.author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
|
||||
.avatar-img-group
|
||||
img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.card.author.img)
|
||||
if theme.aside.card.author.sticker
|
||||
.avatar-sticker
|
||||
img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
|
||||
.author-info__description_group
|
||||
.author-info__description!= theme.aside.card.content
|
||||
.author-info__description2!= theme.aside.card.content2
|
||||
.author-info__bottom-group
|
||||
a.author-info__bottom-group-left(href=url_for(theme.aside.card.url))
|
||||
.author-info__name= config.author
|
||||
.author-info__desc!= config.subtitle
|
||||
.card-info-social-icons.is-center
|
||||
each value, label in theme.aside.card.information || {}
|
||||
- var array = value.split('||')
|
||||
a.social-icon(href=url_for(trim(array[0])), title=label)
|
||||
i.solitude(class=array[1])
|
||||
when 1
|
||||
.card-info-bg-top
|
||||
.is-center
|
||||
.author-info__top-group
|
||||
.author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
|
||||
a.card-info-avatar(href=url_for(theme.aside.card.url) title=_p('aside.avatar'))
|
||||
.avatar-img
|
||||
img(src=theme.aside.card.author.img alt=_p('aside.avatar'))
|
||||
if theme.aside.card.author.sticker
|
||||
.avatar-sticker
|
||||
img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
|
||||
.card-info__desc_group
|
||||
.author-info__name= config.author
|
||||
.author-info__desc!= config.subtitle
|
||||
|
||||
.card-info__data.is-center
|
||||
a(href=url_for('/archives/') title=_p('aside.card.posts') + site.posts.length)
|
||||
.length-num= site.posts.length
|
||||
.headline= _p('page.archives')
|
||||
a(href=url_for('/tags/') title=_p('aside.card.tags') + site.tags.length)
|
||||
.length-num= site.tags.length
|
||||
.headline= _p('page.tag')
|
||||
a(href=url_for('/categories/') title=_p('aside.card.categories') + site.categories.length)
|
||||
.length-num= site.categories.length
|
||||
.headline= _p('page.category')
|
||||
|
||||
.card-info-social-icons.is-center
|
||||
each value, label in theme.aside.card.information || {}
|
||||
- var array = value.split('||')
|
||||
a.social-icon(href=url_for(trim(array[0])), title=label)
|
||||
i.solitude(class=array[1])
|
||||
when 2
|
||||
.card-info-bg-top
|
||||
.author-info-social
|
||||
.social-icons
|
||||
each value, label in theme.aside.card.information || {}
|
||||
- var array = value.split('||')
|
||||
a.social-icon(href=url_for(trim(array[0])), title=label)
|
||||
i.solitude(class=array[1])
|
||||
span.more-info(onclick="document.querySelector('.social-icons').classList.toggle('show')")
|
||||
i.solitude.st-more-2-fill
|
||||
a.card-info-avatar(href=url_for(theme.aside.card.url) title=_p('aside.avatar'))
|
||||
.avatar-img
|
||||
img(src=theme.aside.card.author.img alt=_p('aside.avatar'))
|
||||
if theme.aside.card.author.sticker
|
||||
.avatar-sticker
|
||||
img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
|
||||
.author-info__name= config.author
|
||||
.card-info__data.is-center
|
||||
a(href=url_for('/archives/') title=_p('aside.card.posts') + site.posts.length)
|
||||
.length-num= site.posts.length
|
||||
.headline= _p('page.archives')
|
||||
a(href=url_for('/tags/') title=_p('aside.card.tags') + site.tags.length)
|
||||
.length-num= site.tags.length
|
||||
.headline= _p('page.tag')
|
||||
a(href=url_for('/categories/') title=_p('aside.card.categories') + site.categories.length)
|
||||
.length-num= site.categories.length
|
||||
.headline= _p('page.category')
|
||||
.card-info__desc_group
|
||||
.author-info__description!= theme.aside.card.content
|
||||
.author-info__description2!= theme.aside.card.content2
|
||||
@@ -0,0 +1,16 @@
|
||||
.card-widget.card-recent-post
|
||||
.item-headline
|
||||
i.solitude.st-map-line
|
||||
span= _p('aside.newpost')
|
||||
.aside-list
|
||||
- let index = 1
|
||||
each post in site.posts.data.sort((a, b) => b.date < a.date ? -1 : 1)
|
||||
if index <= 5
|
||||
.aside-list-item
|
||||
a.thumbnail(href=url_for(post.path) title=post.title)
|
||||
img(alt=post.title src=post.cover)
|
||||
.content
|
||||
a.title(href=url_for(post.path) title=post.title)= post.title
|
||||
if post.categories.data[0]
|
||||
a.article-recent_post_categories(href=url_for(post.path))= post.categories.data[0].name
|
||||
- index++
|
||||
@@ -0,0 +1,9 @@
|
||||
.card-widget.card-recent-comment
|
||||
.item-headline
|
||||
i.solitude.st-chat-fill
|
||||
span= _p('aside.newcomment')
|
||||
if theme.recent_comments.enable
|
||||
a.recent-comment-more(href=url_for(theme.recent_comments.page) title=_p('console.recent_comment_more'))
|
||||
i.solitude.st-right-btn-fill
|
||||
.aside-list
|
||||
include ../third-party/news-comment/newest-comment.pug
|
||||
@@ -0,0 +1,19 @@
|
||||
case item
|
||||
when 'about'
|
||||
include ./asideInfoCard.pug
|
||||
when 'flip'
|
||||
include ./asideFlipCard.pug
|
||||
when 'newestPost'
|
||||
include ./asideNewestPost.pug
|
||||
when 'allInfo'
|
||||
include ./asideAllInfo.pug
|
||||
when 'ads'
|
||||
include ./asideAdsense.pug
|
||||
when 'newest_comment'
|
||||
include ./asideNewstComments.pug
|
||||
default
|
||||
- const custom = site.data?.aside?.find((i) => i.name === item)
|
||||
if custom
|
||||
include ./asideCustom.pug
|
||||
else
|
||||
include ../../page/default.pug
|
||||
@@ -0,0 +1,16 @@
|
||||
- const highlight = theme.aside.tags.highlight_list || []
|
||||
.card-tag-cloud
|
||||
each tag in site.tags.find({ parent: { $exists: false } }).data
|
||||
if highlight.includes(tag.name)
|
||||
a.highlight(href=url_for(tag.path))= tag.name
|
||||
sup= tag.length
|
||||
else
|
||||
a(href=url_for(tag.path))= tag.name
|
||||
sup= tag.length
|
||||
if site.tags.length >= theme.aside.tags.limit
|
||||
span#more-tags-btn(onclick="sco.openAllTags()")= __('aside.tagmore')
|
||||
else
|
||||
style.
|
||||
.card-tag-cloud::after {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
.card-widget#card-toc
|
||||
.item-headline
|
||||
i.solitude.st-menu-line
|
||||
span= __('aside.toc')
|
||||
.toc-content#toc-content!= toc(page.content, { list_number: false })
|
||||
@@ -0,0 +1,48 @@
|
||||
.webinfo
|
||||
if theme.aside.siteinfo.postcount
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.item-icon.solitude.st-folder-fill
|
||||
.item-name= __('aside.postcount')
|
||||
.item-count= site.posts.length
|
||||
if theme.busuanzi
|
||||
if theme.aside.siteinfo.pv
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.item-icon.solitude.st-visitor-line
|
||||
.item-name= __('aside.pv')
|
||||
if theme.busuanzi_use === 0
|
||||
span#busuanzi_value_site_pv
|
||||
i.solitude.st-loading-line
|
||||
else
|
||||
span#busuanzi_site_pv
|
||||
i.solitude.st-loading-line
|
||||
if theme.aside.siteinfo.uv
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.item-icon.solitude.st-team-fill
|
||||
.item-name= __('aside.uv')
|
||||
if theme.busuanzi_use === 0
|
||||
span#busuanzi_value_site_uv
|
||||
i.solitude.st-loading-line
|
||||
else
|
||||
span#busuanzi_site_uv
|
||||
i.solitude.st-loading-line
|
||||
if theme.aside.siteinfo.runtimeenable
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.item-icon.solitude.st-calendar-todo-fill
|
||||
.item-name= __('aside.runtime')
|
||||
.item-count#runtimeshow
|
||||
if theme.aside.siteinfo.updatetime
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.item-icon.solitude.st-loop-left-fill
|
||||
.item-name= __('aside.updatetime')
|
||||
time.item-count(datetime=new Date())
|
||||
if theme.wordcount && theme.aside.siteinfo.wordcount
|
||||
.webinfo-item
|
||||
.webinfo-item-title
|
||||
i.item-icon.solitude.st-word-fill
|
||||
.item-name= __('aside.wordcount')
|
||||
.item-count= totalcount(site)
|
||||
Reference in New Issue
Block a user