Merge remote-tracking branch 'upstream/main' into merge

This commit is contained in:
zhengyi 2023-12-15 16:54:13 +08:00
commit 9e0098984b
35 changed files with 608 additions and 286 deletions

View File

@ -32,12 +32,38 @@ spec:
label: 默认 label: 默认
- value: waline - value: waline
label: Waline label: Waline
- $formkit: text - $formkit: group
name: waline
if: "$get(comment_option).value === 'waline'" if: "$get(comment_option).value === 'waline'"
name: waline_serverURL label: Waline 设置
label: Waline 服务端地址 id: waline
value: "" children:
help: "Waline 服务端地址,如 https://waline-server.herokuapp.com 不要加结尾反斜杠" - $formkit: text
name: waline_serverURL
label: Waline 服务端地址
value: ""
help: "Waline 服务端地址,如 https://waline-server.herokuapp.com 不要加结尾反斜杠"
- $formkit: text
name: waline_css
label: Waline CSS地址
value: "https://unpkg.com/@waline/client@v2/dist/waline.css"
help: Waline 的主样式地址
- $formkit: text
name: waline_js_comment
label: 用于评论的 JS 地址
value: "https://unpkg.com/@waline/client@v2/dist/waline.mjs"
help: Waline 的评论 JS 地址
- $formkit: text
name: waline_js_leaving
label: 功能 JS
value: "https://cdn.jsdelivr.net/npm/@waline/client/dist/waline.mjs"
help: 用于加载留言板和最新评论的 JS 地址
- $formkit: text
name: waline_js_list
label: 列表 JS
value: "https://unpkg.com/@waline/client@v2/dist/comment.mjs"
help: 首页加载显示评论数的 JS 地址
- $formkit: radio - $formkit: radio
name: enable_source_link name: enable_source_link
id: enable_source_link id: enable_source_link
@ -604,15 +630,54 @@ spec:
- value: false - value: false
label: 关闭 label: 关闭
- $formkit: repeater - $formkit: repeater
if: "$get(enable_banner).value" if: "$get(enable_banner).value === true"
name: banner_source name: banner_data_group
label: 轮播图文章 label: 轮播图数据设置
value: [ ] id: banner_data_group
value: []
children: children:
- $formkit: radio
name: banner_section_type
id: banner_section_type
label: 模块类型
value:
options:
- label: 已有文章
value: post
- label: 自定义数据
value: custom
- $formkit: postSelect - $formkit: postSelect
name: posts if: $value.banner_section_type === 'post'
label: 选择要推荐的文章(至少两个) name: data_by_post
label: 选择已有文章
id: data_by_post
value: "" value: ""
- $formkit: group
if: $value.banner_section_type === 'custom'
name: data_by_custom
label: 自定义数据
id: data_by_custom
value: [ ]
children:
- $formkit: text
name: banner_title
label: 标题
value: ""
validation: "required"
- $formkit: textarea
name: banner_subtitle
label: 描述(可留空)
value: ""
- $formkit: url
name: banner_url
label: 跳转链接
value: ""
validation: "required"
- $formkit: attachment
name: banner_img
label: 图片地址
value: ""
validation: "required"
- $formkit: radio - $formkit: radio
name: banner_direction name: banner_direction
id: banner_direction id: banner_direction
@ -1486,14 +1551,16 @@ spec:
name: template_aside name: template_aside
id: template_aside id: template_aside
label: "侧边栏模块" label: "侧边栏模块"
value: "enable_lifetime" value: "none"
options: options:
- value: "none"
label:
- value: "enable_blogger" - value: "enable_blogger"
label: 博主信息 label: 博主信息
- value: "enable_notice" - value: "enable_notice"
label: 网站公告 label: 网站公告
- value: "enable_qrcode" - value: "enable_picture"
label: 二维码 label: 图片
- value: "enable_music_player" - value: "enable_music_player"
label: 音乐播放器 label: 音乐播放器
- value: "enable_newest_post" - value: "enable_newest_post"
@ -1506,63 +1573,128 @@ spec:
label: 标签云 label: 标签云
- value: "enable_ads_aside" - value: "enable_ads_aside"
label: 侧边栏广告 label: 侧边栏广告
- $formkit: code - $formkit: group
# if: "$get(template_aside).value === 'enable_notice'" if: $value.template_aside === 'enable_notice'
name: site_notice name: aside_notice
label: 网站公告 label: 网站公告
value: "这是你的公告" value: [ ]
help: "网站公告信息,将展示在页面右侧,尽量简洁明了,不填不展示该模块(需要先在 “侧边栏” 中开启公告模块),支持html代码" children:
language: html - $formkit: text
- $formkit: attachment name: notice_title
# if: "$get(template_aside).value === 'enable_qrcode'" label: 公告标题
name: qrcode_url value: "网站公告"
label: 二维码图片 help: "公告标题,留空则不显示"
value: "" - $formkit: code
- $formkit: text name: site_notice
# if: "$get(enable_qrcode).value === true" label: 网站公告内容
name: qrcode_title value: "这是你的公告"
label: 二维码标题 help: "支持html代码"
value: "我的二维码" language: html
- $formkit: textarea - $formkit: group
# if: "$get(template_aside).value === 'enable_qrcode'" if: $value.template_aside === 'enable_picture'
name: qrcode_description name: aside_picture
label: 二维码描述 label: 图片
value: "" value: [ ]
- $formkit: text children:
# if: "$get(template_aside).value === 'enable_music_player'" - $formkit: attachment
name: music_id name: qrcode_url
label: 歌单ID label: 图片链接
help: "为音乐播放器配置歌单ID大家在网页歌单页直接复制地址栏id参数后面那串数字即可不填或填错将不会展示播放器注意仅支持网易云歌单ID且不支持私密歌单" value: ""
value: "" - $formkit: text
- $formkit: number name: qrcode_title
# if: "$get(template_aside).value === 'show_newreply'" label: 图片标题
name: show_newreply_num value: "我的二维码"
label: 展示最新评论 - $formkit: textarea
value: 3 name: qrcode_description
help: "在侧边栏展示最新评论的数量" label: 图片描述
- $formkit: select value: ""
# if: "$get(template_aside).value === 'enable_tag_cloud'" - $formkit: group
name: tag_cloud_type if: $value.template_aside === 'enable_music_player'
id: tag_cloud_type name: aside_music_player
label: 标签云类型 label: 音乐播放器
value: "3d" value: [ ]
help: "设置标签云的展示形式,默认为 “3D标签云”标签太多或卡顿时建议限制展示的标签数量使用列表形式" children:
options: - $formkit: text
- value: 3d name: music_id
label: 3D标签云 label: 歌单ID
- value: list help: "为音乐播放器配置歌单ID大家在网页歌单页直接复制地址栏id参数后面那串数字即可不填或填错将不会展示播放器注意仅支持网易云歌单ID且不支持私密歌单"
label: 标签列表 value: ""
- $formkit: select - $formkit: group
# if: "$get(template_aside).value === 'enable_tag_cloud'" if: $value.template_aside === 'show_newreply'
name: tag_cloud_width name: aside_newreply
id: tag_cloud_width label: 最新评论
label: 标签宽度 value: [ ]
value: "static" children:
options: - $formkit: number
- value: static name: show_newreply_num
label: 固定宽度 label: 展示最新评论
- value: responsive value: 3
label: 自适应宽度 help: "在侧边栏展示最新评论的数量"
- $formkit: group
if: $value.template_aside === 'enable_tag_cloud'
name: aside_tag_cloud
label: 标签云
value: [ ]
children:
- $formkit: select
name: tag_cloud_type
id: tag_cloud_type
label: 标签云类型
value: "3d"
help: "设置标签云的展示形式,默认为 “3D标签云”标签太多或卡顿时建议限制展示的标签数量使用列表形式"
options:
- value: 3d
label: 3D标签云
- value: list
label: 标签列表
- $formkit: select
name: tag_cloud_width
id: tag_cloud_width
label: 标签宽度
value: "static"
options:
- value: static
label: 固定宽度
- value: responsive
label: 自适应宽度
- $formkit: group
if: $value.template_aside === 'enable_ads_aside'
name: aside_ads
label: 侧边栏广告
value: [ ]
children:
- $formkit: radio
name: aside_ads_type
id: aside_ads_type
label: 广告数据
value: ""
help: "广告类型,支持图片和自定义代码"
options:
- value: img
label: 图片
- value: code
label: 自定义代码
- $formkit: attachment
if: $value.aside_ads_type === 'img'
name: aside_ads_img
label: 侧边栏广告图片
value: ""
help: "侧边栏广告图片链接"
- $formkit: text
if: $value.aside_ads_type === 'img'
name: aside_ads_url
label: 广告链接
value: ""
help: "广告跳转链接"
- $formkit: code
if: $value.aside_ads_type === 'code'
name: aside_ads_code
label: 自定义代码
value: ""
help: "支持html代码"
language: html
# #
- group: post - group: post
label: 文章页 label: 文章页
@ -1876,6 +2008,15 @@ spec:
label: 微信二维码 label: 微信二维码
value: "" value: ""
help: "打赏用的微信收款二维码链接,不填不显示" help: "打赏用的微信收款二维码链接,不填不显示"
- $formkit: attachment
# if: "$get(enable_donate).value === true"
name: qrcode_qq
label: QQ二维码
value: ""
help: "打赏用的QQ收款二维码链接不填不显示"
- group: tags - group: tags
label: 标签页 label: 标签页
formSchema: formSchema:
@ -2226,83 +2367,116 @@ spec:
- group: ads - group: ads
label: 广告 label: 广告
formSchema: formSchema:
- $formkit: radio - $formkit: select
name: enable_aside_ads name: enable_ads_top
label: 是否启用侧边栏广告 id: enable_ads_top
value: false label: 启用文章顶部广告
help: "启用后需要再到侧边栏添加组件" value: none
options: options:
- value: true - value: none
label: label: 不启用
- value: false - value: img
label: label: 图片
- $formkit: attachment - value: code
name: aside_ads_img label: 自定义代码
label: 侧边栏广告图片 - $formkit: repeater
value: "" name: ads_top
help: "侧边栏广告图片链接"
- $formkit: text
name: aside_ads_url
label: 广告链接
value: ""
help: "广告跳转链接"
- $formkit: radio
name: enable_post_ads_top
label: 是否启用文章顶部广告
value: false
options:
- value: true
label:
- value: false
label:
- $formkit: attachment
name: post_ads_top_img
label: 文章顶部广告图片 label: 文章顶部广告图片
value: "" max: 1
help: "文章顶部广告图片链接" min: 1
- $formkit: text value: [ ]
name: post_ads_top_url children:
label: 广告链接 - $formkit: attachment
value: "" name: ads_img
help: "广告跳转链接" id: ads_img
- $formkit: radio label: 广告图片
name: enable_post_ads_bottom value:
label: 是否启用文章底部广告 - $formkit: text
value: false name: ads_url
id: ads_url
label: 广告链接
value:
- $formkit: code
name: ads_code
id: ads_code
label: 自定义代码
value:
language: html
- $formkit: select
name: enable_ads_bottom
id: enable_ads_bottom
label: 启用文章底部广告
value: none
options: options:
- value: true - value: none
label: label: 不启用
- value: false - value: img
label: label: 图片
- $formkit: attachment - value: code
name: post_ads_bottom_img label: 自定义代码
- $formkit: repeater
name: ads_bottom
label: 文章底部广告图片 label: 文章底部广告图片
value: "" max: 1
help: "文章底部广告图片链接" min: 1
- $formkit: text value: [ ]
name: post_ads_bottom_url children:
label: 广告链接 - $formkit: attachment
value: "" name: ads_img
help: "广告跳转链接" id: ads_img
- $formkit: radio label: 广告图片
name: enable_post_ads_aside value:
label: 是否启用文章侧边栏广告 - $formkit: text
value: false name: ads_url
id: ads_url
label: 广告链接
value:
- $formkit: code
name: ads_code
id: ads_code
label: 自定义代码
value:
language: html
- $formkit: select
name: enable_ads_aside
id: enable_ads_aside
label: 启用文章侧边栏广告
value: none
options: options:
- value: true - value: none
label: label: 不启用
- value: false - value: img
label: label: 图片
- $formkit: attachment - value: code
name: post_ads_aside_img label: 自定义代码
- $formkit: repeater
name: ads_aside
label: 文章侧边栏广告图片 label: 文章侧边栏广告图片
value: "" max: 1
help: "文章底部广告图片链接" min: 1
- $formkit: text value: [ ]
name: post_ads_aside_url children:
label: 广告链接 - $formkit: attachment
value: "" name: ads_img
help: "广告跳转链接" id: ads_img
label: 广告图片
value:
- $formkit: text
name: ads_url
id: ads_url
label: 广告链接
value:
- $formkit: code
name: ads_code
id: ads_code
label: 自定义代码
value:
language: html
- group: footer - group: footer
label: 页脚 label: 页脚
@ -2415,13 +2589,15 @@ spec:
label: 金山云 label: 金山云
- value: custom - value: custom
label: 自定义 label: 自定义
- $formkit: code
- $formkit: text
name: driven_by_custom_url
if: "$get(driven_by).value === 'custom'" if: "$get(driven_by).value === 'custom'"
name: driven_custom label: 跳转链接
label: 自定义提供商 - $formkit: attachment
help: "配置自定义服务提供商此处可填写html代码" name: driven_by_custom_img
value: "" if: "$get(driven_by).value === 'custom'"
language: html label: 图片地址
- $formkit: radio - $formkit: radio
name: enable_rss name: enable_rss
label: 展示 RSS label: 展示 RSS

