Skip to content

Commit

Permalink
Merge pull request #38 from DuoSco/dev
Browse files Browse the repository at this point in the history
Update 1.2.1
  • Loading branch information
王卓Sco authored Nov 29, 2023
2 parents 5896540 + 6736003 commit 1b8c7b7
Show file tree
Hide file tree
Showing 272 changed files with 18,045 additions and 21,677 deletions.
Binary file modified .DS_Store
Binary file not shown.
693 changes: 674 additions & 19 deletions LICENSE

Large diffs are not rendered by default.

436 changes: 243 additions & 193 deletions _config.yml
100755 → 100644

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions languages/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ page:
tag: Tags
category: Categories
archives: Archives
echarts: Echarts

nav:
backtop: Back to top
Expand Down
16 changes: 8 additions & 8 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ time:
runtime:

sayhello:
morning: 早上好
noon: 中午好
afternoon: 下午好
night: 晚上好
goodnight: 晚安
iam: '! 我是'
morning: 一日之计在于晨
noon: 吃饱了才有力气干活
afternoon: 集中精力,攻克难关
night: 不要太劳累了,早睡更健康
goodnight: 睡个好觉,保证精力充沛

page:
tag: 标签
category: 分类
archives: 文章
echarts: 博客统计

nav:
backtop: 返回顶部
Expand All @@ -34,6 +34,6 @@ nav:
console: 中控台

search:
empty: 搜索结果为空
hit: 已为您找到 ${query} 条结果
empty: 找不到你查询的内容:${query}
hit: 找到 ${hits} 条结果,用时 ${time} 毫秒
placeholder: 输入关键词快速查找
34 changes: 0 additions & 34 deletions layout/404.ejs

This file was deleted.

24 changes: 24 additions & 0 deletions layout/404.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
extends includes/layout.pug

block content
#error-wrap
.error-content
.error-img(style='background-image: url(' + url_for(theme.errorpage.img) + ')')
.error-info
h1.error_title 404
.error_subtitle= theme.errorpage.text
a.button--animated(href="/")
i.scoicon.sco-external-link
| 回到主页

if theme.errorpage.recommendList
.aside-list
.aside-list-group
each post, index in site.posts.sort('-date').data
if index >= 5
break
.aside-list-item
a.thumbnail(href=url_for(post.path), title=post.title)
img(src=post.cover, alt=post.title)
.content
a.title(href=url_for(post.path), title=post.title)= post.title
10 changes: 0 additions & 10 deletions layout/archive.ejs

This file was deleted.

11 changes: 11 additions & 0 deletions layout/archive.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends includes/layout.pug

block content
main.layout#content-inner
div#archive
div.article-sort-title #{__('page.archives')}<sup>#{page.posts.length}</sup>
div.article-sort
include includes/mixins/articleSort
include includes/mixins/pagination
include includes/widgets/aside/aside

18 changes: 0 additions & 18 deletions layout/category.ejs

This file was deleted.

16 changes: 16 additions & 0 deletions layout/category.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
extends includes/layout.pug

block content
main.layout#content-inner
div#category
div#category-bar
div.category-bar-items#category-bar-items
include includes/widgets/home/categoryBar
div.recent-posts#recent-posts
- const currentCategory = page.category
each post in site.posts.data
each category in post.categories.data
if category.name === currentCategory
include includes/widgets/home/postList
include includes/mixins/pagination
include includes/widgets/aside/aside
42 changes: 42 additions & 0 deletions layout/includes/console.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
div#console(style="zoom: 1")
div.close-btn(onclick="sco.hideConsole()", href="javascript:void(0);")
i.scoicon.sco-close-fill
if theme.thirdparty.consolePlus
div.console-card-group
div.console-card-group-left
div.console-card#card-newest-comments(onclick="sco.hideConsole()")
div.card-content
div.author-content-item-tips= "互动"
div.author-content-item-title= "最新评论"
div.aside-list

div.console-card-group-right
div.console-card.tags(onclick="sco.hideConsole()")
div.card-content
div.author-content-item-tips= "标签"
div.author-content-item-title= "寻找感兴趣的领域"
div.card-tag-cloud
each tag in site.tags.data
a(href=url_for(tag.path), style="font-size: 0.8rem; color: #d3d3d3")= tag.name
sup= tag.length

