Add solitude

This commit is contained in:
IF-chan
2024-07-05 21:01:19 +08:00
parent 26d71c4fbc
commit 71758b9fce
289 changed files with 23277 additions and 0 deletions
@@ -0,0 +1,44 @@
.post-reward
.reward-button(title=_p('award.tipping') onclick="AddRewardMask()")
i.solitude.st-hand-heart-fill
=_p('award.tipping')
.reward-main
ul.reward-all
span.reward-title=theme.post.award.title
ul.reward-group
- let list = theme.post.award.list || []
for item in list
li.reward-item
a(href=url_for(item.url))
img.post-qr-code-img.nolazyload(src=item.qcode, alt=item.name, style="border-color: " + item.color)
.post-qr-code-desc=item.name
a.reward-main-btn(href=url_for(theme.post.award.appreciators))
.reward-text= _p('award.title')
.reward-dec=theme.post.award.desc
script.
function RemoveRewardMask() {
let rewardMainElements = document.querySelectorAll(".reward-main");
let quitBoxElement = document.querySelector("#quit-box");
rewardMainElements.forEach(element => {
element.style.display = "none";
});
if (quitBoxElement) {
quitBoxElement.style.display = "none";
}
}
function AddRewardMask() {
let rewardMainElements = document.querySelectorAll(".reward-main");
let quitBoxElement = document.querySelector("#quit-box");
rewardMainElements.forEach(element => {
element.style.display = "flex";
});
if (quitBoxElement) {
quitBoxElement.style.display = "flex";
}
}
@@ -0,0 +1,74 @@
- const {copyright} = theme.post.default
.post-copyright
.post-copyright__author_group
a.post-copyright__author_img(href=url_for(copyright.author.url))
img.post-copyright__author_img_front(src=copyright.author.img || theme.site.icon)
.post-copyright__author_name= config.title
.post-copyright__author_desc= config.subtitle
.post-tools#post-tools
.post-tools-left
#quit-box(onclick="RemoveRewardMask()")
if theme.post.award.enable
include ./award
if theme.post.rss
.reward-link.mode
a.reward-link-button(href=url_for(theme.post.rss))
i.solitude.st-plant-fill
= _p('footer.rss')
if theme.post.share.enable
.social-share
- const path = config.url + url_for(page.path);
- const encodedPath = encodeURIComponent(path);
- const encodedTitle = encodeURIComponent(page.title);
- const encodedDescription = encodeURIComponent(page.description);
- const encodedIcon = encodeURIComponent(page.cover || theme.site.icon);
each item in theme.post.share.list || []
case item
when 'qq'
a.social-share-ico.icon-qq(href=`https://connect.qq.com/widget/shareqq/index.html?url=${encodedPath}&title=${encodedTitle}&desc=${encodedDescription}&summary=${encodedDescription}&site=${encodedTitle}&pics=${encodedIcon}` title=_p('post.share.qq'))
i.solitude.st-qq-fill
when 'weibo'
a.social-share-ico.icon-weibo(href=`http://service.weibo.com/share/share.php?url=${encodedPath}&title=${encodedTitle}&pic=${encodedIcon}` title=_p('post.share.weibo'))
i.solitude.st-weibo-fill
when 'telegram'
a.social-share-ico.icon-telegram(href=`https://t.me/share/url?url=${encodedPath}&text=${encodedTitle}` title=_p('post.share.telegram'))
i.solitude.st-telegram-fill
when 'whatsapp'
a.social-share-ico.icon-whatsapp(href=`https://api.whatsapp.com/send?text=${encodedTitle} ${encodedPath}` title=_p('post.share.whatsapp'))
i.solitude.st-whatsapp-fill
when 'linkedin'
a.social-share-ico.icon-linkedin(href=`https://www.linkedin.com/shareArticle?mini=true&url=${encodedPath}&title=${encodedTitle}&summary=${encodedDescription}&source=${encodedTitle}` title=_p('post.share.linkedin'))
i.solitude.st-linkedin-box-fill
when 'facebook'
a.social-share-ico.icon-facebook(href=`https://www.facebook.com/sharer/sharer.php?u=${encodedPath}` title=_p('post.share.facebook'))
i.solitude.st-facebook-fill
when 'twitter'
a.social-share-ico.icon-twitter(href=`https://twitter.com/intent/tweet?url=${encodedPath}&text=${encodedTitle}` title=_p('post.share.twitter'))
i.solitude.st-twitter-x-fill
when 'link'
.social-share-ico.icon-link(onclick=`utils.copy("${path}")` title=_p('post.share.link'))
i.solitude.st-links-line
when 'qrcode'
.social-share-ico.icon-qrcode(title=_p('post.share.qrcode'))
i.solitude.st-qr-code-fill
.share-main
.share-main-all
#qrcode
.reward-dec=_p('post.share.qrcode')
script(pjax).
typeof QRCode === 'function' && new QRCode(document.getElementById("qrcode"), '!{path}');
window.addEventListener('DOMContentLoaded', () => {
new QRCode(document.getElementById("qrcode"), '!{path}');
});
if copyright.enable || page.copyright
.post-copyright__notice
span.post-copyright-info
if page.reprint
= _p('post.copyright.reprint')
else
= _p('post.copyright.original')
a(href=url_for(theme.post.default.copyright.licenurl))
| #{theme.post.default.copyright.license}
= _p('post.copyright.original_end')
a(href=url_for("/")) #{config.title}
@@ -0,0 +1,12 @@
.post-ai
.ai-title
.ai-title-left
i.ai-title-icon.solitude.st-robot-fill
.ai-title-text=_p('post.ai.title')
.ai-tag#ai-tag= theme.post_ai.modelName
.ai-explanation(style="display: block;")
.ai-suggestions
.ai-bottom
.ai-tips= theme.post_ai.tips
if theme.post_ai.report
a.ai-report(title=_p('post.ai.tip'), href=url_for(theme.post_ai.report))=_p('post.ai.tip')
@@ -0,0 +1,84 @@
.coverdiv#coverdiv
img#post-cover.nolazyload(src=url_for(page.cover), alt=page.title)
#post-info
#post-firstinfo
.meta-firstline
- var cc = page.reprint ? _p('post.reprint') : _p('post.original')
a.post-meta-original(title=_p('post.cc').replace(/\$\{cc}/, cc))= cc
if page.categories.data.length > 0
span.post-meta-categories
a.post-meta-categories(href=url_for('/' + page.categories.data[0].path))= page.categories.data[0].name
.tag_share
.post-meta__tag-list
each tag in page.tags.data
a.post-meta__tags(href=url_for(tag.path))
span.tags-name.tags-punctuation= tag.name
h1.post-title= page.title
#post-meta
.meta-secondline
if theme.post.meta.date
span.post-meta-date(title=_p('post.posted') + ' ' + full_date(page.date))
i.post-meta-icon.solitude.st-calendar-todo-fill
time(datetime=date_xml(page.date))= date_xml(page.date)
if theme.post.meta.updated
span.post-meta-date(title=_p('post.updated') + ' ' + full_date(page.updated))
i.post-meta-icon.solitude.st-refresh-line
time(datetime=date_xml(page.updated))= date_xml(page.updated)
if theme.wordcount
span.post-meta-wordcount
if theme.post.meta.wordcount
i.post-meta-icon.solitude.st-word-fill(title=_p('post.wordcount'))
span.word-count= wordcount(page.content)
span.post-meta-separator
if theme.post.meta.readtime
i.post-meta-icon.solitude.st-clock-fill(title=_p('post.minread'))
span= min2read(page.content) + " min"
if theme.post.meta.locate
span.post-meta-position(title=_p('post.ip') + page.locate)
i.post-meta-icon.solitude.st-map-pin-fill
span= page.locate
if theme.post.meta.pv
a.post-meta-pv(href=url_for(page.path), title=_p('post.pv'))
i.post-meta-icon.solitude.st-fire-fill
if theme.comment.use && theme.comment.pv
case theme.comment.use[0]
when "Twikoo"
span#twikoo_visitors
i.solitude.st-loading-line
when "Waline"
span.waline-pageview-count
i.solitude.st-loading-line
when "Valine"
span.leancloud_visitors(id=url_for(page.path))
span.leancloud-visitors-count
i.solitude.st-loading-line
when 'Artalk'
span#ArtalkPV
i.solitude.st-loading-line
else
if theme.busuanzi
if theme.busuanzi_use === 0
span#busuanzi_value_page_pv
i.solitude.st-loading-line
else
span#busuanzi_page_pv
i.solitude.st-loading-line
if theme.post.meta.comment && page.comment && theme.comment.count && theme.comment.use
span.post-meta-commentcount(title=_p('post.comment'), onclick="sco.scrollTo('post-comment')")
i.solitude.st-chat-fill
a(href=url_for(page.path) + "#post-comment")
case theme.comment.use[0]
when "Twikoo"
span.twikoo-count
i.solitude.st-loading-line
when "Waline"
span.waline-comment-count
i.solitude.st-loading-line
when "Valine"
span.valine-comment-count(data-xid=url_for(page.path) itemprop="commentCount")
i.solitude.st-loading-line
when 'Artalk'
span.artalk-count
i.solitude.st-loading-line
include ./wave
@@ -0,0 +1,25 @@
nav.needEndHide.pagination-post#pagination
if page.prev && page.next
.prev-post.pull-left
a(href=url_for(page.prev.path))
.pagination-info
.label=_p('post.nav.prev')
.prev_info= page.prev.title
.next-post.pull-right
a(href=url_for(page.next.path))
.pagination-info
.label=_p('post.nav.next')
.next_info= page.next.title
else
if !page.prev && page.next
.next-post.pull-full
a(href=url_for(page.next.path))
div.pagination-info
.label=_p('post.nav.next')
.next_info= page.next.title
if !page.next && page.prev
.prev-post.pull-full
a(href=url_for(page.prev.path))
.pagination-info
.label=_p('post.nav.prev')
.prev_info= page.prev.title
@@ -0,0 +1,9 @@
section.main-hero-waves-area.waves-area
svg.waves-svg(xmlns="http://www.w3.org/2000/svg", xlink="http://www.w3.org/1999/xlink", viewBox="0 24 150 28", preserveAspectRatio="none", shape-rendering="auto")
defs
path#gentle-wave(d="M -160 44 c 30 0 58 -18 88 -18 s 58 18 88 18 s 58 -18 88 -18 s 58 18 88 18 v 44 h -352 Z")
g.parallax
use(href="#gentle-wave", x="48", y="0")
use(href="#gentle-wave", x="48", y="3")
use(href="#gentle-wave", x="48", y="5")
use(href="#gentle-wave", x="48", y="7")