View File

@ -499,6 +499,10 @@ body {
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
transform: translateX(-50%) perspective(600px) rotateX(0); transform: translateX(-50%) perspective(600px) rotateX(0);
li{
display: flex;
justify-content: flex-start;
}
} }
} }
} }
@ -5670,6 +5674,7 @@ body {
color: var(--minor); color: var(--minor);
background: var(--background); background: var(--background);
border-top: 1px solid var(--classD); border-top: 1px solid var(--classD);
z-index: -1;
.joe_container { .joe_container {
position: relative; position: relative;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -249,7 +249,7 @@
} }
.is-collapsible { .is-collapsible {
max-height: 1000px; // max-height: 1000px;
overflow: hidden; overflow: hidden;
transition: all 300ms ease-in-out; transition: all 300ms ease-in-out;
} }
@ -527,3 +527,11 @@
box-shadow: 0 0 0 0 var(--theme); box-shadow: 0 0 0 0 var(--theme);
} }
} }
// 评论区 GIF 位置及大小调整
.wl-gif-popup.display{
bottom: 100% !important;
top:auto !important;
}
.wl-gallery{
max-height: 30vh !important;
}

View File

@ -172,7 +172,7 @@ const commonContext = {
} }
// 代码复制 // 代码复制
if (ThemeConfig.enable_code_copy) { if (ThemeConfig.enable_code_copy) {
const text = $item.find("code[class*='language-']").text(); const text = $item.find("code[class='language-none'], code[class*='language-']").text();
const span = $( const span = $(
"<span class=\"copy-button\"><i class=\"joe-font joe-icon-copy\" title=\"复制代码\"></i></span>" "<span class=\"copy-button\"><i class=\"joe-font joe-icon-copy\" title=\"复制代码\"></i></span>"
); );
@ -527,6 +527,7 @@ const commonContext = {
}, },
/* 初始化3D标签云 */ /* 初始化3D标签云 */
init3dTag() { init3dTag() {
ThemeConfig.tag_cloud_type = document.getElementById('tags-3d') ? '3d' : 'list'
ThemeConfig.enable_tag_cloud=document.querySelector('.joe_aside__item.tags-cloud') !== null ThemeConfig.enable_tag_cloud=document.querySelector('.joe_aside__item.tags-cloud') !== null
// console.log(ThemeConfig.enable_tag_cloud) // console.log(ThemeConfig.enable_tag_cloud)
if ( if (

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,12 @@
/*!
* imagesLoaded PACKAGED v5.0.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
/*!
* imagesLoaded v5.0.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@
<div class="joe_main"> <div class="joe_main">
<div class="joe_index"> <div class="joe_index">
<!-- 轮播图--> <!-- 轮播图-->
<th:block th:if="${theme.config.carousel.enable_banner} and ${not #lists.isEmpty(theme.config.carousel.banner_source)}"> <th:block th:if="${theme.config.carousel.enable_banner} and ${not #lists.isEmpty(theme.config.carousel.banner_data_group)}">
<th:block th:replace="~{modules/macro/banner :: banner}" /> <th:block th:replace="~{modules/macro/banner :: banner}" />
</th:block> </th:block>
@ -53,7 +53,7 @@
<th:block th:if="${!theme.config.home.enable_index_list_ajax}"> <th:block th:if="${!theme.config.home.enable_index_list_ajax}">
<th:block th:replace="~{modules/common/pagination :: pagination}" /> <th:block th:replace="~{modules/common/pagination :: pagination}" />
</th:block> </th:block>
<th:block th:if="${theme.config.home.enable_index_list_ajax}"> <th:block th:if="${posts.hasNext()} and ${theme.config.home.enable_index_list_ajax}">
<div class="joe_load_container" <div class="joe_load_container"
th:with="nextPage = ${posts.totalPages == posts.page?'':posts.nextUrl}"> th:with="nextPage = ${posts.totalPages == posts.page?'':posts.nextUrl}">
<div class="joe_load" th:data-next="@{${nextPage}}">查看更多 </div> <div class="joe_load" th:data-next="@{${nextPage}}">查看更多 </div>

View File

@ -89,7 +89,7 @@
</style> </style>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs'; import { init } from /*[[${theme.config.basic.waline.waline_js_comment}]]*/'';
init({ init({
el: '#waline', el: '#waline',

View File

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org"> <html lang="en" xmlns:th="https://www.thymeleaf.org">
<th:block th:fragment="ads_aside(ads_url, ads_img)"> <th:block th:fragment="ads_aside_img(ads_url, ads_img)">
<section class="joe_aside__item advert"> <section class="joe_aside__item advert">
<a class="joe_advert" target="_blank" rel="noopener noreferrer nofollow" th:href="${ads_url}" title="广告"> <a class="joe_advert" target="_blank" rel="noopener noreferrer nofollow" th:href="${ads_url}" title="广告">
<img class="omit lazyload" width="100%" th:data-src="${ads_img}" th:src="${theme.config.home.lazyload_thumbnail}" alt="广告"/> <img class="omit lazyload" width="100%" th:data-src="${ads_img}" th:src="${theme.config.home.lazyload_thumbnail}" alt="广告"/>
@ -8,4 +8,9 @@
</a> </a>
</section> </section>
</th:block> </th:block>
<th:block th:fragment="ads_aside_code(ads_code)">
<section class="joe_aside__item advert" th:utext="${ads_code}">
</section>
</th:block>
</html> </html>

View File

@ -1,11 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org"> <html lang="en" xmlns:th="https://www.thymeleaf.org">
<th:block th:fragment="ads_post(ads_url, ads_img)"> <th:block th:fragment="ads_post(kind, data)">
<section class="joe_advert-large"> <section class="joe_advert-large">
<a target="_blank" rel="noopener noreferrer nofollow" th:href="${ads_url}" title="广告"> <th:block th:if="${kind == 'img'}">
<img class="omit" width="100%" th:src="${ads_img}" alt="广告"/> <a target="_blank" rel="noopener noreferrer nofollow" th:href="${data.ads_url}" title="广告">
<img class="omit" width="100%" th:src="${data.ads_img}" alt="广告"/>
<span class="icon">广告</span> <span class="icon">广告</span>
</a> </a>
</th:block>
<th:block th:if="${kind == 'code'}" th:utext="${data.ads_code}">
</th:block>
</section> </section>
</th:block> </th:block>
</html> </html>

View File

@ -4,7 +4,45 @@
<aside class="joe_aside" <aside class="joe_aside"
th:classappend="${theme.config.aside.aside_position == 'left' ? 'pos_left':''}"> th:classappend="${theme.config.aside.aside_position == 'left' ? 'pos_left':''}">
<th:block th:each="aside : ${theme.config.aside.enable_outpost_aside}"> <th:block th:each="aside : ${theme.config.aside.enable_outpost_aside}">
<th:block th:replace="~{modules/widgets/asideWidget :: ${aside.template_aside}}" /> <th:block th:switch="${aside.template_aside}">
<th:block th:case="'enable_blogger'">
<!-- 博主信息-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_blogger}" />
</th:block>
<th:block th:case="'enable_notice'">
<!-- 公告-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_notice(notice_data = ${aside.aside_notice})}" />
</th:block>
<th:block th:case="'enable_picture'">
<!-- 图片-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_picture(pic_data = ${aside.aside_picture})}" />
</th:block>
<th:block th:case="'enable_music_player'">
<!-- 音乐播放器-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_music_player(music_data = ${aside.aside_music_player})}" />
</th:block>
<th:block th:case="'enable_newest_post'">
<!-- 最新文章-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_newest_post}" />
</th:block>
<th:block th:case="'enable_lifetime'">
<!-- 人生倒计时-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_lifetime}" />
</th:block>
<th:block th:case="'show_newreply'">
<!-- 最新评论-->
<th:block th:include="~{modules/widgets/asideWidget :: show_newreply(new_reply_data = ${aside.aside_newreply})}" />
</th:block>
<th:block th:case="'enable_tag_cloud'">
<!-- 标签云-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_tag_cloud(tag_cloud_data = ${aside.aside_tag_cloud})}" />
</th:block>
<th:block th:case="'enable_ads_aside'">
<!-- 侧边栏广告-->
<th:block th:include="~{modules/widgets/asideWidget :: enable_ads_aside(ads_data = ${aside.aside_ads})}" />
</th:block>
</th:block>
</th:block> </th:block>

View File

@ -15,9 +15,10 @@
<th:block th:if="${theme.config.post.enable_relate_post == true}"> <th:block th:if="${theme.config.post.enable_relate_post == true}">
<th:block th:replace="~{modules/macro/relate :: relate}" /> <th:block th:replace="~{modules/macro/relate :: relate}" />
</th:block> </th:block>
<th:block th:if="${theme.config.ads.enable_post_ads_aside} and ${#strings.trim(theme.config.ads.post_ads_aside_img) !=''}"> <th:block th:if="${theme.config.ads.enable_ads_aside != 'none'} and ${not #lists.isEmpty(theme.config.ads.ads_aside)}"
<th:block th:replace="~{modules/ads/ads_aside :: ads_aside(ads_url=${theme.config.ads.post_ads_aside_url}, ads_img=${theme.config.ads.post_ads_aside_img})}" /> th:each="ads_data : ${theme.config.ads.ads_aside}">
</th:block> <th:block th:replace="~{modules/ads/ads_post :: ads_post(kind = ${theme.config.ads.enable_ads_aside}, data = ${ads_data})}" />
</th:block>
</div> </div>
</aside> </aside>
</th:block> </th:block>

View File

@ -15,8 +15,7 @@
</th:block> </th:block>
</div> </div>
<a class="link" th:href="${site.url}" target="_blank" rel="noopener noreferrer nofollow"> <a class="link" th:href="${site.url}" target="_blank" rel="noopener noreferrer nofollow">
[[${theme.config.blogger.nickname ?: site.title}]] [[${theme.config.blogger.nickname ?: site.title}]]<img class="level" th:src="@{/assets/svg/level_1.svg}" alt="博主等级">
<!-- 这里应该还有一个等级-->
</a> </a>
<th:block th:if="${theme.config.blogger.motto != ''}"> <th:block th:if="${theme.config.blogger.motto != ''}">
<p class="motto joe_motto">[[${theme.config.blogger.motto}]]</p> <p class="motto joe_motto">[[${theme.config.blogger.motto}]]</p>

View File

@ -72,8 +72,13 @@
</a>提供云服务 </a>提供云服务
</p> </p>
</th:block> </th:block>
<th:block th:if="${theme.config.footer.driven_by == 'custom'}">
<p class="site_driven" th:utext="${theme.config.footer.driven_custom}"></p> <th:block th:if="${theme.config.footer.driven_by == 'custom'} and ${theme.config.footer.driven_by_custom_img != ''}">
<p class="site_driven">本站点由
<a th:href="${theme.config.footer.driven_by_custom_url}" target="_blank" rel="noopener noreferrer nofollow">
<img th:class="${theme.config.footer.driven_by}" th:src="${theme.config.footer.driven_by_custom_img}" alt="云服务商"/>
</a>提供云服务
</p>
</th:block> </th:block>

View File

@ -30,8 +30,8 @@
<script id="theme-config-getter" type="text/javascript"> <script id="theme-config-getter" type="text/javascript">
if (window.location.hostname === 'localhost'||window.location.hostname === '127.0.0.1') { if (window.location.hostname === 'localhost'||window.location.hostname === '127.0.0.1') {
ThemeConfig['mode'] = "development" ThemeConfig['mode'] = "development"
console.log(ThemeConfig.mode)
} }
console.log(ThemeConfig.mode)
if (ThemeConfig.mode === "development") { if (ThemeConfig.mode === "development") {
console.log("Joe3主题配置", ThemeConfig); console.log("Joe3主题配置", ThemeConfig);

View File

@ -2,15 +2,23 @@
<html lang="en" xmlns:th="https://www.thymeleaf.org"> <html lang="en" xmlns:th="https://www.thymeleaf.org">
<th:block th:fragment="donate"> <th:block th:fragment="donate">
<div class="joe_donate"> <div class="joe_donate">
<i class="joe-font joe-icon-shang"></i>
<th:block th:if="${theme.config.post.qrcode_zfb != ''} or ${theme.config.post.qrcode_wx != ''}"> <th:block th:if="${theme.config.post.qrcode_zfb != ''} or ${theme.config.post.qrcode_wx != ''}">
<ol class="joe_donate_list" <ol class="joe_donate_list"
th:classappend="${theme.config.post.qrcode_zfb != '' && theme.config.post.qrcode_wx != '' ?'two':''}"> th:classappend="${theme.config.post.qrcode_zfb != '' && theme.config.post.qrcode_wx != '' ?'two':''}">
<th:block th:if="${theme.config.post.qrcode_zfb}"> <th:block th:if="${theme.config.post.qrcode_zfb} and ${#strings.trim(theme.config.post.qrcode_wx) != ''}">
<li><img th:src="${theme.config.post.qrcode_zfb}" alt="qrcode alipay"/></li> <li>
<p>支付宝打赏</p>
<img th:src="${theme.config.post.qrcode_zfb}" alt="qrcode alipay"/></li>
</th:block> </th:block>
<th:block th:if="${theme.config.post.qrcode_wx}"> <th:block th:if="${theme.config.post.qrcode_wx} and ${#strings.trim(theme.config.post.qrcode_wx) != ''}">
<li><img th:src="${theme.config.post.qrcode_wx}" alt="qrcode weixin"/></li> <li>
<p>微信打赏</p>
<img th:src="${theme.config.post.qrcode_wx}" alt="qrcode weixin"/></li>
</th:block>
<th:block th:if="${theme.config.post.qrcode_qq} and ${#strings.trim(theme.config.post.qrcode_qq) != ''}">
<li>
<p>QQ打赏</p>
<img th:src="${theme.config.post.qrcode_qq}" alt="qrcode qq"/></li>
</th:block> </th:block>
</ol> </ol>
</th:block> </th:block>

View File

@ -76,9 +76,9 @@
</th:block> </th:block>
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/responsive.min.css?v='+theme.spec.version}"> <link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/responsive.min.css?v='+theme.spec.version}">
<link rel="stylesheet" th:href="${source_link+'/assets/lib/fancybox/jquery.fancybox.min.css'}"> <link rel="stylesheet" th:href="${source_link+'/assets/lib/fancybox/jquery.fancybox.min.css'}">
<link <link th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline.waline_serverURL) !=''}"
rel="stylesheet" rel="stylesheet"
href="https://unpkg.com/@waline/client@v2/dist/waline.css" th:href="${theme.config.basic.waline.waline_css}"
/> />
<th:block th:if="${ttheme.config.other.enable_clean_mode != true} and ${theme.config.theme.cursor_skin != 'off'}"> <th:block th:if="${ttheme.config.other.enable_clean_mode != true} and ${theme.config.theme.cursor_skin != 'off'}">
<link rel="stylesheet" th:href="${source_link+'/assets/cursor/style/min/'+theme.config.theme.cursor_skin+'.min.css'}"> <link rel="stylesheet" th:href="${source_link+'/assets/cursor/style/min/'+theme.config.theme.cursor_skin+'.min.css'}">

View File

@ -4,26 +4,16 @@
<div class="joe_index__banner"> <div class="joe_index__banner">
<div class="swiper"> <div class="swiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<th:block th:each="bannerData : ${theme.config.carousel.banner_source}"> <th:block th:each="banner_data : ${theme.config.carousel.banner_data_group}">
<th:block th:with="post = ${postFinder.getByName(bannerData.posts)}"> <th:block th:switch="${banner_data.banner_section_type}">
<div class="swiper-slide"> <th:block th:case="'post'">
<a class="item" <th:block th:include="~{modules/macro/banner_item_data :: data_by_post(post_metadata = ${banner_data.data_by_post})}" />
th:classappend="${post.status.permalink !='' ? 'clickable': ''}"
th:href="${post.status.permalink !='' ? post.status.permalink : 'javascript:;'}" target="_blank" rel="noopener noreferrer nofollow">
<img width="100%" height="100%" class="thumbnail lazyload" th:data-src="${post.spec.cover ?: '/themes/theme-Joe3/assets/img/Joe3.png'}" th:src="${theme.config.carousel.banner_lazyload_img}" th:alt="${post.spec.title}">
<div class="title-row">
<h3 class="title">[[${post.spec.title}]]</h3>
<th:block th:if="${post.status.excerpt != ''}">
<p class="subtitle">[[${post.status.excerpt}]]</p>
</th:block> </th:block>
</div> <th:block th:case="'custom'">
<th:block th:include="~{modules/macro/banner_item_data :: data_by_custom(banner_url = ${banner_data.data_by_custom.banner_url}, banner_cover = ${banner_data.data_by_custom.banner_img}, banner_title = ${banner_data.data_by_custom.banner_title}, banner_excerpt = ${banner_data.data_by_custom.banner_subtitle})}" />
</th:block>
</th:block>
<i class="joe-font joe-icon-zhifeiji"></i>
</a>
</div>
</th:block>
</th:block> </th:block>
</div> </div>
<th:block th:if="${theme.config.carousel.enable_banner_pagination}"> <th:block th:if="${theme.config.carousel.enable_banner_pagination}">

View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<th:block th:fragment="data_by_post(post_metadata)">
<div class="swiper-slide" th:with="post = ${postFinder.getByName(post_metadata)}">
<a class="item"
th:classappend="${post.status.permalink !='' ? 'clickable': ''}"
th:href="${post.status.permalink !='' ? post.status.permalink : 'javascript:;'}" target="_blank" rel="noopener noreferrer nofollow">
<img width="100%" height="100%" class="thumbnail lazyload" th:data-src="${post.spec.cover ?: '/themes/theme-Joe3/assets/img/Joe3.png'}" th:src="${theme.config.carousel.banner_lazyload_img}" th:alt="${post.spec.title}">
<div class="title-row">
<h3 class="title">[[${post.spec.title}]]</h3>
<th:block th:if="${post.status.excerpt != ''}">
<p class="subtitle">[[${post.status.excerpt}]]</p>
</th:block>
</div>
<i class="joe-font joe-icon-zhifeiji"></i>
</a>
</div>
</th:block>
<th:block th:fragment="data_by_custom(banner_url, banner_cover, banner_title, banner_excerpt)">
<div class="swiper-slide">
<a class="item"
th:classappend="${banner_url !='' ? 'clickable': ''}"
th:href="${banner_url !='' ? banner_url : 'javascript:;'}" target="_blank" rel="noopener noreferrer nofollow">
<img width="100%" height="100%" class="thumbnail lazyload" th:data-src="${banner_cover ?: '/themes/theme-Joe3/assets/img/Joe3.png'}" th:src="${theme.config.carousel.banner_lazyload_img}" th:alt="${banner_title}">
<div class="title-row">
<h3 class="title">[[${banner_title}]]</h3>
<th:block th:if="${banner_excerpt != ''}">
<p class="subtitle">[[${banner_excerpt}]]</p>
</th:block>
</div>
<i class="joe-font joe-icon-zhifeiji"></i>
</a>
</div>
</th:block>
</html>

View File

@ -5,26 +5,26 @@
<div class="box_title"> <div class="box_title">
<h2>评论区</h2> <h2>评论区</h2>
</div> </div>
<th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline_serverURL) ==''}"> <th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline.waline_serverURL) ==''}">
<halo:comment <halo:comment
group="content.halo.run" group="content.halo.run"
th:attr="name=${name},kind=${kind}" th:attr="name=${name},kind=${kind}"
colorScheme="document.documentElement.getAttribute('data-mode')" colorScheme="document.documentElement.getAttribute('data-mode')"
/> />
</th:block> </th:block>
<th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline_serverURL) !=''}"> <th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline.waline_serverURL) !=''}">
<div id="waline"></div> <div id="waline"></div>
<style> <style>
#waline .wl-count{color:var(--routine);} #waline .wl-count{color:var(--routine);}
</style> </style>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs'; import { init } from /*[[${theme.config.basic.waline.waline_js_comment}]]*/'';
init({ init({
el: '#waline', el: '#waline',
dark: 'html[data-mode="dark"]', dark: 'html[data-mode="dark"]',
serverURL: /*[[${theme.config.basic.waline_serverURL}]]*/'', serverURL: /*[[${theme.config.basic.waline.waline_serverURL}]]*/'',
comment: true, comment: true,
requiredMeta:['nick', 'mail'], requiredMeta:['nick', 'mail'],

View File

@ -23,16 +23,16 @@
<ul class="items"> <ul class="items">
<li>[[${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}]]</li> <li>[[${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}]]</li>
<li><i class="joe-font joe-icon-eye"></i>[[${post.stats.visit}]]</li> <li><i class="joe-font joe-icon-eye"></i>[[${post.stats.visit}]]</li>
<th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline_serverURL) ==''}"> <th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline.waline_serverURL) ==''}">
<li><i class="joe-font joe-icon-message"></i>[[${post.stats.comment}]]</li> <li><i class="joe-font joe-icon-message"></i>[[${post.stats.comment}]]</li>
</th:block> </th:block>
<th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline_serverURL) !=''}"> <th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline.waline_serverURL) !=''}">
<li><i class="joe-font joe-icon-message"></i><span class="waline-comment-count" th:data-path="${post.status.permalink}">0</span></li> <li><i class="joe-font joe-icon-message"></i><span class="waline-comment-count" th:data-path="${post.status.permalink}">0</span></li>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { commentCount } from 'https://unpkg.com/@waline/client@v2/dist/comment.mjs'; import { commentCount } from /*[[${theme.config.basic.waline.waline_js_list}]]*/'';
commentCount({ commentCount({
serverURL: /*[[${theme.config.basic.waline_serverURL}]]*/'', serverURL: /*[[${theme.config.basic.waline.waline_serverURL}]]*/'',
path:/*[[${post.status.permalink}]]*/'' , path:/*[[${post.status.permalink}]]*/'' ,
// 可选的,用于自定选择器,默认为 `'.waline-pageview-count'` // 可选的,用于自定选择器,默认为 `'.waline-pageview-count'`

View File

@ -43,9 +43,9 @@
<!--相册--> <!--相册-->
<th:block th:if="${htmlType == 'photos'}"> <th:block th:if="${htmlType == 'photos'}">
<script th:src="${source_link+'/assets/lib/justifiedGallery/justifiedGallery.min.js'}"></script> <script th:src="${source_link+'/assets/lib/justifiedGallery/justifiedGallery.min.js'}"></script>
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script> <script th:src="${source_link+'/assets/lib/masonry/masonry.pkgd.min.js'}"></script>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script> <script th:src="${source_link+'/assets/lib/masonry/isotope.pkgd.min.js'}"></script>
<script src="https://unpkg.com/imagesloaded@5/imagesloaded.pkgd.min.js"></script> <script th:src="${source_link+'/assets/lib/masonry/imagesloaded.pkgd.min.js'}"></script>
</th:block> </th:block>

View File

@ -15,7 +15,7 @@
weather_key : /*[[${theme.config.blogger.weather_key}]]*/ '', weather_key : /*[[${theme.config.blogger.weather_key}]]*/ '',
link_behavior : /*[[${theme.config.theme.link_behavior}]]*/ 'default', link_behavior : /*[[${theme.config.theme.link_behavior}]]*/ 'default',
enable_tag_cloud : true, enable_tag_cloud : true,
tag_cloud_type : /*[[${theme.config.aside.tag_cloud_type}]]*/ '3d', tag_cloud_type : document.getElementById('tags-3d') ? '3d' : 'list',
enable_fixed_header : /*[[${theme.config.navbar.enable_fixed_header}]]*/ true, enable_fixed_header : /*[[${theme.config.navbar.enable_fixed_header}]]*/ true,
enable_clean_mode : /*[[${theme.config.other.enable_clean_mode}]]*/ false, enable_clean_mode : /*[[${theme.config.other.enable_clean_mode}]]*/ false,
cursor_effect : /*[[${theme.config.theme.cursor_effect}]]*/ 'off', cursor_effect : /*[[${theme.config.theme.cursor_effect}]]*/ 'off',

View File

@ -3,40 +3,40 @@
<th:block th:fragment="enable_blogger"> <th:block th:fragment="enable_blogger">
<th:block th:replace="~{modules/common/blogger :: blogger}" /> <th:block th:replace="~{modules/common/blogger :: blogger}" />
</th:block> </th:block>
<th:block th:fragment="enable_notice"> <th:block th:fragment="enable_notice(notice_data)">
<section class="joe_aside__item notice"> <section class="joe_aside__item notice">
<div class="joe_aside__item-title"> <div class="joe_aside__item-title">
<!-- <#&#45;&#45; <i class="joe-font joe-icon-speaker"></i> &ndash;&gt;--> <!-- <#&#45;&#45; <i class="joe-font joe-icon-speaker"></i> &ndash;&gt;-->
<th:block th:replace="~{modules/macro/speaker :: speaker}" /> <th:block th:replace="~{modules/macro/speaker :: speaker}" />
<span class="text">公告信息</span> <span class="text">[[${notice_data.notice_title}]]</span>
</div> </div>
<div class="joe_aside__item-contain"> <div class="joe_aside__item-contain">
<div class="notice_content" th:utext="${theme.config.aside.site_notice}"></div> <div class="notice_content" th:utext="${notice_data.site_notice}"></div>
</div> </div>
</section> </section>
</th:block> </th:block>
<th:block th:fragment="enable_qrcode"> <th:block th:fragment="enable_picture(pic_data)">
<section class="joe_aside__item qrcode"> <section class="joe_aside__item qrcode">
<div class="joe_aside__item-title"> <div class="joe_aside__item-title">
<i class="joe-font joe-icon-qrcode"></i> <i class="joe-font joe-icon-qrcode"></i>
<span class="text">[[${theme.config.aside.qrcode_title}]]</span> <span class="text">[[${pic_data.qrcode_title}]]</span>
</div> </div>
<div class="joe_aside__item-contain"> <div class="joe_aside__item-contain">
<img class="qrcode_img lazyload" th:src="${theme.config.aside.qrcode_url}" th:data-src="${theme.config.aside.qrcode_url}" alt="二维码"/> <img class="qrcode_img lazyload" th:src="${pic_data.qrcode_url}" th:data-src="${pic_data.qrcode_url}" th:alt="${pic_data.qrcode_title}"/>
<th:block th:if="${theme.config.aside.qrcode_description != ''}"> <th:block th:if="${pic_data.qrcode_description != ''}">
<p class="qrcode_description">[[${theme.config.aside.qrcode_description}]]</p> <p class="qrcode_description">[[${pic_data.qrcode_description}]]</p>
</th:block> </th:block>
</div> </div>
</section> </section>
</th:block> </th:block>
<th:block th:fragment="enable_music_player"> <th:block th:fragment="enable_music_player(music_data)">
<th:block th:if="${theme.config.aside.music_id != ''}"> <th:block th:if="${music_data.music_id != ''}">
<section class="joe_aside__item timelife"> <section class="joe_aside__item timelife">
<div class="joe_aside__item-title"> <div class="joe_aside__item-title">
<i class="joe-font joe-icon-yinfu"></i> <i class="joe-font joe-icon-yinfu"></i>
<span class="text">我的歌单</span> <span class="text">我的歌单</span>
</div> </div>
<div id="aplayer" class="aplayer" th:data-id="${theme.config.aside.music_id}" list-max-height="20px" data-server="netease" data-type="playlist" data-fixed="false" data-listfolded="true" data-order="random" data-mode="#f3f3f7"></div> <div id="aplayer" class="aplayer" th:data-id="${music_data.music_id}" list-max-height="20px" data-server="netease" data-type="playlist" data-fixed="false" data-listfolded="true" data-order="random" data-mode="#f3f3f7"></div>
</section> </section>
</th:block> </th:block>
</th:block> </th:block>
@ -52,7 +52,7 @@
<div class="joe_aside__item-contain"></div> <div class="joe_aside__item-contain"></div>
</section> </section>
</th:block> </th:block>
<th:block th:fragment="show_newreply"> <th:block th:fragment="show_newreply(new_reply_data)">
<th:block th:if="${theme.config.other.enable_clean_mode !=true}"> <th:block th:if="${theme.config.other.enable_clean_mode !=true}">
<section class="joe_aside__item newreply"> <section class="joe_aside__item newreply">
<div class="joe_aside__item-title"> <div class="joe_aside__item-title">
@ -61,9 +61,9 @@
</div> </div>
<ul class="joe_aside__item-contain" <ul class="joe_aside__item-contain"
th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline_serverURL) ==''}"> th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline.waline_serverURL) ==''}">
<th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline_serverURL) ==''}" <th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline.waline_serverURL) ==''}"
th:each="result : ${commentFinder.list(null,1,theme.config.aside.show_newreply_num)}"> th:each="result : ${commentFinder.list(null,1,new_reply_data.show_newreply_num)}">
<li class="item"> <li class="item">
<div class="user"> <div class="user">
<img width="35" height="35" class="avatar lazyload" th:data-src="${result.owner.avatar ?: '/themes/theme-Joe3/assets/img/peeps-avatar.png'} " th:src="${theme.config.blogger.lazyload_avatar}" alt="头像"> <img width="35" height="35" class="avatar lazyload" th:data-src="${result.owner.avatar ?: '/themes/theme-Joe3/assets/img/peeps-avatar.png'} " th:src="${theme.config.blogger.lazyload_avatar}" alt="头像">
@ -109,7 +109,7 @@
</th:block> </th:block>
</ul> </ul>
<th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline_serverURL) !=''}"> <th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline.waline_serverURL) !=''}">
<ul class="joe_aside__item-contain" id="waline-recent"> <ul class="joe_aside__item-contain" id="waline-recent">
</ul> </ul>
<style> <style>
@ -119,13 +119,13 @@
max-width: 100%;} max-width: 100%;}
</style> </style>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { RecentComments } from 'https://cdn.jsdelivr.net/npm/@waline/client/dist/waline.mjs'; import { RecentComments } from /*[[${theme.config.basic.waline.waline_js_leaving}]]*/'';
RecentComments({ RecentComments({
serverURL: /*[[${theme.config.basic.waline_serverURL}]]*/'', serverURL: /*[[${theme.config.basic.waline.waline_serverURL}]]*/'',
count: /*[[${theme.config.aside.show_newreply_num}]]*/5, count: /*[[${new_reply_data.show_newreply_num}]]*/5,
}).then(({ comments }) => { }).then(({ comments }) => {
document.getElementById('waline-recent').innerHTML = comments.data.map( document.getElementById('waline-recent').innerHTML = comments.map(
(comment) =>{ (comment) =>{
const commentContent = document.createElement('div'); const commentContent = document.createElement('div');
let commentText ='' let commentText =''
@ -171,7 +171,7 @@
</section> </section>
</th:block> </th:block>
</th:block> </th:block>
<th:block th:fragment="enable_tag_cloud"> <th:block th:fragment="enable_tag_cloud(tag_cloud_data)">
<section class="joe_aside__item tags-cloud" id="tags-cloud"> <section class="joe_aside__item tags-cloud" id="tags-cloud">
<div class="joe_aside__item-title"> <div class="joe_aside__item-title">
<i class="joe-font joe-icon-tag"></i> <i class="joe-font joe-icon-tag"></i>
@ -182,7 +182,7 @@
</div> </div>
<div class="joe_aside__item-contain"> <div class="joe_aside__item-contain">
<div th:class="'tags-cloud-list '+${theme.config.aside.tag_cloud_width =='responsive' ? 'responsive':'static'}" th:style="${theme.config.aside.tag_cloud_type == '3d' ? 'display:none':''}"> <div th:class="'tags-cloud-list '+${tag_cloud_data.tag_cloud_width =='responsive' ? 'responsive':'static'}" th:style="${tag_cloud_data.tag_cloud_type == '3d' ? 'display:none':''}">
<th:block th:with="tags = ${tagFinder.listAll()}"> <th:block th:with="tags = ${tagFinder.listAll()}">
<a th:each="tag : ${tags}" <a th:each="tag : ${tags}"
@ -190,7 +190,7 @@
</th:block> </th:block>
</div> </div>
<th:block th:if="${theme.config.aside.tag_cloud_type == '3d'}"> <th:block th:if="${tag_cloud_data.tag_cloud_type == '3d'}">
<div id="tags-3d"> <div id="tags-3d">
<div class="empty">加载中…</div> <div class="empty">加载中…</div>
</div> </div>
@ -202,9 +202,18 @@
<!--</@tagTag>--> <!--</@tagTag>-->
</section> </section>
</th:block> </th:block>
<th:block th:fragment="enable_ads_aside"> <th:block th:fragment="enable_ads_aside(ads_data)">
<th:block th:if="${theme.config.ads.enable_aside_ads} and ${#strings.trim(theme.config.ads.aside_ads_img) !=''}"> <th:block th:switch="${ads_data.aside_ads_type}">
<th:block th:replace="~{modules/ads/ads_aside :: ads_aside(ads_url=${theme.config.ads.aside_ads_url}, ads_img=${theme.config.ads.aside_ads_img})}" /> <th:block th:case="'img'">
<th:block th:if="${#strings.trim(ads_data.aside_ads_img) !=''}">
<th:block th:replace="~{modules/ads/ads_aside :: ads_aside_img(ads_url=${ads_data.aside_ads_url}, ads_img=${ads_data.aside_ads_img})}" />
</th:block>
</th:block>
<th:block th:case="'code'">
<th:block th:replace="~{modules/ads/ads_aside :: ads_aside_code(ads_code = ${ads_data.aside_ads_code})}" />
</th:block>
</th:block> </th:block>
</th:block> </th:block>
</html> </html>

View File

@ -97,7 +97,7 @@
</style> </style>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs'; import { init } from /*[[${theme.config.basic.waline.waline_js_comment}]]*/'';
init({ init({
el: /*[[${'#'+moment.metadata.name}]]*/'', el: /*[[${'#'+moment.metadata.name}]]*/'',

View File

@ -20,7 +20,8 @@
<img width="35" height="35" class="avatar lazyload" th:data-src="${theme.config.blogger.avatar}" th:src="${theme.config.blogger.lazyload_avatar}" th:alt="${moment.owner.displayName}"> <img width="35" height="35" class="avatar lazyload" th:data-src="${theme.config.blogger.avatar}" th:src="${theme.config.blogger.lazyload_avatar}" th:alt="${moment.owner.displayName}">
<div class="meta"> <div class="meta">
<div class="author"> <div class="author">
<a class="link" th:href="@{authors}+'/'+${moment.owner.name}" th:title="${moment.owner.displayName}">[[${moment.owner.displayName}]]</a> <a class="link" th:href="${site.url}" th:title="${theme.config.blogger.nickname ?: site.title}">[[${theme.config.blogger.nickname ?: site.title}]]</a>
<!-- 修改链接指向博客地址 title 和 显示为博主名/博客名 -->
</div> </div>
<div class="item"> <div class="item">
<span class="text">[[${theme.config.blogger.motto?:'一句话介绍自己吧!'}]]</span> <span class="text">[[${theme.config.blogger.motto?:'一句话介绍自己吧!'}]]</span>
@ -98,7 +99,7 @@
</style> </style>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs'; import { init } from /*[[${theme.config.basic.waline.waline_js_comment}]]*/'';
init({ init({
el: /*[[${'#'+moment.metadata.name}]]*/'', el: /*[[${'#'+moment.metadata.name}]]*/'',

View File

@ -25,10 +25,10 @@
<div class="item"> <div class="item">
<span class="text">[[${#dates.format(singlePage.spec.publishTime,'yyyy-MM-dd')}]]</span> <span class="text">[[${#dates.format(singlePage.spec.publishTime,'yyyy-MM-dd')}]]</span>
<span class="line">/</span> <span class="line">/</span>
<th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline_serverURL) ==''}"> <th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline.waline_serverURL) ==''}">
<span class="text">[[${singlePage.stats.comment}]] 评论</span> <span class="text">[[${singlePage.stats.comment}]] 评论</span>
</th:block> </th:block>
<th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline_serverURL) !=''}"> <th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline.waline_serverURL) !=''}">
<span class="text waline-comment-count" th:data-path="@{${singlePage.status.permalink}}">0</span>&nbsp;评论 <span class="text waline-comment-count" th:data-path="@{${singlePage.status.permalink}}">0</span>&nbsp;评论
</th:block> </th:block>
<span class="line">/</span> <span class="line">/</span>
@ -52,7 +52,7 @@
<article th:class="'joe_detail__article animated fadeIn '+${#annotations.getOrDefault(singlePage, 'img_align', 'center')+'-img'}" <article th:class="'joe_detail__article animated fadeIn '+${#annotations.getOrDefault(singlePage, 'img_align', 'center')+'-img'}"
th:classappend="|${#annotations.getOrDefault(singlePage, 'enable_read_limit', 'false') == 'true' ?'limited': ''} ${(#annotations.getOrDefault(singlePage, 'enable_copy', 'true') == 'false' or theme.config.post.enable_copy != true) ? 'uncopy' : ''} ${theme.config.post.enable_indent ? 'indent':''} ${(theme.config.code_block.enable_code_line_number == true and theme.config.code_block.enable_code_newline !=true) ? 'line-numbers':''} ${theme.config.code_block.enable_single_code_select == true ? 'single_code_select': ''}|"> th:classappend="|${#annotations.getOrDefault(singlePage, 'enable_read_limit', 'false') == 'true' ?'limited': ''} ${(#annotations.getOrDefault(singlePage, 'enable_copy', 'true') == 'false' or theme.config.post.enable_copy != true) ? 'uncopy' : ''} ${theme.config.post.enable_indent ? 'indent':''} ${(theme.config.code_block.enable_code_line_number == true and theme.config.code_block.enable_code_newline !=true) ? 'line-numbers':''} ${theme.config.code_block.enable_single_code_select == true ? 'single_code_select': ''}|">
<div class="joe_leaving tpl"> <div class="joe_leaving tpl">
<th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline_serverURL) ==''}"> <th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline.waline_serverURL) ==''}">
<ul class="joe_leaving-list"> <ul class="joe_leaving-list">
<li th:each="result : ${commentFinder.list(null,1,20)}" class="item"> <li th:each="result : ${commentFinder.list(null,1,20)}" class="item">
@ -69,7 +69,7 @@
</ul> </ul>
</th:block> </th:block>
<th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline_serverURL) !=''}"> <th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline.waline_serverURL) !=''}">
<ul class="joe_leaving-list" id="waline-leaving"> <ul class="joe_leaving-list" id="waline-leaving">
</ul> </ul>
<style> <style>
@ -78,36 +78,34 @@
height: 24px; height: 24px;
max-width: 100%;} max-width: 100%;}
</style> </style>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { RecentComments } from 'https://cdn.jsdelivr.net/npm/@waline/client/dist/waline.mjs'; import { RecentComments } from /*[[${theme.config.basic.waline.waline_js_leaving}]]*/'';
const url = /*[[${theme.config.basic.waline_serverURL+'/api/comment?type=count'}]]*/''; const serverURL = /*[[${theme.config.basic.waline.waline_serverURL}]]*/'';
let countNum = 0; const path = window.location.pathname;
fetch(url).then(async (response) => {
const data = await response.json();
countNum = data.data;
});
RecentComments({ const url = serverURL + '/api/comment?path=' + path + '&pageSize=100';
serverURL: /*[[${theme.config.basic.waline_serverURL}]]*/'',
count: countNum,
}).then(({ comments }) => {
document.getElementById('waline-leaving').innerHTML = comments.data.map( fetch(url)
(comment) =>{ .then(async (response) => {
const timestamp = new Date(comment.time); const data = await response.json();
console.log(data.data.data)
const comments = data.data.data;
document.getElementById('waline-leaving').innerHTML = comments.map(
(comment) =>{
const timestamp = new Date(comment.time);
// 获取年、月、日、时、分、秒 // 获取年、月、日、时、分、秒
const year = timestamp.getFullYear(); const year = timestamp.getFullYear();
const month = timestamp.getMonth() + 1; // 月份是从0开始的所以要加1 const month = timestamp.getMonth() + 1; // 月份是从0开始的所以要加1
const day = timestamp.getDate(); const day = timestamp.getDate();
const hours = timestamp.getHours(); const hours = timestamp.getHours();
const minutes = timestamp.getMinutes(); const minutes = timestamp.getMinutes();
const seconds = timestamp.getSeconds(); const seconds = timestamp.getSeconds();
// 构建日期时间字符串 // 构建日期时间字符串
const commentTime = `${year}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day} ${hours < 10 ? '0' : ''}${hours}:${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`; const commentTime = `${year}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day} ${hours < 10 ? '0' : ''}${hours}:${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
return `<li class="item"> return `<li class="item">
<div class="user"> <div class="user">
<img class="avatar lazyload" src="${ThemeConfig.lazyload_avatar}" alt="用户头像" <img class="avatar lazyload" src="${ThemeConfig.lazyload_avatar}" alt="用户头像"
data-src="${comment.avatar}" /> data-src="${comment.avatar}" />
@ -119,14 +117,16 @@
</div> </div>
</li>`; </li>`;
}).join(''); }).join('');
const leaving =document.createElement('script') const leaving =document.createElement('script')
leaving.src = /*[[@{/assets/js/min/leaving.min.js}]]*/'' leaving.src = /*[[@{/assets/js/min/leaving.min.js}]]*/''
leaving.type= 'module' leaving.type= 'module'
document.body.appendChild(leaving) document.body.appendChild(leaving)
});
</script>
});
</script>
</th:block> </th:block>

View File

@ -78,7 +78,7 @@
</style> </style>
<script type="module" th:inline="javascript"> <script type="module" th:inline="javascript">
import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs'; import { init } from /*[[${theme.config.basic.waline.waline_js_comment}]]*/'';
init({ init({
el: '#waline', el: '#waline',

View File

@ -88,8 +88,9 @@
</div> </div>
</th:block> </th:block>
</div> </div>
<th:block th:if="${theme.config.ads.enable_post_ads_top} and ${#strings.trim(theme.config.ads.post_ads_top_img) !=''}"> <th:block th:if="${theme.config.ads.enable_ads_top != 'none'} and ${not #lists.isEmpty(theme.config.ads.ads_top)}"
<th:block th:replace="~{modules/ads/ads_post :: ads_post(ads_url=${theme.config.ads.post_ads_top_url}, ads_img=${theme.config.ads.post_ads_top_img})}" /> th:each="ads_data : ${theme.config.ads.ads_top}">
<th:block th:replace="~{modules/ads/ads_post :: ads_post(kind = ${theme.config.ads.enable_ads_top}, data = ${ads_data})}" />
</th:block> </th:block>
<article th:class="'joe_detail__article animated fadeIn '+${#annotations.getOrDefault(post, 'img_align', 'center')+'-img'}" <article th:class="'joe_detail__article animated fadeIn '+${#annotations.getOrDefault(post, 'img_align', 'center')+'-img'}"
th:classappend="|${#annotations.getOrDefault(post, 'enable_read_limit', 'false') == 'true' ?'limited': ''} ${(#annotations.getOrDefault(post, 'enable_copy', 'true') == 'false' or theme.config.post.enable_copy != true) ? 'uncopy' : ''} ${theme.config.post.enable_indent ? 'indent':''} ${(theme.config.code_block.enable_code_line_number == true and theme.config.code_block.enable_code_newline !=true) ? 'line-numbers':''} ${theme.config.code_block.enable_single_code_select == true ? 'single_code_select': ''}|"> th:classappend="|${#annotations.getOrDefault(post, 'enable_read_limit', 'false') == 'true' ?'limited': ''} ${(#annotations.getOrDefault(post, 'enable_copy', 'true') == 'false' or theme.config.post.enable_copy != true) ? 'uncopy' : ''} ${theme.config.post.enable_indent ? 'indent':''} ${(theme.config.code_block.enable_code_line_number == true and theme.config.code_block.enable_code_newline !=true) ? 'line-numbers':''} ${theme.config.code_block.enable_single_code_select == true ? 'single_code_select': ''}|">
@ -113,9 +114,10 @@
</div> </div>
<th:block th:replace="~{modules/post_operate :: post_operate}" /> <th:block th:replace="~{modules/post_operate :: post_operate}" />
<th:block th:replace="~{modules//macro/post_copyright :: post_copyright}" /> <th:block th:replace="~{modules//macro/post_copyright :: post_copyright}" />
<th:block th:if="${theme.config.ads.enable_post_ads_bottom} and ${#strings.trim(theme.config.ads.post_ads_bottom_img) !=''}"> <th:block th:if="${theme.config.ads.enable_ads_bottom != 'none'} and ${not #lists.isEmpty(theme.config.ads.ads_bottom)}"
<th:block th:replace="~{modules/ads/ads_post :: ads_post(ads_url=${theme.config.ads.post_ads_bottom_url}, ads_img=${theme.config.ads.post_ads_bottom_img})}" /> th:each="ads_data : ${theme.config.ads.ads_bottom}">
</th:block> <th:block th:replace="~{modules/ads/ads_post :: ads_post(kind = ${theme.config.ads.enable_ads_bottom}, data = ${ads_data})}" />
</th:block>
</div> </div>
<th:block th:replace="~{modules/post_operate_aside :: post_operate_aside}" /> <th:block th:replace="~{modules/post_operate_aside :: post_operate_aside}" />

View File

@ -13,8 +13,8 @@ spec:
repo: "https://github.com/jiewenhuang/halo-theme-joe3.0" repo: "https://github.com/jiewenhuang/halo-theme-joe3.0"
settingName: "theme-Joe-setting" settingName: "theme-Joe-setting"
configMapName: "theme-Joe-configMap" configMapName: "theme-Joe-configMap"
version: "1.1.6" version: "1.1.7"
require: ">=2.8.0" require: ">=2.11.0"
customTemplates: customTemplates:
page: page:
- name: 留言板 - name: 留言板