chore: 适配
This commit is contained in:
parent
88e393d846
commit
e12c10ca27
@ -65,18 +65,6 @@ spec:
|
||||
label: 关闭
|
||||
- value: ""
|
||||
label: 跟随默认配置
|
||||
- $formkit: radio
|
||||
name: index_carousel
|
||||
label: 开启置顶轮播
|
||||
value: true
|
||||
help: '如果该文章被置顶,在此处可开启文章置顶轮播。'
|
||||
options:
|
||||
- value: "true"
|
||||
label: 开启
|
||||
- value: "false"
|
||||
label: 关闭
|
||||
- value: ""
|
||||
label: 跟随默认配置
|
||||
|
||||
---
|
||||
|
||||
|
@ -7,6 +7,12 @@ spec:
|
||||
- group: basic_info
|
||||
label: '基础信息'
|
||||
formSchema:
|
||||
- $formkit: text
|
||||
name: metadata_name
|
||||
label: 作者用户名
|
||||
placeholder: 请输入用户名
|
||||
value: admin
|
||||
help: 后台用户管理中作者的用户名,填写错误将导致个人资料显示异常(示例:admin)
|
||||
- $formkit: text
|
||||
name: small_title
|
||||
label: 网站副标题
|
||||
@ -495,8 +501,6 @@ spec:
|
||||
label: 广告模块
|
||||
- value: 'recent_posts'
|
||||
label: 最近文章模块
|
||||
- value: 'recent_comments'
|
||||
label: 最近评论模块
|
||||
- value: 'categories'
|
||||
label: 文章分类模块
|
||||
- value: 'tags'
|
||||
@ -527,12 +531,6 @@ spec:
|
||||
label: 桌面设备隐藏
|
||||
- value: 'is-not-hidden'
|
||||
label: 不隐藏
|
||||
- $formkit: text
|
||||
name: metadata_name
|
||||
label: 作者用户名
|
||||
placeholder: 请输入用户名
|
||||
value: admin
|
||||
help: 后台用户管理中作者的用户名,填写错误将导致个人资料显示异常(示例:admin)
|
||||
- $formkit: radio
|
||||
name: enable_color_character
|
||||
label: 侧边栏信息-开启彩字切换
|
||||
@ -702,11 +700,6 @@ spec:
|
||||
label: 侧边栏最近文章-展示文章数量
|
||||
placeholder: 请输入数量数值
|
||||
value: 5
|
||||
- $formkit: text
|
||||
name: recent_comments_num
|
||||
label: 侧边栏最近评论-展示评论数量
|
||||
placeholder: 请输入数量数值
|
||||
value: 5
|
||||
- $formkit: radio
|
||||
name: categories_more
|
||||
label: 侧边栏分类-显示”更多”按钮
|
||||
|
@ -1098,11 +1098,15 @@ table td, table th {
|
||||
}
|
||||
|
||||
&-searchicon {
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
font-size: 23px !important;
|
||||
font-size: 18px !important;
|
||||
color: var(--main);
|
||||
margin-left: auto;
|
||||
|
||||
span {
|
||||
margin-left: 4px;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
&-mask {
|
||||
@ -3910,7 +3914,11 @@ button.swiper-pagination-bullet {
|
||||
padding: 0 0.75rem;
|
||||
|
||||
.navbar-searchicon {
|
||||
display: block;
|
||||
font-size: 23px!important;
|
||||
|
||||
span {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-search {
|
||||
|
@ -6,7 +6,6 @@ const commonContext = {
|
||||
initWidget() {
|
||||
const $columnRight = $('.columns .column-right')
|
||||
const $columnRightShadow = $('.columns .column-right-shadow')
|
||||
$('.widget.recent-comments .reply .link').html((i, html) => Utils.renderedEmojiHtml(html))
|
||||
// 实现将右边widget拷贝的左边
|
||||
if ($columnRight.length && $columnRightShadow.length && !$columnRightShadow[0].children.length) {
|
||||
for (const child of $columnRight[0].children) {
|
||||
@ -14,36 +13,6 @@ const commonContext = {
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 初始化悬浮操作按钮 */
|
||||
initActions() {
|
||||
const $bulletScreen = $('.actions>.bullet-screen')
|
||||
if (localStorage.getItem('stop-bullet-screen') === 'true') {
|
||||
$bulletScreen.addClass('stop-bullet-screen')
|
||||
}
|
||||
if ($('halo-comment[bullet-screen]').length !== 0) {
|
||||
$bulletScreen.removeClass('is-hidden-all')
|
||||
}
|
||||
const applyStopBulletScreen = (stopBulletScreenValue) => {
|
||||
$('halo-comment[bullet-screen]').each(function () {
|
||||
const shadowDom = this.shadowRoot.getElementById('halo-comment')
|
||||
if (stopBulletScreenValue) {
|
||||
$(shadowDom).attr('stop-bullet-screen', 'true')
|
||||
} else {
|
||||
$(shadowDom).removeAttr('stop-bullet-screen')
|
||||
}
|
||||
})
|
||||
if (stopBulletScreenValue) {
|
||||
$bulletScreen.addClass('stop-bullet-screen')
|
||||
} else {
|
||||
$bulletScreen.removeClass('stop-bullet-screen')
|
||||
}
|
||||
localStorage.setItem('stop-bullet-screen', stopBulletScreenValue)
|
||||
}
|
||||
$bulletScreen.on('click', () => {
|
||||
let stopBulletScreen = localStorage.getItem('stop-bullet-screen') || false
|
||||
applyStopBulletScreen(stopBulletScreen.toString() !== 'true')
|
||||
})
|
||||
},
|
||||
/* 初始化目录和公告模块 */
|
||||
initTocAndNotice() {
|
||||
const {pathname} = location
|
||||
@ -106,10 +75,6 @@ const commonContext = {
|
||||
} else {
|
||||
document.documentElement.classList.remove('night')
|
||||
}
|
||||
$('halo-comment').each(function () {
|
||||
const shadowDom = this.shadowRoot.getElementById('halo-comment')
|
||||
$(shadowDom)[`${isNightValue ? 'add' : 'remove'}Class`]('night')
|
||||
})
|
||||
localStorage.setItem('night', isNightValue)
|
||||
isNight = isNightValue
|
||||
}
|
||||
@ -201,17 +166,6 @@ const commonContext = {
|
||||
}
|
||||
document.addEventListener('scroll', handleScroll)
|
||||
},
|
||||
/* 搜索框弹窗 */
|
||||
searchDialog() {
|
||||
const $result = $('.navbar-search .result')
|
||||
$('.navbar-search .input').on('click', function (e) {
|
||||
e.stopPropagation()
|
||||
$result.addClass('active')
|
||||
})
|
||||
$(document).on('click', function () {
|
||||
$result.removeClass('active')
|
||||
})
|
||||
},
|
||||
/* 小屏幕伸缩侧边栏,包含导航或者目录 */
|
||||
drawerMobile() {
|
||||
$('.navbar-slideicon').on('click', function (e) {
|
||||
@ -257,30 +211,6 @@ const commonContext = {
|
||||
$('body, html').animate({scrollTop: 0}, 400)
|
||||
})
|
||||
},
|
||||
/* 小屏幕搜索框 */
|
||||
searchMobile() {
|
||||
$('.navbar-searchicon').on('click', function (e) {
|
||||
e.stopPropagation()
|
||||
/* 关闭侧边栏 */
|
||||
$('.navbar-slideout').removeClass('active')
|
||||
/* 处理开启关闭状态 */
|
||||
const $html = $('html')
|
||||
const $mask = $('.navbar-mask')
|
||||
const $above = $('.navbar-above')
|
||||
const $search_out = $('.navbar-searchout')
|
||||
if ($search_out.hasClass('active')) {
|
||||
$html.removeClass('disable-scroll')
|
||||
$mask.removeClass('active slideout')
|
||||
$search_out.removeClass('active')
|
||||
$above.removeClass('solid')
|
||||
} else {
|
||||
$html.addClass('disable-scroll')
|
||||
$mask.addClass('active')
|
||||
$above.addClass('solid')
|
||||
$search_out.addClass('active')
|
||||
}
|
||||
})
|
||||
},
|
||||
/* 点击遮罩层关闭 */
|
||||
maskClose() {
|
||||
$('.navbar-mask')
|
||||
|
@ -8,16 +8,8 @@ const createSerialNumber = () => {
|
||||
console.log(`sn = ${serialNumber}`)
|
||||
return serialNumber
|
||||
}
|
||||
|
||||
const $bulletScreen = $('.actions>.bullet-screen')
|
||||
// pjax请求时进行界面预处理
|
||||
const initPjax = () => {
|
||||
/* 重新加载悬浮导航按钮 */
|
||||
if ($('halo-comment[bullet-screen]').length === 0) {
|
||||
$bulletScreen.addClass('is-hidden-all')
|
||||
} else {
|
||||
$bulletScreen.removeClass('is-hidden-all')
|
||||
}
|
||||
}
|
||||
|
||||
const computeScrollTop = (target) => {
|
||||
@ -173,12 +165,8 @@ $(document).on('pjax:success', async function (event, data, status, xhr, options
|
||||
}
|
||||
console.log('全部处理完成')
|
||||
if (window.pjaxSerialNumber !== serialNumber) return
|
||||
/* 初始化日志界面 */
|
||||
window.journalPjax && window.journalPjax(serialNumber)
|
||||
/* 初始化文章界面 */
|
||||
window.postPjax && window.postPjax(serialNumber)
|
||||
/* 初始化相册界面 */
|
||||
window.photoPjax && window.photoPjax(serialNumber)
|
||||
/* 初始化轮播 */
|
||||
commonContext.initCarousel()
|
||||
/* 加载主动推送或统计脚本 */
|
||||
|
File diff suppressed because one or more lines are too long
113
src/js/utils.js
113
src/js/utils.js
@ -1,103 +1,3 @@
|
||||
class Emoji {
|
||||
constructor(name, fileName) {
|
||||
this.name = name
|
||||
this.fileName = fileName
|
||||
}
|
||||
}
|
||||
|
||||
const emojiData = [
|
||||
new Emoji('呵呵', 'hehe'),
|
||||
new Emoji('哈哈', 'haha'),
|
||||
new Emoji('吐舌', 'tushe'),
|
||||
new Emoji('啊', 'a'),
|
||||
new Emoji('酷', 'ku'),
|
||||
new Emoji('怒', 'nu'),
|
||||
new Emoji('开心', 'kaixin'),
|
||||
new Emoji('汗', 'han'),
|
||||
new Emoji('泪', 'lei'),
|
||||
new Emoji('黑线', 'heixian'),
|
||||
new Emoji('鄙视', 'bishi'),
|
||||
new Emoji('不高兴', 'bugaoxing'),
|
||||
new Emoji('真棒', 'zhenbang'),
|
||||
new Emoji('钱', 'qian'),
|
||||
new Emoji('疑问', 'yiwen'),
|
||||
new Emoji('阴险', 'yingxiang'),
|
||||
new Emoji('吐', 'tu'),
|
||||
new Emoji('咦', 'yi'),
|
||||
new Emoji('委屈', 'weiqu'),
|
||||
new Emoji('花心', 'huaxin'),
|
||||
new Emoji('呼~', 'hu'),
|
||||
new Emoji('笑眼', 'xiaoyan'),
|
||||
new Emoji('冷', 'len'),
|
||||
new Emoji('太开心', 'taikaixin'),
|
||||
new Emoji('滑稽', 'huaji'),
|
||||
new Emoji('勉强', 'mianqiang'),
|
||||
new Emoji('狂汗', 'kuanhan'),
|
||||
new Emoji('乖', 'guai'),
|
||||
new Emoji('睡觉', 'shuijiao'),
|
||||
new Emoji('惊哭', 'jingku'),
|
||||
new Emoji('生气', 'shengqi'),
|
||||
new Emoji('惊讶', 'jingya'),
|
||||
new Emoji('喷', 'pen'),
|
||||
new Emoji('突然兴奋', 'turanxingfen'),
|
||||
new Emoji('挖鼻', 'wabi'),
|
||||
new Emoji('摊手', 'tanshou'),
|
||||
new Emoji('捂嘴笑', 'wuzuixiao'),
|
||||
new Emoji('喝酒', 'hejiu'),
|
||||
new Emoji('犀利', 'xili'),
|
||||
new Emoji('懒得理', 'landeli'),
|
||||
new Emoji('炸药', 'zhayao'),
|
||||
new Emoji('吃瓜', 'chigua'),
|
||||
new Emoji('小乖', 'xiaoguai'),
|
||||
new Emoji('你懂的', 'nidongde'),
|
||||
new Emoji('嘿嘿嘿', 'heiheihei'),
|
||||
new Emoji('欢呼', 'huanhu'),
|
||||
new Emoji('笑尿', 'xiaoniao'),
|
||||
new Emoji('酸爽', 'suanshuang'),
|
||||
new Emoji('紧张', 'jinzhang'),
|
||||
new Emoji('暗中观察', 'anzhongguancha'),
|
||||
new Emoji('小红脸', 'xiaohonglian'),
|
||||
new Emoji('呀咩爹', 'yamiedie'),
|
||||
new Emoji('微微一笑', 'weiweiyixiao'),
|
||||
new Emoji('what', 'what'),
|
||||
new Emoji('托腮', 'tuosai'),
|
||||
new Emoji('噗', 'pu'),
|
||||
new Emoji('困成狗', 'kunchenggou'),
|
||||
new Emoji('柯基暗中观察', 'kejianzhongguancha'),
|
||||
new Emoji('菜狗', 'caigou'),
|
||||
new Emoji('老虎', 'laohu'),
|
||||
new Emoji('嗷呜', 'aowu'),
|
||||
new Emoji('奥特曼', 'aoteman'),
|
||||
new Emoji('黑头高兴', 'heitougaoxing'),
|
||||
new Emoji('黑头瞪眼', 'heitoudengyan'),
|
||||
new Emoji('望远镜', 'wangyuanjing'),
|
||||
new Emoji('不听', 'butin'),
|
||||
new Emoji('干饭', 'ganfan'),
|
||||
new Emoji('大拇指', 'damuzhi'),
|
||||
new Emoji('胜利', 'shengli'),
|
||||
new Emoji('haha', 'haha2'),
|
||||
new Emoji('OK', 'ok'),
|
||||
new Emoji('红领巾', 'honglingjin'),
|
||||
new Emoji('爱心', 'aixin'),
|
||||
new Emoji('心碎', 'xinsui'),
|
||||
new Emoji('玫瑰', 'meigui'),
|
||||
new Emoji('礼物', 'liwu'),
|
||||
new Emoji('烟花', 'yanhua'),
|
||||
new Emoji('彩虹', 'caihong'),
|
||||
new Emoji('太阳', 'taiyang'),
|
||||
new Emoji('星星月亮', 'xingxingyueliang'),
|
||||
new Emoji('蛋糕', 'dangao'),
|
||||
new Emoji('茶杯', 'chabei'),
|
||||
new Emoji('香蕉', 'xiangjiao'),
|
||||
new Emoji('便便', 'bianbian'),
|
||||
new Emoji('药丸', 'yaowan'),
|
||||
new Emoji('钱币', 'qianbi'),
|
||||
new Emoji('蜡烛', 'lazhu'),
|
||||
new Emoji('沙发', 'shafa'),
|
||||
new Emoji('音乐', 'yinyue'),
|
||||
new Emoji('灯泡', 'dengpao'),
|
||||
new Emoji('手纸', 'shouzhi')
|
||||
]
|
||||
const Utils = {
|
||||
/**
|
||||
* 是否移动设备
|
||||
@ -365,19 +265,6 @@ const Utils = {
|
||||
}
|
||||
requestId = window.requestAnimationFrame(step)
|
||||
},
|
||||
/**
|
||||
* 表情替换
|
||||
* @param html
|
||||
* @returns {*}
|
||||
*/
|
||||
renderedEmojiHtml(html) {
|
||||
for (let emoji of emojiData) {
|
||||
let name = emoji.name
|
||||
let img = `<img class="dream-emoji" src="/themes/dream/source/lib/halo-comment@1.1.2/assets/emoji/${emoji.fileName}.png" alt="${name}"/>`
|
||||
html = html.replace(new RegExp(`\\[/${name}\\]`, 'gm'), img)
|
||||
}
|
||||
return html
|
||||
}
|
||||
}
|
||||
|
||||
window.Utils = Utils
|
||||
|
@ -1,40 +1,36 @@
|
||||
<#include "templates/layout_pjax.ftl">
|
||||
<@layout title="归档 - ${blog_title!}" canonical="${archives_url!}">
|
||||
<#if (archives)?? && archives?size gt 0>
|
||||
<#list archives as archive>
|
||||
<div class="card card-content">
|
||||
<div class="timeline-title">${archive.year?c}</div>
|
||||
<div class="timeline">
|
||||
<#list archive.posts as post>
|
||||
<article class="media">
|
||||
<#if post.thumbnail?? && post.thumbnail!=''>
|
||||
<a href="${post.fullPath}" class="media-left">
|
||||
<img class="not-gallery" src="${post.thumbnail!}" alt="${post.title!}">
|
||||
</a>
|
||||
</#if>
|
||||
<div class="media-content">
|
||||
<time datetime="${post.createTime!}">${post.createTime?string('yyyy-MM-dd')}</time>
|
||||
<a href="${post.fullPath!}" class="title has-link-grey">${post.title!}</a>
|
||||
<#if post.categories?? && post.categories?size gt 0>
|
||||
<p>
|
||||
<#list post.categories as category>
|
||||
<a class="has-link-grey"
|
||||
href="${category.fullPath!}">${category.name!}</a>
|
||||
</#list>
|
||||
</p>
|
||||
</#if>
|
||||
</div>
|
||||
</article>
|
||||
</#list>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
<#include "templates/main/pagination.ftl">
|
||||
<@pagination method="archives" datas=posts display="${settings.page_number!5}" />
|
||||
<#else>
|
||||
<div class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有发表过文章,回<a href="${context!}">主页</a>看看吧
|
||||
<!DOCTYPE html>
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = ${'归档 - ' + site.title},
|
||||
canonical = @{/archives}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(archives)}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有发表过文章,回<a th:href="${site.url}">主页</a>看看吧
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<div th:each="archive : ${archives.items}" class="card card-content">
|
||||
<div class="timeline-title" th:text="${archive.year}"></div>
|
||||
<div class="timeline">
|
||||
<th:block th:each="months : ${archive.months}">
|
||||
<article th:each="post : ${months.posts}" class="media">
|
||||
<a th:if="${!#strings.isEmpty(post.spec.cover)}" th:href="${post.status.permalink}" class="media-left">
|
||||
<img class="not-gallery" th:src="${post.spec.cover}" th:alt="${post.spec.title}">
|
||||
</a>
|
||||
<div class="media-content">
|
||||
<time th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></time>
|
||||
<a th:href="${post.status.permalink}" class="title has-link-grey" th:text="${post.spec.title}"></a>
|
||||
<p th:if="${!#lists.isEmpty(post.categories)}">
|
||||
<a class="has-link-grey"
|
||||
th:each="cy : ${post.categories}"
|
||||
th:href="${cy.status.permalink}"
|
||||
th:text="${cy.spec.displayName}"></a>
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
</th:block>
|
||||
</div>
|
||||
</#if>
|
||||
</@layout>
|
||||
</div>
|
||||
<th:block th:replace="~{main/pagination :: pagination (${archives}, '/archives')}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
2
templates/assets/css/style.min.css
vendored
2
templates/assets/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
2
templates/assets/js/common.min.js
vendored
2
templates/assets/js/common.min.js
vendored
File diff suppressed because one or more lines are too long
2
templates/assets/js/pjax.min.js
vendored
2
templates/assets/js/pjax.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{const r=new Set($('link[href*=".css"]').map((o,e)=>$(e).attr("href")).get()),c=new Set($('script[src*=".js"]').map((o,e)=>$(e).attr("src")).get()),e=()=>{var o=(new Date).getTime();return window.pjaxSerialNumber=o,console.log("sn = "+o),o},o=$(".actions>.bullet-screen"),i=()=>{0===$("halo-comment[bullet-screen]").length?o.addClass("is-hidden-all"):o.removeClass("is-hidden-all")},m=(e,n,t)=>{if(n>=e.length)t&&t();else{let o=$(e[n]).attr("src");c.has(o)?m(e,n+1,t):(console.log((t?"同步":"异步")+"顺序加载js "+o),Utils.cachedScript(o).done(function(){console.log((t?"同步":"异步")+"顺序加载js完成 "+o),c.add(o),window.DProgress&&DProgress.inc(),m(e,n+1,t)}).fail(function(){console.log((t?"同步":"异步")+"顺序加载js失败 "+o),m(e,n+1,t)}))}};$(document).on("click","a[target!=_blank][href]:not(data-not-pjax)",o=>{$.pjax.click(o,".column-main",{scrollTo:"/"!==o.currentTarget.pathname&&0!==$(".banner").length?window.innerHeight/4:0,fragment:".column-main",serialNumber:e(),timeout:8e3})}),$(document).on("submit","form[data-pjax]",function(o){$.pjax.submit(o,".column-main",{scrollTo:0,fragment:".column-main",serialNumber:e(),timeout:8e3})}),$(document).on("pjax:click",function(o,e){console.log("------------------------"),console.log("pjax:click sn = "+e.serialNumber)}),$(document).on("pjax:beforeSend",function(o,e,n){console.log("pjax:beforeSend sn = "+n.serialNumber),$("html").addClass("pjax-loading")}),$(document).on("pjax:start",function(o,e,n){console.log("pjax:start sn = "+n.serialNumber),window.DProgress&&DProgress.start(),$(".pjax-close").remove()}),$(document).on("pjax:send",function(o,e,n){console.log("pjax:send sn = "+n.serialNumber)}),$(document).on("pjax:clicked",function(o,e){console.log("pjax:clicked sn = "+e.serialNumber)}),$(document).on("pjax:beforeReplace",function(o,e,n){console.log("pjax:beforeReplace sn = "+n.serialNumber),$(".navbar-nav .current,.panel-side-menu .current").removeClass("current"),commonContext.initNavbar(),0<$("html.disable-scroll").length&&$(".navbar-mask").trigger("click")}),$(document).on("pjax:success",async function(o,e,n,t,a){a=a.serialNumber;if(console.log("pjax:success sn = "+a),window.pjaxSerialNumber===a){commonContext.initGallery(),commonContext.initTocAndNotice(),i(),$("html").removeClass("pjax-loading");const s=$($.parseHTML(e,document,!0)),l=$("head");l.find("meta").remove(),l.append(s.filter("meta")),s.filter("link[data-pjax]").each(function(){let o=$(this).attr("href");r.has(o)||(l.append($(this)),console.log("加载css "+$(this).attr("href")),this.onload=function(){r.add(o),window.DProgress&&DProgress.inc(),console.log("加载css完成 "+$(this).attr("href"))})});let o=s.filter("script[data-pjax]");if(0<o.length){o.filter("[async]").each(function(){let o=$(this).attr("src");c.has(o)||(console.log("异步无序加载js "+o),Utils.cachedScript(o).done(function(){console.log("异步无序js完成 "+o),window.DProgress&&DProgress.inc(),c.add(o)}).fail(function(){console.log("异步无序js失败 "+o)}))}),new Promise(()=>{m(o.filter("[defer]"),0)});let e=o.filter(":not([async]):not([defer])");0<e.length&&await new Promise(o=>{m(e,0,o)})}console.log("全部处理完成"),window.pjaxSerialNumber===a&&(window.journalPjax&&window.journalPjax(a),window.postPjax&&window.postPjax(a),window.photoPjax&&window.photoPjax(a),commonContext.initCarousel(),commonContext.loadMaintain(),window.DProgress)&&DProgress.done()}}),$(document).on("pjax:timeout",function(o,e,n){console.log("pjax:timeout sn = "+n.serialNumber)}),$(document).on("pjax:error",function(o,e,n,t,a){console.log(`pjax:error sn = ${a.serialNumber} error `+t)}),$(document).on("pjax:complete",function(o,e,n,t){console.log("pjax:complete sn = "+t.serialNumber)}),$(document).on("pjax:end",function(o,e,n){console.log("pjax:end sn = "+n.serialNumber),null==e&&(commonContext.initTocAndNotice(),i(),commonContext.initCarousel(),window.DProgress&&DProgress.done(),$("html").removeClass("pjax-loading"))}),$(document).on("pjax:popstate",function(){console.log("pjax:popstate")})})();
|
||||
(()=>{const l=new Set($('link[href*=".css"]').map((o,e)=>$(e).attr("href")).get()),c=new Set($('script[src*=".js"]').map((o,e)=>$(e).attr("src")).get()),e=()=>{var o=(new Date).getTime();return window.pjaxSerialNumber=o,console.log("sn = "+o),o},i=(e,n,t)=>{if(n>=e.length)t&&t();else{let o=$(e[n]).attr("src");c.has(o)?i(e,n+1,t):(console.log((t?"同步":"异步")+"顺序加载js "+o),Utils.cachedScript(o).done(function(){console.log((t?"同步":"异步")+"顺序加载js完成 "+o),c.add(o),window.DProgress&&DProgress.inc(),i(e,n+1,t)}).fail(function(){console.log((t?"同步":"异步")+"顺序加载js失败 "+o),i(e,n+1,t)}))}};$(document).on("click","a[target!=_blank][href]:not(data-not-pjax)",o=>{$.pjax.click(o,".column-main",{scrollTo:"/"!==o.currentTarget.pathname&&0!==$(".banner").length?window.innerHeight/4:0,fragment:".column-main",serialNumber:e(),timeout:8e3})}),$(document).on("submit","form[data-pjax]",function(o){$.pjax.submit(o,".column-main",{scrollTo:0,fragment:".column-main",serialNumber:e(),timeout:8e3})}),$(document).on("pjax:click",function(o,e){console.log("------------------------"),console.log("pjax:click sn = "+e.serialNumber)}),$(document).on("pjax:beforeSend",function(o,e,n){console.log("pjax:beforeSend sn = "+n.serialNumber),$("html").addClass("pjax-loading")}),$(document).on("pjax:start",function(o,e,n){console.log("pjax:start sn = "+n.serialNumber),window.DProgress&&DProgress.start(),$(".pjax-close").remove()}),$(document).on("pjax:send",function(o,e,n){console.log("pjax:send sn = "+n.serialNumber)}),$(document).on("pjax:clicked",function(o,e){console.log("pjax:clicked sn = "+e.serialNumber)}),$(document).on("pjax:beforeReplace",function(o,e,n){console.log("pjax:beforeReplace sn = "+n.serialNumber),$(".navbar-nav .current,.panel-side-menu .current").removeClass("current"),commonContext.initNavbar(),0<$("html.disable-scroll").length&&$(".navbar-mask").trigger("click")}),$(document).on("pjax:success",async function(o,e,n,t,s){s=s.serialNumber;if(console.log("pjax:success sn = "+s),window.pjaxSerialNumber===s){commonContext.initGallery(),commonContext.initTocAndNotice(),$("html").removeClass("pjax-loading");const a=$($.parseHTML(e,document,!0)),r=$("head");r.find("meta").remove(),r.append(a.filter("meta")),a.filter("link[data-pjax]").each(function(){let o=$(this).attr("href");l.has(o)||(r.append($(this)),console.log("加载css "+$(this).attr("href")),this.onload=function(){l.add(o),window.DProgress&&DProgress.inc(),console.log("加载css完成 "+$(this).attr("href"))})});let o=a.filter("script[data-pjax]");if(0<o.length){o.filter("[async]").each(function(){let o=$(this).attr("src");c.has(o)||(console.log("异步无序加载js "+o),Utils.cachedScript(o).done(function(){console.log("异步无序js完成 "+o),window.DProgress&&DProgress.inc(),c.add(o)}).fail(function(){console.log("异步无序js失败 "+o)}))}),new Promise(()=>{i(o.filter("[defer]"),0)});let e=o.filter(":not([async]):not([defer])");0<e.length&&await new Promise(o=>{i(e,0,o)})}console.log("全部处理完成"),window.pjaxSerialNumber===s&&(window.postPjax&&window.postPjax(s),commonContext.initCarousel(),commonContext.loadMaintain(),window.DProgress)&&DProgress.done()}}),$(document).on("pjax:timeout",function(o,e,n){console.log("pjax:timeout sn = "+n.serialNumber)}),$(document).on("pjax:error",function(o,e,n,t,s){console.log(`pjax:error sn = ${s.serialNumber} error `+t)}),$(document).on("pjax:complete",function(o,e,n,t){console.log("pjax:complete sn = "+t.serialNumber)}),$(document).on("pjax:end",function(o,e,n){console.log("pjax:end sn = "+n.serialNumber),null==e&&(commonContext.initTocAndNotice(),commonContext.initCarousel(),window.DProgress&&DProgress.done(),$("html").removeClass("pjax-loading"))}),$(document).on("pjax:popstate",function(){console.log("pjax:popstate")})})();
|
1
templates/assets/js/settings.min.js
vendored
1
templates/assets/js/settings.min.js
vendored
File diff suppressed because one or more lines are too long
2
templates/assets/js/utils.min.js
vendored
2
templates/assets/js/utils.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,39 +1,31 @@
|
||||
<#include "templates/layout_pjax.ftl">
|
||||
<#macro categoriesTree categories>
|
||||
<#list categories as category>
|
||||
<li>
|
||||
<a class="level is-marginless" href="${category.fullPath!}">
|
||||
<span class="level-item">${category.name}</span>
|
||||
<span class="level-item tag">${postCounts[category.id?c]!}</span>
|
||||
</a>
|
||||
<#if category.children?? && category.children?size gt 0>
|
||||
<ul>
|
||||
<@categoriesTree category.children/>
|
||||
</ul>
|
||||
</#if>
|
||||
</li>
|
||||
</#list>
|
||||
</#macro>
|
||||
<@layout title="分类 - ${blog_title!}" canonical="${categories_url!}">
|
||||
<#assign postCounts = {}>
|
||||
<@categoryTag method="list">
|
||||
<#list categories as category>
|
||||
<#assign postCounts += {category.id: category.postCount}>
|
||||
</#list>
|
||||
</@categoryTag>
|
||||
<@categoryTag method="tree">
|
||||
<#if categories?? && categories?size gt 0>
|
||||
<div class="card card-content">
|
||||
<div class="card-tab"><div>文章分类</div></div>
|
||||
<ul class="menu-list">
|
||||
<@categoriesTree categories/>
|
||||
</ul>
|
||||
</div>
|
||||
<#else>
|
||||
<div class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有创建过分类,回<a href="${context!}">主页</a>看看吧
|
||||
</div>
|
||||
</#if>
|
||||
</@categoryTag>
|
||||
</@layout>
|
||||
<!DOCTYPE html>
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = '分类 - ' + ${site.title}, canonical = @{/categories}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(categories)}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有创建过分类,回<a th:href="${site.url}">主页</a>看看吧
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<div class="card card-content">
|
||||
<div class="card-tab">
|
||||
<div>文章分类</div>
|
||||
</div>
|
||||
<ul class="menu-list">
|
||||
<th:block th:replace="~{:: categories (${categories})}"/>
|
||||
</ul>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:fragment="categories (categories)">
|
||||
<li th:each="category : ${categories}">
|
||||
<a class="level is-marginless" th:href="${category.status.permalink}">
|
||||
<span class="level-item" th:text="${category.spec.displayName}"></span>
|
||||
<span class="level-item tag" th:text="${category.status.postCount}"></span>
|
||||
</a>
|
||||
<ul th:if="${!#lists.isEmpty(category.children)}">
|
||||
<th:block th:replace="~{:: categories (category.children)}"/>
|
||||
</ul>
|
||||
</li>
|
||||
</th:block>
|
||||
</th:block>
|
@ -1,21 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:include="~{common/layout :: layout (title = ${'分类:' + category.spec.displayName + ' - ' +site.title},
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = ${'分类:' + category.spec.displayName + ' - ' +site.title},
|
||||
canonical = ${category.status.permalink}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
该分类下没有文章,回<a th:href="${site.url}">主页</a>看看吧
|
||||
<i class="fa fa-inbox"></i>
|
||||
该分类下没有文章,回<a th:href="${site.url}">主页</a>看看吧
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<div class="card card-content main-title">
|
||||
<ul class="breadcrumb">
|
||||
<li><a th:href="@{/categories}"><i class="fa fa-th-large"></i>分类</a></li>
|
||||
<li th:text="${category.spec.displayName}"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<th:block th:replace="~{main/article_list :: articleList (${posts.items}, false)}"/>
|
||||
<th:block th:replace="~{main/pagination :: pagination (${posts}, ${category.status.permalink})}"/>
|
||||
<div class="card card-content main-title">
|
||||
<ul class="breadcrumb">
|
||||
<li><a th:href="@{/categories}"><i class="fa fa-th-large"></i>分类</a></li>
|
||||
<li th:text="${category.spec.displayName}"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<th:block th:replace="~{main/article_list :: articleList (${posts.items}, false)}"/>
|
||||
<th:block th:replace="~{main/pagination :: pagination (${posts}, ${category.status.permalink})}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</html>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<head xmlns:th="https://www.thymeleaf.org" th:fragment="head"
|
||||
th:with="description=${isPost ? post != null ? post.spec.excerpt.raw : singlePage.spec.excerpt.raw : site.seo.description}">
|
||||
<title th:text="${title}"></title>
|
||||
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
|
||||
<script th:if="${(theme.config.enhance.enable_sw != 'false')}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js') + '?mew=0.0.1' : '/sw.min.js?mew=0.0.1' + theme.config.enhance.enable_sw}"></script>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html xmlns:th="https://www.thymeleaf.org"
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="layout (title, canonical, content, isPost)">
|
||||
<th:block th:if="${!#strings.equals('',param._pjax)}">
|
||||
<th:block th:replace="~{common/head :: head}"/>
|
||||
@ -9,7 +9,9 @@
|
||||
<th:block th:replace="~{common/scripts}"/>
|
||||
</body>
|
||||
</th:block>
|
||||
<th:block th:unless="${!#strings.equals('',param._pjax)}">
|
||||
<th:block th:unless="${!#strings.equals('',param._pjax)}"
|
||||
th:with="stats = ${siteStatsFinder.getStats()},
|
||||
contributor = ${contributorFinder.getContributor(theme.config.sidebar.metadata_name)}">
|
||||
<th:block th:replace="~{common/head :: head}"/>
|
||||
<body>
|
||||
<th:block th:replace="~{common/navbar}"/>
|
||||
@ -20,12 +22,14 @@
|
||||
<div th:class="${theme.config.basic_style.sidebar_column != 'all' ? 'container two-column' : 'container' }">
|
||||
<div class="columns">
|
||||
<div class="column column-main">
|
||||
<th:block th:insert="${content}"/>
|
||||
<th:block th:replace="${content}"/>
|
||||
</div>
|
||||
<th:block th:if="${theme.config.basic_style.sidebar_column!='only-right' && theme.config.basic_style.sidebar_column!='module-left'}">
|
||||
<th:block
|
||||
th:if="${theme.config.basic_style.sidebar_column!='only-right' && theme.config.basic_style.sidebar_column!='module-left'}">
|
||||
<th:block th:replace="~{common/widget :: widget('left')}"/>
|
||||
</th:block>
|
||||
<th:block th:if="${theme.config.basic_style.sidebar_column!='only-left' && theme.config.basic_style.sidebar_column!='module-right'}">
|
||||
<th:block
|
||||
th:if="${theme.config.basic_style.sidebar_column!='only-left' && theme.config.basic_style.sidebar_column!='module-right'}">
|
||||
<th:block th:replace="~{common/widget :: widget('right')}"/>
|
||||
</th:block>
|
||||
</div>
|
||||
|
@ -59,120 +59,91 @@
|
||||
</div>
|
||||
</th:block>
|
||||
</nav>
|
||||
|
||||
<!-- <form data-pjax class="navbar-search" method="get" action="/search">-->
|
||||
<!-- <input maxlength="16" autocomplete="off" placeholder="搜索内容..." name="keyword" value class="input" type="text">-->
|
||||
<!-- <button type="submit" class="submit" aria-label="搜索按钮"><i class="fa fa-search"></i></button>-->
|
||||
<!-- <span class="icon"></span>-->
|
||||
<!-- <@postTag method="latest" top="5">-->
|
||||
<!-- <nav class="result">-->
|
||||
<!-- <#list posts as post>-->
|
||||
<!-- <a href="${post.fullPath!}" title="${post.title!}" class="item">-->
|
||||
<!-- <span class="sort">${post_index+1}</span>-->
|
||||
<!-- <span class="text">${post.title!}</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </nav>-->
|
||||
<!-- </@postTag>-->
|
||||
<!-- </form>-->
|
||||
<i th:if="${pluginFinder.available('PluginSearchWidget')}" class="fa fa-search navbar-searchicon" href="javascript:SearchWidget.open();"></i>
|
||||
<i th:if="${pluginFinder.available('PluginSearchWidget')}" class="fa fa-search navbar-searchicon" onclick="javascript:SearchWidget.open();"><span>搜索</span></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <#-- mobile菜单 –>-->
|
||||
<!-- <div class="navbar-slideout">-->
|
||||
<!-- <div class="navbar-slideout-wrap">-->
|
||||
<!-- <div class="navbar-slideout-author">-->
|
||||
<!-- <img width="50" height="50" src="${user.avatar!}" class="avatar" alt="${user.nickname!}"/>-->
|
||||
<!-- <div class="info">-->
|
||||
<!-- <a class="link" target="_blank" rel="noopener noreferrer nofollow">${user.nickname!}</a>-->
|
||||
<!-- <p class="motto">${user.description!'一句话介绍自己吧!'}</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul class="navbar-slideout-menu">-->
|
||||
<!-- <li class="item">-->
|
||||
<!-- <i class="fa fa-pencil-square-o"></i>-->
|
||||
<!-- <@postTag method="count"><span>累计撰写 <strong>${count!"0"}</strong> 篇文章</span></@postTag>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="item">-->
|
||||
<!-- <i class="fa fa-tags"></i>-->
|
||||
<!-- <@tagTag method="count"><span>累计创建 <strong>${count!"0"}</strong> 个标签</span></@tagTag>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="item">-->
|
||||
<!-- <i class="fa fa-commenting-o"></i>-->
|
||||
<!-- <@commentTag method="count"><span>累计收到 <strong>${count!"0"}</strong> 条评论</span></@commentTag>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- <ul class="navbar-slideout-menu not-toc">-->
|
||||
<!-- <li>-->
|
||||
<!-- <a class="link panel" href="#" rel="nofollow">-->
|
||||
<!-- <span>导航</span>-->
|
||||
<!-- <i class="fa fa-angle-right"></i>-->
|
||||
<!-- </a>-->
|
||||
<!-- <ul class="slides panel-body panel-side-menu">-->
|
||||
<!-- <@menuTag method="tree">-->
|
||||
<!-- <#list menus?sort_by('priority') as menu>-->
|
||||
<!-- <#if menu.children?? && menu.children?size gt 0>-->
|
||||
<!-- <#if menu.name?default('')?starts_with('#hide') != true>-->
|
||||
<!-- <li>-->
|
||||
<!-- <div class="link panel">-->
|
||||
<!-- <a href="${menu.url!}" title="${menu.name!}">${menu.name!}</a>-->
|
||||
<!-- <i class="fa fa-angle-right"></i>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul class="slides panel-body">-->
|
||||
<!-- <#if menu.children?? && menu.children?size gt 0>-->
|
||||
<!-- <#list menu.children?sort_by('priority') as child>-->
|
||||
<!-- <#if child.children?? && child.children?size gt 0>-->
|
||||
<!-- <#if child.name?default('')?starts_with('#hide') != true>-->
|
||||
<!-- <li>-->
|
||||
<!-- <div class="link panel">-->
|
||||
<!-- <a href="${child.url!}" title="${child.name!}">${child.name!}</a>-->
|
||||
<!-- <i class="fa fa-angle-right"></i>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul class="slides panel-body">-->
|
||||
<!-- <#list child.children?sort_by('priority') as child1>-->
|
||||
<!-- <#if child1.name?default('')?starts_with('#hide') != true>-->
|
||||
<!-- <li>-->
|
||||
<!-- <a class="link" href="${child1.url!}" title="${child1.name!}">${child1.name!}</a>-->
|
||||
<!-- </li>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </li>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#else>-->
|
||||
<!-- <#if child.name?default('')?starts_with('#hide') != true>-->
|
||||
<!-- <li>-->
|
||||
<!-- <a class="link" href="${child.url!}" title="${child.name!}">${child.name!}</a>-->
|
||||
<!-- </li>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </li>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#else>-->
|
||||
<!-- <#if menu.name?default('')?starts_with('#hide') != true>-->
|
||||
<!-- <li>-->
|
||||
<!-- <a class="link" href="${menu.url!}" title="${menu.name!}">${menu.name!}</a>-->
|
||||
<!-- </li>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </@menuTag>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- <#if settings.drawer_toc!true>-->
|
||||
<!-- <ul class="navbar-slideout-menu is-toc">-->
|
||||
<!-- <a class="link in" href="#" rel="nofollow"><span>目录</span></a>-->
|
||||
<!-- <div class="toc-content">-->
|
||||
<!-- </div>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<#-- mobile菜单 -->
|
||||
<div class="navbar-slideout">
|
||||
<div class="navbar-slideout-wrap">
|
||||
<div class="navbar-slideout-author">
|
||||
<img width="50" height="50" th:src="${contributor.avatar}" th:alt="${contributor.displayName}" class="avatar"/>
|
||||
<div class="info">
|
||||
<a class="link" target="_blank" rel="noopener noreferrer nofollow" th:text="${contributor.displayName}"></a>
|
||||
<p class="motto" th:text="${contributor.bio}"></p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="navbar-slideout-menu">
|
||||
<li class="item">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<span>累计撰写 <strong th:text="${stats.post}"></strong> 篇文章</span>
|
||||
</li>
|
||||
<li class="item">
|
||||
<i class="fa fa-tags"></i>
|
||||
<span>累计创建 <strong th:text="${stats.category}"></strong> 个分类</span>
|
||||
</li>
|
||||
<li class="item">
|
||||
<i class="fa fa-commenting-o"></i>
|
||||
<span>累计收到 <strong th:text="${stats.comment}"></strong> 条评论</span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-slideout-menu not-toc">
|
||||
<li>
|
||||
<a class="link panel" href="#" rel="nofollow">
|
||||
<span>导航</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
<ul class="slides panel-body panel-side-menu">
|
||||
<li th:each="menuItem : ${menuFinder.getPrimary().menuItems}">
|
||||
<a class="link"
|
||||
th:if="${#lists.isEmpty(menuItem.children)}"
|
||||
th:href="${menuItem.status.href}"
|
||||
th:title="${menuItem.status.displayName}"
|
||||
th:text="${menuItem.status.displayName}"></a>
|
||||
<th:block th:unless="${#lists.isEmpty(menuItem.children)}">
|
||||
<div class="link panel">
|
||||
<a th:href="${menuItem.status.href}"
|
||||
th:title="${menuItem.status.displayName}"
|
||||
th:text="${menuItem.status.displayName}"></a>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</div>
|
||||
<ul class="slides panel-body">
|
||||
<li th:each="dropdown : ${menuItem.children}">
|
||||
<a class="link"
|
||||
th:if="${#lists.isEmpty(dropdown.children)}"
|
||||
th:href="${dropdown.status.href}"
|
||||
th:title="${dropdown.status.displayName}"
|
||||
th:text="${dropdown.status.displayName}"></a>
|
||||
<th:block th:unless="${#lists.isEmpty(dropdown.children)}">
|
||||
<div class="link panel">
|
||||
<a th:href="${dropdown.status.href}"
|
||||
th:title="${dropdown.status.displayName}"
|
||||
th:text="${dropdown.status.displayName}"></a>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</div>
|
||||
<ul class="slides panel-body">
|
||||
<li th:each="dropdownChild : ${dropdown.children}">
|
||||
<a class="link"
|
||||
th:href="${dropdownChild.status.href}"
|
||||
th:title="${dropdownChild.status.displayName}"
|
||||
th:text="${dropdownChild.status.displayName}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</th:block>
|
||||
</li>
|
||||
</ul>
|
||||
</th:block>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul th:if="${theme.config.basic_style.drawer_toc}" class="navbar-slideout-menu is-toc">
|
||||
<a class="link in" href="#" rel="nofollow"><span>目录</span></a>
|
||||
<div class="toc-content">
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar-mask"></div>
|
||||
</header>
|
@ -1,5 +1,6 @@
|
||||
<th:block xmlns:th="https://www.thymeleaf.org">
|
||||
<script th:src="@{/assets/js/utils.min.js(mew=${theme.spec.version})}"></script>
|
||||
<script th:src="@{/assets/js/btoc.min.js(mew=${theme.spec.version})}"></script>
|
||||
<!--<#if is_carousel??>-->
|
||||
<!-- <script data-pjax th:src="@{/assets/lib/swiper@8.4.6/swiper-bundle.min.js}"></script>-->
|
||||
<!--</#if>-->
|
||||
|
@ -1,14 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:include="~{common/layout :: layout (title = ${site.title}, canonical = ${site.url}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有发表过文章
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<th:block th:replace="~{main/article_list :: articleList (${posts.items}, ${posts.first})}"/>
|
||||
<th:block th:replace="~{main/pagination :: pagination (${posts}, '/index')}"/>
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = ${site.title}, canonical = ${site.url}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有发表过文章
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<th:block th:replace="~{::firstIndex}"/>
|
||||
<th:block th:replace="~{main/article_list :: articleList (${posts.items}, ${posts.first})}"/>
|
||||
<th:block th:replace="~{main/pagination :: pagination (${posts}, '/index')}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
||||
<th:block th:if="${posts.first}" th:fragment="firstIndex">
|
||||
<th:block th:replace="~{::carousel}"/>
|
||||
<div th:if="${!#strings.isEmpty(theme.config.basic_info.index_inform)}" class="card tips brightness"
|
||||
th:text="${theme.config.basic_info.index_inform}"></div>
|
||||
</th:block>
|
||||
|
||||
<th:block th:fragment="carousel">
|
||||
</th:block>
|
||||
</th:block>
|
||||
</html>
|
||||
<!-- <#if is_first_index!false>-->
|
||||
<!-- <#local carousel_content>-->
|
||||
<!-- <#list posts as post>-->
|
||||
<!-- <#if post.topPriority!=1>-->
|
||||
<!-- <#break>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'>-->
|
||||
<!-- <#continue>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))>-->
|
||||
<!-- <#if thumbnail != ''>-->
|
||||
<!-- <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}">-->
|
||||
<!-- <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600">-->
|
||||
<!-- <p class="swiper-slide-details-title">${post.title!}</p>-->
|
||||
<!-- <ul class="breadcrumb">-->
|
||||
<!-- <li><@global.timeline datetime=post.createTime/></li>-->
|
||||
<!-- <li><i class="fa fa-eye"></i>${post.visits?c}</li>-->
|
||||
<!-- <#if !post.disallowComment!false>-->
|
||||
<!-- <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>-->
|
||||
<!-- <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>-->
|
||||
<!-- <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />-->
|
||||
<!-- <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />-->
|
||||
<!-- <li style="color: ${heatColor}">${heat}℃</li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </#local>-->
|
||||
<!-- <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'>-->
|
||||
<!-- <#if settings.module_links?? && settings.module_links?trim != ''>-->
|
||||
<!-- <#local module_links=settings.module_links?split('\n')>-->
|
||||
<!-- <#else>-->
|
||||
<!-- <#local module_links=[]>-->
|
||||
<!-- <#list 0..1 as i>-->
|
||||
<!-- <#local post=posts[i]>-->
|
||||
<!-- <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <div class="model model-index">-->
|
||||
<!-- <div class="card widget swiper">-->
|
||||
<!-- <div class="swiper-wrapper">${carousel_content}</div>-->
|
||||
<!-- <div class="swiper-pagination"></div>-->
|
||||
<!-- <div class="swiper-button-prev"></div>-->
|
||||
<!-- <div class="swiper-button-next"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="model model-index-side">-->
|
||||
<!-- <#list 0..1 as i>-->
|
||||
<!-- <#if i < module_links?size >-->
|
||||
<!-- <@model_build module_links[i]/>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <#if module_links?size > 2 && module_links?size<=6>-->
|
||||
<!-- <div class="model model-attach model-attach-${module_links?size-2}">-->
|
||||
<!-- <#list 2..5 as i>-->
|
||||
<!-- <#if i < module_links?size >-->
|
||||
<!-- <@model_build module_links[i]/>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </div>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#assign is_carousel=true />-->
|
||||
<!-- <#elseif carousel_content != ''>-->
|
||||
<!-- <div class="card widget swiper">-->
|
||||
<!-- <div class="swiper-wrapper">${carousel_content}</div>-->
|
||||
<!-- <div class="swiper-pagination"></div>-->
|
||||
<!-- <div class="swiper-button-prev"></div>-->
|
||||
<!-- <div class="swiper-button-next"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <#assign is_carousel=true />-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#if>-->
|
@ -7,9 +7,9 @@
|
||||
<span>打赏</span>
|
||||
<div class="donate-list">
|
||||
<ol>
|
||||
<li th:if="!#strings.isEmpty(theme.config.post.donate_alipay)"><img
|
||||
<li th:if="${!#strings.isEmpty(theme.config.post.donate_alipay)}"><img
|
||||
th:src="${theme.config.post.donate_alipay}" alt="支付宝捐赠"></li>
|
||||
<li th:if="!#strings.isEmpty(theme.config.post.donate_wechat)"><img
|
||||
<li th:if="${!#strings.isEmpty(theme.config.post.donate_wechat)}"><img
|
||||
th:src="${theme.config.post.donate_wechat}" alt="微信捐赠"></li>
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -128,8 +128,7 @@
|
||||
</div>
|
||||
</th:block>
|
||||
<th:block/>
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
|
||||
<!--<#elseif thumbnail_mode == "grid">-->
|
||||
<!--<div class="column-main-grid">-->
|
||||
<!-- <#list post_index..(posts?size-1) as i>-->
|
||||
@ -183,81 +182,5 @@
|
||||
<!-- <a class="card widget brightness ${(content!='')?then('bg-shadow', '')}" ${target} ${imageUrl} ${targetUrl}>${content}<div class="tag">${tag}</div></a>-->
|
||||
<!--</#macro>-->
|
||||
<!--<#macro article_list posts>-->
|
||||
<!-- <#if is_first_index!false>-->
|
||||
<!-- <#local carousel_content>-->
|
||||
<!-- <#list posts as post>-->
|
||||
<!-- <#if post.topPriority!=1>-->
|
||||
<!-- <#break>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'>-->
|
||||
<!-- <#continue>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))>-->
|
||||
<!-- <#if thumbnail != ''>-->
|
||||
<!-- <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}">-->
|
||||
<!-- <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600">-->
|
||||
<!-- <p class="swiper-slide-details-title">${post.title!}</p>-->
|
||||
<!-- <ul class="breadcrumb">-->
|
||||
<!-- <li><@global.timeline datetime=post.createTime/></li>-->
|
||||
<!-- <li><i class="fa fa-eye"></i>${post.visits?c}</li>-->
|
||||
<!-- <#if !post.disallowComment!false>-->
|
||||
<!-- <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>-->
|
||||
<!-- <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>-->
|
||||
<!-- <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />-->
|
||||
<!-- <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />-->
|
||||
<!-- <li style="color: ${heatColor}">${heat}℃</li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </#local>-->
|
||||
<!-- <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'>-->
|
||||
<!-- <#if settings.module_links?? && settings.module_links?trim != ''>-->
|
||||
<!-- <#local module_links=settings.module_links?split('\n')>-->
|
||||
<!-- <#else>-->
|
||||
<!-- <#local module_links=[]>-->
|
||||
<!-- <#list 0..1 as i>-->
|
||||
<!-- <#local post=posts[i]>-->
|
||||
<!-- <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <div class="model model-index">-->
|
||||
<!-- <div class="card widget swiper">-->
|
||||
<!-- <div class="swiper-wrapper">${carousel_content}</div>-->
|
||||
<!-- <div class="swiper-pagination"></div>-->
|
||||
<!-- <div class="swiper-button-prev"></div>-->
|
||||
<!-- <div class="swiper-button-next"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="model model-index-side">-->
|
||||
<!-- <#list 0..1 as i>-->
|
||||
<!-- <#if i < module_links?size >-->
|
||||
<!-- <@model_build module_links[i]/>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <#if module_links?size > 2 && module_links?size<=6>-->
|
||||
<!-- <div class="model model-attach model-attach-${module_links?size-2}">-->
|
||||
<!-- <#list 2..5 as i>-->
|
||||
<!-- <#if i < module_links?size >-->
|
||||
<!-- <@model_build module_links[i]/>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#list>-->
|
||||
<!-- </div>-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#assign is_carousel=true />-->
|
||||
<!-- <#elseif carousel_content != ''>-->
|
||||
<!-- <div class="card widget swiper">-->
|
||||
<!-- <div class="swiper-wrapper">${carousel_content}</div>-->
|
||||
<!-- <div class="swiper-pagination"></div>-->
|
||||
<!-- <div class="swiper-button-prev"></div>-->
|
||||
<!-- <div class="swiper-button-next"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <#assign is_carousel=true />-->
|
||||
<!-- </#if>-->
|
||||
<!-- <#if settings.index_inform?? && settings.index_inform != ''>-->
|
||||
<!-- <div class="card tips brightness">${settings.index_inform}</div>-->
|
||||
<!-- </#if>-->
|
||||
<!-- </#if>-->
|
||||
|
||||
<!--</#macro>-->
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:include="~{common/layout :: layout (title = ${singlePage.spec.title + ' - ' + site.title}, canonical = ${singlePage.status.permalink}, content = ~{main/article :: article (${singlePage}, 'SinglePage')}, isPost = true)}"
|
||||
th:with="enableKatex = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_katex'))? singlePage.metadata.annotations.get('enable_katex') : theme.config.post.enable_katex},
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = ${singlePage.spec.title + ' - ' + site.title}, canonical = ${singlePage.status.permalink}, content = ~{main/article :: article (${singlePage}, 'SinglePage')}, isPost = true)}"
|
||||
th:with="enableKatex = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_katex'))? singlePage.metadata.annotations.get('enable_katex') : theme.config.post.enable_katex},
|
||||
enableShare = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_share'))? singlePage.metadata.annotations.get('enable_share') : theme.config.post.enable_share},
|
||||
enableCopyright = ${!#strings.isEmpty(singlePage.metadata.annotations.get('enable_copyright'))? singlePage.metadata.annotations.get('enable_copyright') : theme.config.post.enable_copyright}">
|
||||
</html>
|
||||
</th:block>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:include="~{common/layout :: layout (title = ${post.spec.title + ' - ' + site.title}, canonical = ${post.status.permalink}, content = ~{main/article :: article (${post}, 'Post')}, isPost = true)}"
|
||||
th:with="enableKatex = ${!#strings.isEmpty(post.metadata.annotations.get('enable_katex'))? post.metadata.annotations.get('enable_katex') : theme.config.post.enable_katex},
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = ${post.spec.title + ' - ' + site.title}, canonical = ${post.status.permalink}, content = ~{main/article :: article (${post}, 'Post')}, isPost = true)}"
|
||||
th:with="enableKatex = ${!#strings.isEmpty(post.metadata.annotations.get('enable_katex'))? post.metadata.annotations.get('enable_katex') : theme.config.post.enable_katex},
|
||||
enableShare = ${!#strings.isEmpty(post.metadata.annotations.get('enable_share'))? post.metadata.annotations.get('enable_share') : theme.config.post.enable_share},
|
||||
enableCopyright = ${!#strings.isEmpty(post.metadata.annotations.get('enable_copyright'))? post.metadata.annotations.get('enable_copyright') : theme.config.post.enable_copyright}">
|
||||
</html>
|
||||
</th:block>
|
@ -1,21 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:include="~{common/layout :: layout (title = ${'标签:' + tag.spec.displayName + ' - ' +site.title},
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = ${'标签:' + tag.spec.displayName + ' - ' +site.title},
|
||||
canonical = ${tag.status.permalink}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
该标签下没有文章,回<a th:href="${site.url}">主页</a>看看吧
|
||||
<i class="fa fa-inbox"></i>
|
||||
该标签下没有文章,回<a th:href="${site.url}">主页</a>看看吧
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<div class="card card-content main-title">
|
||||
<ul class="breadcrumb">
|
||||
<li><a th:href="@{/tags}"><i class="fa fa-tags"></i>标签</a></li>
|
||||
<li th:text="${tag.spec.displayName}"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<th:block th:replace="~{main/article_list :: articleList (${posts.items}, false)}"/>
|
||||
<th:block th:replace="~{main/pagination :: pagination (${posts}, ${tag.status.permalink})}"/>
|
||||
<div class="card card-content main-title">
|
||||
<ul class="breadcrumb">
|
||||
<li><a th:href="@{/tags}"><i class="fa fa-tags"></i>标签</a></li>
|
||||
<li th:text="${tag.spec.displayName}"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<th:block th:replace="~{main/article_list :: articleList (${posts.items}, false)}"/>
|
||||
<th:block th:replace="~{main/pagination :: pagination (${posts}, ${tag.status.permalink})}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</html>
|
||||
</th:block>
|
||||
</th:block>
|
@ -1,25 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:include="~{common/layout :: layout (title = '标签 - ' + ${site.title}, canonical = @{/tags}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(tags)}, enableTagsColor = ${theme.config.page_config.enable_tags_tag_color}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有创建过标签,回<a th:href="${site.url}">主页</a>看看吧
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<div class="card card-content">
|
||||
<div class="card-tab">
|
||||
<div>文章标签</div>
|
||||
</div>
|
||||
<div class="tags-field">
|
||||
<a th:each="tag : ${tags}" class="tags" th:href="${tag.status.permalink}">
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = '标签 - ' + ${site.title}, canonical = @{/tags}, content = ~{::content}, isPost = false)}">
|
||||
<th:block th:fragment="content"
|
||||
th:with="isEmpty = ${#lists.isEmpty(tags)}, enableTagsColor = ${theme.config.page_config.enable_tags_tag_color}">
|
||||
<div th:if="${isEmpty}" class="card card-empty">
|
||||
<i class="fa fa-inbox"></i>
|
||||
还没有创建过标签,回<a th:href="${site.url}">主页</a>看看吧
|
||||
</div>
|
||||
<th:block th:unless="${isEmpty}">
|
||||
<div class="card card-content">
|
||||
<div class="card-tab">
|
||||
<div>文章标签</div>
|
||||
</div>
|
||||
<div class="tags-field">
|
||||
<a th:each="tag : ${tags}" class="tags" th:href="${tag.status.permalink}">
|
||||
<span class="tag" th:text="${tag.spec.displayName}"
|
||||
th:style="${enableTagsColor? 'color: ' + tag.spec.color +'; background: ' + tag.spec.color +'20' : ''}"></span>
|
||||
<span class="tag is-grey" th:text="${tag.postCount}"
|
||||
th:style="${enableTagsColor? 'background: ' + tag.spec.color +'CC' : ''}"></span>
|
||||
</a>
|
||||
<span class="tag is-grey" th:text="${tag.postCount}"
|
||||
th:style="${enableTagsColor? 'background: ' + tag.spec.color +'CC' : ''}"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</html>
|
||||
</th:block>
|
@ -1,47 +1,23 @@
|
||||
<#macro categoriesTree categories>
|
||||
<#list categories as category>
|
||||
<li>
|
||||
<a class="level is-marginless" href="${category.fullPath!}">
|
||||
<span class="level-item">${category.name}</span>
|
||||
<span class="level-item tag">${postCounts[category.id?c]!}</span>
|
||||
</a>
|
||||
<#assign num=num?number-1/>
|
||||
<#if num?number gt 0 && category.children?? && category.children?size gt 0>
|
||||
<ul>
|
||||
<@categoriesTree category.children/>
|
||||
</ul>
|
||||
</#if>
|
||||
</li>
|
||||
<#if num?number = 0>
|
||||
<#break>
|
||||
</#if>
|
||||
</#list>
|
||||
</#macro>
|
||||
<#assign num= settings.categories_num!10 />
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (hide)"
|
||||
th:class="'card widget ' + ${hide}">
|
||||
<#assign postCounts = {}>
|
||||
<@categoryTag method="list">
|
||||
<div class="card-title">
|
||||
<i class="fa fa-th-large card-title-label"></i><span>分类</span>
|
||||
<#if settings.categories_more?? && settings.categories_more== true && categories?size gt num?number>
|
||||
<a class="card-more" href="${categories_url!}">更多<i class="fa fa-angle-double-right"></i></a>
|
||||
</#if>
|
||||
</div>
|
||||
<#list categories as category>
|
||||
<#assign postCounts += {category.id: category.postCount}>
|
||||
</#list>
|
||||
</@categoryTag>
|
||||
<@categoryTag method="tree">
|
||||
<#if categories?? && categories?size gt 0>
|
||||
<div class="card-content">
|
||||
<ul class="menu-list">
|
||||
<@categoriesTree categories/>
|
||||
</ul>
|
||||
</div>
|
||||
<#else>
|
||||
<div class="card-empty">暂无分类</div>
|
||||
</#if>
|
||||
</@categoryTag>
|
||||
th:class="'card widget ' + ${hide}"
|
||||
th:with="num = ${#strings.isEmpty(theme.config.sidebar.categories_num)? 10 : T(java.lang.Integer).parseInt(theme.config.sidebar.categories_num)},
|
||||
categories = ${categoryFinder.list(1,num)},
|
||||
isEmpty = ${#lists.isEmpty(categories)}">
|
||||
<div class="card-title">
|
||||
<i class="fa fa-th-large card-title-label"></i><span>分类</span>
|
||||
<a th:if="${categories.hasNext}" class="card-more" th:href="@{/categories}">更多<i
|
||||
class="fa fa-angle-double-right"></i></a>
|
||||
</div>
|
||||
<div th:if="${isEmpty}" class="card-empty">暂无分类</div>
|
||||
<div th:unless="${isEmpty}" class="card-content">
|
||||
<ul class="menu-list">
|
||||
<li th:each="category : ${categories}">
|
||||
<a class="level is-marginless" th:href="${category.status.permalink}">
|
||||
<span class="level-item" th:text="${category.spec.displayName}"></span>
|
||||
<span class="level-item tag" th:text="${category.status.postCount}"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
@ -1,7 +1,6 @@
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (hide)"
|
||||
th:class="'card widget profile ' + ${hide}"
|
||||
th:with="stats = ${siteStatsFinder.getStats()}, contributor = ${contributorFinder.getContributor(theme.config.sidebar.metadata_name)}">
|
||||
th:class="'card widget profile ' + ${hide}">
|
||||
<div class="card-content">
|
||||
<nav class="level">
|
||||
<div class="level-item" style="flex-direction: column;">
|
||||
|
@ -1,32 +0,0 @@
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (hide)"
|
||||
th:class="'card widget recent-comments ' + ${hide}">
|
||||
<div class="card-title">
|
||||
<i class="fa fa-commenting-o card-title-label"></i><span>最新评论</span>
|
||||
</div>
|
||||
<@commentTag method="latest" top="${settings.recent_comments_num!5}">
|
||||
<#if comments.content?size gt 0>
|
||||
<div class="card-content">
|
||||
<ul class="widget-comment">
|
||||
<#list comments.content as comment>
|
||||
<li class="item">
|
||||
<div class="user">
|
||||
<img width="35" height="35" class="avatar" src="${(settings.priority_qq_avatar!false)?then(comment.avatar?replace('^.*(\\w{32}\\?)', 'https://cravatar.cn/avatar/$1', 'r'),comment.avatar!)}"
|
||||
alt="${comment.author!}">
|
||||
<div class="info">
|
||||
<div class="author">${comment.author!}</div>
|
||||
<span class="date">${comment.createTime?string("yyyy-MM-dd")}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply">
|
||||
<a class="link" href="${comment.post.fullPath!}#comment-wrapper">${comment.content!}</a>
|
||||
</div>
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</div>
|
||||
<#else>
|
||||
<div class="card-empty">暂无评论</div>
|
||||
</#if>
|
||||
</@commentTag>
|
||||
</div>
|
@ -1,7 +1,7 @@
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (hide)"
|
||||
th:class="'card widget recent-posts ' + ${hide}"
|
||||
th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : #numbers.sequence(theme.config.sidebar.recent_posts_num,theme.config.sidebar.recent_posts_num)[0]}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}">
|
||||
th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : T(java.lang.Integer).parseInt(theme.config.sidebar.recent_posts_num)}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<div class="card-title">
|
||||
<i class="fa fa-history card-title-label"></i><span>最新文章</span>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (hide)"
|
||||
th:class="'card widget tagcloud ' + ${hide}"
|
||||
th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 32 : #numbers.sequence(theme.config.sidebar.tags_num,theme.config.sidebar.tags_num)[0]},
|
||||
th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 32 : T(java.lang.Integer).parseInt(theme.config.sidebar.tags_num)},
|
||||
tags = ${tagFinder.list(1,num)},
|
||||
isEmpty = ${#lists.isEmpty(tags)},
|
||||
enableTagsColor = ${theme.config.sidebar.enable_tag_color}">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (hide)"
|
||||
th:class="'card widget tags ' + ${hide}"
|
||||
th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 18 : #numbers.sequence(theme.config.sidebar.tags_num,theme.config.sidebar.tags_num)[0]},
|
||||
th:with="num = ${#strings.isEmpty(theme.config.sidebar.tags_num)? 18 : T(java.lang.Integer).parseInt(theme.config.sidebar.tags_num)},
|
||||
tags = ${tagFinder.list(1,num)},
|
||||
isEmpty = ${#lists.isEmpty(tags)},
|
||||
enableTagsColor = ${theme.config.sidebar.enable_tag_color}">
|
||||
|
@ -6,5 +6,4 @@
|
||||
</div>
|
||||
<div class="card-content toc-content">
|
||||
</div>
|
||||
<script th:src="@{/assets/js/btoc.min.js(mew=${theme.spec.version})}"></script>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user