div.console-card.history(onclick="sco.hideConsole()")
include ./widgets/aside/asideArchive.pug

div.button-group
div.console-btn-item
a.darkmode_switchbutton(onclick="sco.switchDarkMode()", title="昼夜切换", href="javascript:void(0);" rel="nofollow" data-pjax-state)
i.scoicon.sco-moon-clear-fill(style="font-size: 1rem;")
div.console-btn-item#consoleHideAside
a.asideSwitch(onclick="sco.switchHideAside()", title="边栏显示控制", href="javascript:void(0);" rel="nofollow" data-pjax-state)
i.scoicon.sco-side-bar-fill(style="font-size: 1rem;")
if theme.thirdparty.aplayer.enable
div.console-btn-item#consoleMusic(onclick="sco.musicToggle()")
a.music-switch(title="音乐开关")
i.scoicon.sco-disc-fill(style="font-size: 1rem;")

if theme.comment.enable
div.console-btn-item.on#consoleCommentBarrage(onclick="sco.switchCommentBarrage()")
a.commentBarrage
i.scoicon.sco-chat-fill(style="font-size: 1rem;")
div.console-mask(onclick="sco.hideConsole()")
71 changes: 71 additions & 0 deletions layout/includes/footer.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
div#sco-footer-bar
div.footer-logo
if theme.site.name.class === 'i_class'
i.scoicon(class=theme.site.name.custom, style="font-size: 1rem")
else if theme.site.name.class === 'img'
i.scoicon(style="background-image: url(" + url_for(theme.site.name.custom) + ")")
else if theme.site.name.class === 'text'
span.scoicon= theme.site.name.custom
div.footer-bar-description= "来自" + config.title + " - " + config.subtitle + "的文章"
a.footer-bar-link(href="/", data-pjax-state)= "了解更多"
div#footer_deal
- var leftInfo = theme.footer && theme.footer.information && theme.footer.information.left ? theme.footer.information.left : {}
- var rightInfo = theme.footer && theme.footer.information && theme.footer.information.right ? theme.footer.information.right : {}

each value, i in leftInfo
a.deal_link(href=url_for(value.url), rel="external nofollow", title=i)
i(class=value.icon)

img.footer_mini_logo(src=theme.site.icon, title="返回顶部", onclick="sco.toTop()")

each value, i in rightInfo
a.deal_link(href=url_for(value.url), rel="external nofollow", title=i)
i(class=value.icon)
div#sco-footer
- var group = theme.footer && theme.footer.group ? theme.footer.group : {}

each value, x in group
div.footer-group
h3.footer-title= x
div.footer-links
each url, y in value
a.footer-item(href=url_for(url), title=y, rel="noopener external nofollow noreferrer")= y

if theme.footer && theme.footer.randomlink
div.footer-group
div.footer-title-group
h3.footer-title 友链
a.random-friends-btn(href="javascript:randomLinksList();", rel="external nofollow")
i.scoicon.sco-refresh-line
div.footer-links#friend-links-in-footer
div#footer-bar
div.footer-bar-links
div.footer-bar-left
div#footer-bar-tips
if moment(theme.aside.siteinfo.runtime).year() === new Date().getFullYear()
div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} By&nbsp;
a.footer-bar-link(href="/", rel="external nofollow")= config.author
else
div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} - #{new Date().getFullYear()} By&nbsp;
a.footer-bar-link(href="/", rel="external nofollow")= config.author
div.footer-bar-right
if theme.footer && theme.footer.rss && theme.footer.rss.enable
a.footer-bar-link(href="/rss/", rel="external nofollow", target="_self") 订阅
a.footer-bar-link(href="https://github.com/DuoSco/hexo-theme-solitude", rel="external nofollow", target="_self") 主题
if theme.site && theme.site.icp
a.footer-bar-link(href="https://beian.miit.gov.cn/#/Integrated/index", target="_blank", rel="noopener external nofollow noreferrer noopener")= theme.site.icp
a.footer-bar-link.cc(href=theme.footer.license.url, target="_self", rel="external nofollow")
i.scoicon.sco-copyright-line
i.scoicon.sco-creative-commons-by-line
i.scoicon.sco-creative-commons-nc-line
i.scoicon.sco-creative-commons-nd-line
div.needEndHide#cookies-window
div.cookies-window-title 协议提醒助手
div.cookies-window-content
span.cookies-tip 查看本站为你的个人隐私做出的努力
a.cookies-link(href="/privacy/", title="本站如何保护你的隐私", data-pjax-state="")
i.scoicon.sco-arrow-right-circle-fill
if theme.post.award.enable
div#quit-box(onclick="RemoveRewardMask()", style="display=none")
if theme.comment.enable
div.comment-barrage.needEndHide
29 changes: 29 additions & 0 deletions layout/includes/head.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- let title = page.title, subtitle =''
- if (is_home()) title = config.title
- else if (is_archive()) title = _p('page.archives') + (page.year || "")
- else if (is_tag()) title = _p('page.tag')+': ' + page.tag
- else if (is_category()) title = _p('page.category') +': ' + page.category
- else if (page.type === '404') title = '404'+': ' + theme.errorpage.text
- else if (is_post() || is_page()) title = page.title

- if (is_home()) subtitle = config.subtitle ? ' - ' + config.subtitle : ''
- else subtitle = title ? ' | ' + config.title : config.title
- var description = page.desc || page.excerpt || config.description

meta(charset="utf-8")
meta(http-equiv="X-UA-Compatible", content="IE=edge")
meta(name="viewport" content="width=device-width, initial-scale=1")

title= title + subtitle
noscript 开启JavaScript才能访问本站哦
link(rel="icon", href=theme.site.siteIcon)
meta(name="description", content=description)

// index.css
link(rel="stylesheet", href="/css/index.css")

// inject head
include ./inject/head.pug

// global head
include ./head/config.pug
79 changes: 79 additions & 0 deletions layout/includes/head/config.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
-
if (theme.thirdparty.search.enable) {
var localSearch = 'undefined';
if (theme.thirdparty.search.local_search.enable)
localSearch = JSON.stringify({
preload: theme.thirdparty.search.local_search.preload,
path: theme.thirdparty.search.local_search.path || '/search.xml'
})
var algolia = 'undefined';
if (theme.thirdparty.search.algolia_search.enable)
algolia = JSON.stringify({
appId: config.algolia.appId || config.algolia.applicationID,
apiKey: config.algolia.apiKey,
indexName: config.algolia.indexName,
hits: {
per_page: theme.thirdparty.search.algolia_search.hits.per_page || 10
}
})
}
script.
const GLOBAL_CONFIG = {
root: '!{config.root}',
algolia: !{algolia ? algolia : 'undefined'},
localsearch: !{localSearch ? localSearch : 'undefined'},
runtime: '!{theme.aside.siteinfo.runtimeenable ? theme.aside.siteinfo.runtime : false}',
lazyload: {
enable: !{theme.lazyload.enable},
error: '!{theme.lazyload.errorimg}'
},
hightlight: {
enable: !{theme.hightlight.enable},
limit: '!{theme.hightlight.hightlimit}'
},
lightbox: !{theme.lightbox},
randomlinks: !{theme.footer.randomlink},
lang: {
theme: {
dark: '!{_p('theme.dark')}',
light: '!{_p('theme.light')}',
},
copy: {
success: '!{_p('copy.success')}',
error: '!{_p('copy.error')}',
},
backtop: '!{_p('nav.backtop')}',
time: {
recent: '!{_p('time.recent')}',
yesterday: '!{_p('time.yesterday')}',
berforeyesterday: '!{_p('time.berforeyesterday')}',
daybefore: '!{_p('time.daybefore')}',
runtime: '!{_p('time.runtime')}',
},
sayhello: {
morning: '!{_p('sayhello.morning')}',
noon: '!{_p('sayhello.noon')}',
afternoon: '!{_p('sayhello.afternoon')}',
night: '!{_p('sayhello.night')}',
goodnight: '!{_p('sayhello.goodnight')}',
},
search: {
empty: '!{_p('search.empty')}',
hit: '!{_p('search.hit')}',
placeholder: '!{_p('search.placeholder')}',
}
},
covercolor: !{theme.post.covercolor.enable},
comment: {
enable: !{theme.comment.enable},
type: '!{theme.comment.type}',
twikoo: {
url: '!{theme.comment.twikoo.envId}',
accessToken: '!{theme.comment.twikoo.accessToken}'
},
},
rightside: {
enable: !{theme.rightside.enable}
}
}
Loading

0 comments on commit 1b8c7b7

Please sign in to comment.