新增奇遇界面;修复异常
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
|
||||
> 基于原作者v1.2.5代码修改
|
||||
|
||||
#### v1.2.5-8补丁
|
||||
1. 修复导航栏居中显示失效、分享海报高度、页码更新异常
|
||||
#### v1.2.5-9
|
||||
1. 修复导航栏居中显示失效、分享海报高度、页码更新、加载动画异常
|
||||
2. 优化上一页动画效果
|
||||
3. 新增页面底部页码跳转功能
|
||||
4. 重构课外书(依赖豆瓣插件v1.2.2-3,模板端处理)
|
||||
4. 重构课外书(依赖豆瓣插件v1.2.2-3,模板端处理,支持换行)
|
||||
5. 新增奇遇页面(依赖装备插件,支持换行)
|
||||
6. 新增网易云音乐播放JS函数`play_netease_music(2639350114)`
|
||||
|
||||
#### v1.2.5-8
|
||||
1. 重写作文目录、置顶样式
|
||||
|
||||
+144
-22
@@ -610,7 +610,7 @@
|
||||
.douban_page #post_item .douban_card_item {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
padding: 0 40px;
|
||||
border-right: 1px solid #e5e7eb;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -789,6 +789,7 @@
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: #43584d;
|
||||
white-space: pre-wrap;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-box-orient: vertical;
|
||||
@@ -815,27 +816,6 @@
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@media only screen and (max-width:1359px) {
|
||||
.douban_page #post_item {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.douban_page #post_item .douban_card_item {
|
||||
border-right: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:540px) {
|
||||
.douban_page #post_item .douban_card_item {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.douban_page #post_item .douban_card_inner {
|
||||
column-gap: 11px;
|
||||
row-gap: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.douban_detail_page #post_item {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
@@ -843,6 +823,7 @@
|
||||
.douban_detail_page #post_item .douban_card_item {
|
||||
grid-column: 1 / -1;
|
||||
border-right: none;
|
||||
padding: 35px 58px;
|
||||
}
|
||||
|
||||
.douban_detail_page #post_item .douban_detail_link {
|
||||
@@ -863,3 +844,144 @@
|
||||
-webkit-line-clamp: unset;
|
||||
-webkit-box-orient: initial;
|
||||
}
|
||||
|
||||
@media only screen and (max-width:1359px) {
|
||||
.douban_page #post_item {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.douban_page #post_item .douban_card_item {
|
||||
border-right: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:540px) {
|
||||
.douban_page #post_item .douban_card_item {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.douban_page #post_item .douban_card_inner {
|
||||
column-gap: 11px;
|
||||
row-gap: 0px;
|
||||
}
|
||||
|
||||
.douban_detail_page #post_item .douban_card_item {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.equipments_page #post_item {
|
||||
padding: 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
column-gap: 0;
|
||||
row-gap: 0;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .loading_box,
|
||||
.equipments_page #post_item > .no-results,
|
||||
.equipments_page #post_item > #prev_pagination {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_item {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 20px 40px;
|
||||
border: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_card_inner {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_visual {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
aspect-ratio: 1;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_visual > img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 30px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(
|
||||
circle closest-side at center,
|
||||
rgba(0, 0, 0, 0.5) 0%,
|
||||
rgba(0, 0, 0, 0.5) 70%,
|
||||
rgba(0, 0, 0, 0.3) 85%,
|
||||
rgba(0, 0, 0, 0) 100%
|
||||
);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.2s ease, visibility 0.2s ease;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_visual:hover .equipment_overlay {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_description {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
@media only screen and (max-width:540px) {
|
||||
.equipments_page #post_item {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_item {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_overlay {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.equipments_page #post_item .equipment_description {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-25
@@ -464,6 +464,10 @@ function showListLoading(selector, loadingHtml) {
|
||||
$(selector).html(loadingHtml || DEFAULT_LIST_LOADING_HTML);
|
||||
}
|
||||
|
||||
function hidePagination(selector) {
|
||||
$(selector).hide();
|
||||
}
|
||||
|
||||
function setCategoryLinkActive($link, childSelector) {
|
||||
$link.addClass('active').parent().siblings().children(childSelector || 'a').removeClass('active');
|
||||
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
|
||||
@@ -1203,12 +1207,8 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
|
||||
url: cat,
|
||||
headers: HTML_PAGE_AJAX_HEADERS,
|
||||
beforeSend: function () {
|
||||
const $pagingArea = $('#t_pagination .post-paging');
|
||||
if ($pagingArea.length) {
|
||||
$pagingArea.html('<div uk-spinner></div>');
|
||||
} else {
|
||||
showListLoading('.moment_list');
|
||||
}
|
||||
showListLoading('.moment_list');
|
||||
hidePagination('#t_pagination');
|
||||
},
|
||||
success: function (data) {
|
||||
setCategoryLinkActive($this);
|
||||
@@ -1271,12 +1271,8 @@ $(document).on('click', '.friends_cat_nav .cat-link', function () {
|
||||
url: url,
|
||||
headers: HTML_PAGE_AJAX_HEADERS,
|
||||
beforeSend: function () {
|
||||
const $pagingArea = $('#t_pagination .post-paging');
|
||||
if ($pagingArea.length) {
|
||||
$pagingArea.html('<div uk-spinner></div>');
|
||||
} else {
|
||||
showListLoading('.moment_list');
|
||||
}
|
||||
showListLoading('.moment_list');
|
||||
hidePagination('#t_pagination');
|
||||
},
|
||||
success: function (data) {
|
||||
setCategoryLinkActive($this);
|
||||
@@ -1556,12 +1552,8 @@ $(document).ready(function () {
|
||||
url: url,
|
||||
headers: HTML_PAGE_AJAX_HEADERS,
|
||||
beforeSend: function () {
|
||||
const $pagingArea = $('#p_pagination .post-paging');
|
||||
if ($pagingArea.length) {
|
||||
$pagingArea.html('<div uk-spinner></div>');
|
||||
} else {
|
||||
showListLoading("#photos_item", PHOTO_LIST_LOADING_HTML);
|
||||
}
|
||||
showListLoading("#photos_item", PHOTO_LIST_LOADING_HTML);
|
||||
hidePagination('#p_pagination');
|
||||
},
|
||||
success: function (data) {
|
||||
setCategoryLinkActive($this);
|
||||
@@ -1815,12 +1807,8 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
|
||||
url: cat, // 完全保留原有请求URL,不修改
|
||||
headers: HTML_PAGE_AJAX_HEADERS,
|
||||
beforeSend: function () {
|
||||
const $pagingArea = $('#pagination .post-paging');
|
||||
if ($pagingArea.length) {
|
||||
$pagingArea.html('<div uk-spinner></div>');
|
||||
} else {
|
||||
showListLoading('.norpost_list');
|
||||
}
|
||||
showListLoading('.norpost_list');
|
||||
hidePagination('#pagination');
|
||||
},
|
||||
success: function (data) {
|
||||
setCategoryLinkActive($this);
|
||||
@@ -1831,7 +1819,7 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
|
||||
|
||||
updateLoadMorePagination('#pagination', '.norpost_list', data, '.arc_pagenav');
|
||||
|
||||
$('.loading_box').remove();
|
||||
$('.norpost_list .loading_box').remove();
|
||||
initAgree();
|
||||
lazyLoadInstance.update();
|
||||
$('.posts_cat_nav ul li a').removeClass('disabled');
|
||||
|
||||
@@ -41,38 +41,108 @@ var playlist = [];
|
||||
var post_playlist = [];
|
||||
var Paused = true;
|
||||
var playLrc = '';
|
||||
var standaloneTrack = false;
|
||||
|
||||
var m_cover = $('.player_mod .m_cover img');
|
||||
var m_title = $('.player_mod .m_info h2');
|
||||
var m_artist = $('.player_mod .m_info small');
|
||||
|
||||
// 将歌曲数据交给主题播放器。source 用于同步文章或片刻中的播放按钮状态。
|
||||
function playPlayerTrack(data, options) {
|
||||
options = options || {};
|
||||
var source = options.source ? $(options.source) : $();
|
||||
var player = source.closest('.pix_player');
|
||||
var audio = audiobox[0];
|
||||
var currentSource = audio.getAttribute('src') || '';
|
||||
|
||||
if (!data || !data.url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('click', '.play_btn', function () {
|
||||
$('.player_box').append(audiobox);
|
||||
$('.pix_player').removeClass('playing');
|
||||
$(this).parents('.pix_player').addClass('playing');
|
||||
var url = $(this).attr('data');
|
||||
var lrc = $(this).attr('lrc');
|
||||
var audio_s = $('#pix_player').attr('src');
|
||||
if (player.length) {
|
||||
player.addClass('playing');
|
||||
}
|
||||
|
||||
var meta = $(this).siblings('.player_meta').find('.title');
|
||||
playLrc = lrc;
|
||||
m_title.text(meta.find('.name').text());
|
||||
m_artist.text(meta.find('.author').text());
|
||||
m_cover.attr('src', $('.pix_player.playing .player_thum img').attr('src'));
|
||||
playLrc = data.lrc || '';
|
||||
m_title.text(data.title || data.name || '未知歌曲');
|
||||
m_artist.text(data.author || data.artist || '未知歌手');
|
||||
if (data.pic) {
|
||||
m_cover.attr('src', data.pic);
|
||||
}
|
||||
|
||||
if (audio_s == '' || audio_s !== url) {
|
||||
$('#pix_player').attr('src', url);
|
||||
audiobox[0].play();
|
||||
} else {
|
||||
standaloneTrack = options.standalone === true;
|
||||
initAudio();
|
||||
if (options.toggle && currentSource === data.url) {
|
||||
pasued();
|
||||
} else {
|
||||
audio.setAttribute('src', data.url);
|
||||
var playPromise = audio.play();
|
||||
if (playPromise && typeof playPromise.catch === 'function') {
|
||||
playPromise.catch(function () {
|
||||
// 浏览器阻止自动播放时,保留播放器状态并等待用户点击播放。
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(".play_btn").html("<i class='ri-play-line'></i>");
|
||||
return true;
|
||||
}
|
||||
|
||||
initAudio();
|
||||
$(document).on('click', '.play_btn', function () {
|
||||
var meta = $(this).siblings('.player_meta').find('.title');
|
||||
playPlayerTrack({
|
||||
url: $(this).attr('data'),
|
||||
lrc: $(this).attr('lrc'),
|
||||
title: meta.find('.name').text(),
|
||||
author: meta.find('.author').text(),
|
||||
pic: $(this).closest('.pix_player').find('.player_thum img').attr('src')
|
||||
}, {
|
||||
source: this,
|
||||
toggle: true,
|
||||
standalone: false
|
||||
});
|
||||
});
|
||||
|
||||
function musicApiUrl(server, type, id) {
|
||||
var api = Theme.play.pix_mu_api || 'https://api.i-meto.com/meting/api';
|
||||
var separator = api.indexOf('?') === -1 ? '?' : '&';
|
||||
return api + separator + 'server=' + encodeURIComponent(server) +
|
||||
'&type=' + encodeURIComponent(type) + '&id=' + encodeURIComponent(id) +
|
||||
'&r=' + Math.random();
|
||||
}
|
||||
|
||||
// 通过网易云歌曲 ID 获取歌曲数据,并使用主题播放器播放。
|
||||
function play_netease_music(songId) {
|
||||
var id = String(songId == null ? '' : songId).trim();
|
||||
if (!id) {
|
||||
if (typeof cocoMessage !== 'undefined') cocoMessage.error('网易云歌曲ID不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: musicApiUrl('netease', 'song', id)
|
||||
}).done(function (res) {
|
||||
var data = Array.isArray(res) ? res[0] : res;
|
||||
if (res && !Array.isArray(res) && Array.isArray(res.data)) {
|
||||
data = res.data[0];
|
||||
}
|
||||
if (!data || !data.url) {
|
||||
if (typeof cocoMessage !== 'undefined') cocoMessage.error('网易云歌曲无法播放');
|
||||
return;
|
||||
}
|
||||
playPlayerTrack(data, { standalone: true });
|
||||
}).fail(function () {
|
||||
if (typeof cocoMessage !== 'undefined') cocoMessage.error('网易云歌曲加载失败');
|
||||
});
|
||||
}
|
||||
|
||||
function playNeteaseMusic(songId) {
|
||||
play_netease_music(songId);
|
||||
}
|
||||
|
||||
// 初始化函数
|
||||
function initAudio() {
|
||||
audiobox[0].addEventListener("play", audioplay);
|
||||
@@ -85,6 +155,7 @@ function initAudio() {
|
||||
|
||||
//音乐结束触发
|
||||
function endplay() {
|
||||
if (standaloneTrack || !playlist[0] || playlist[0].length === 0) return;
|
||||
var index = $('.musci_list_box li.active').index() + 1;
|
||||
var max = $('.musci_list_box li').length;
|
||||
var new_mid = 0;
|
||||
@@ -223,6 +294,7 @@ function autoload_music() {
|
||||
type: "get",
|
||||
url: url,
|
||||
success: function (res) {
|
||||
if (standaloneTrack) return;
|
||||
if (res.length > 0) {
|
||||
var new_mid = 0;
|
||||
if (loop == "none") {
|
||||
@@ -255,6 +327,7 @@ function autoload_music() {
|
||||
|
||||
//播放选中音乐
|
||||
function mulist_play(index) {
|
||||
standaloneTrack = false;
|
||||
audiobox[0].removeEventListener("play", audioplay);
|
||||
audiobox[0].removeEventListener("pause", audiopause);
|
||||
$(".pix_player.playing .play_btn").html("<i class='ri-play-line'></i>");
|
||||
@@ -493,6 +566,7 @@ function autoload_posts_music() {
|
||||
$(document).on('click', '.s_play_btn', function () {
|
||||
mu_box_show();
|
||||
// 1. 同步更新文章内播放列表选中状态
|
||||
standaloneTrack = false;
|
||||
$('.posts_mu_list li').removeClass('active');
|
||||
$(this).parent().addClass('active');
|
||||
// 2. 同步更新全局播放列表选中状态(避免后续操作信息混乱)
|
||||
|
||||
+18
-79
@@ -8,87 +8,26 @@
|
||||
|
||||
<th:block th:replace="~{modules/header}" />
|
||||
|
||||
<div id="pjax-container">
|
||||
<div id="pjax-container" th:with="
|
||||
page = ${#lists.isEmpty(param.page) or #strings.isEmpty(param.page[0]) ? 1 : param.page[0]},
|
||||
selectedTag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
|
||||
equipmentGroups = ${groups},
|
||||
pageSize = ${equipments.size}
|
||||
">
|
||||
|
||||
<div class="blog_list">
|
||||
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
|
||||
<!-- 未筛选时直接查询全部装备。 -->
|
||||
<th:block th:if="${#strings.isEmpty(selectedTag)}"
|
||||
th:with="equipmentPage = ${equipmentFinder.list(page, pageSize)}">
|
||||
<th:block th:replace="~{macro/equipment :: equipment-page(${equipmentPage},${equipmentGroups},${selectedTag})}"></th:block>
|
||||
</th:block>
|
||||
|
||||
<div id="post_item" class="moment_list">
|
||||
<!-- 作者姓名不为空才渲染朋友圈动态 -->
|
||||
<div th:id="${'post-'+friend.metadata.name}"
|
||||
class="loop_content p_item moment_item uk-animation-slide-bottom-small"
|
||||
th:if="${friend.spec != null and not #strings.isEmpty(friend.spec.author)}"
|
||||
th:with="postInfo = ${friend}, spec = ${friend.spec}">
|
||||
|
||||
<div class="p_item_inner">
|
||||
|
||||
<div class="list_user_meta">
|
||||
<div class="avatar">
|
||||
<img th:src="@{${spec.logo}}">
|
||||
</div>
|
||||
|
||||
<div class="name">
|
||||
<div class="avatar_title">
|
||||
<a target="_blank" th:href="${spec.authorUrl}">
|
||||
[[${spec.author}]]
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<time itemprop="datePublished"
|
||||
th:datetime="${#dates.format(spec.pubDate, 'yyyy-MM-dd HH:mm')}">
|
||||
<th:block th:replace="~{modules/widgets/time :: time(${spec.pubDate})}">
|
||||
</th:block>
|
||||
</time>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blog_content">
|
||||
<div class="entry-content">
|
||||
<div class="p_title moment-collapse-container">
|
||||
<a th:if="${not #strings.isEmpty(spec.postLink)}"
|
||||
target="_blank" th:href="${spec.postLink}">
|
||||
<div th:utext="${spec.description ?: '无内容'}"></div>
|
||||
</a>
|
||||
<div th:unless="${not #strings.isEmpty(spec.postLink)}"
|
||||
th:utext="${spec.description ?: '无内容'}"></div>
|
||||
</div>
|
||||
<div class="img_list img-dynamic-container">
|
||||
<div class="list_inner"
|
||||
th:with="imgRaw=${spec.imageFiles},isImgList=${not #strings.isEmpty(imgRaw)}"
|
||||
th:attr="num=${isImgList ? #arrays.length(imgRaw.split(',')) : 0}">
|
||||
<th:block th:if="${isImgList}">
|
||||
<th:block th:with="imgArray=${imgRaw.split(',')}">
|
||||
<th:block th:each="url : ${imgArray}"
|
||||
th:with="cleanUrl=${#strings.trim(url)}">
|
||||
<span class="fancybox mo_img"
|
||||
th:if="${not #strings.isEmpty(cleanUrl)}"
|
||||
th:href="|/upload/image-host/${cleanUrl}|"
|
||||
th:data-fancybox="${'post-' + postInfo.metadata.name}">
|
||||
<img class="lazy"
|
||||
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
|
||||
th:data-src="|/upload/image-host/${cleanUrl}|"
|
||||
alt="">
|
||||
</span>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 作者姓名为空:只展示404图片 -->
|
||||
<div th:if="${friend.spec == null or #strings.isEmpty(friend.spec.author)}" style="text-align:center;padding:80px 0;">
|
||||
<img src="/themes/theme-pix/assets/img/no-data.webp"style="max-width:400px;width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="comment_form_reset"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- URL 中的 tag 使用分组 displayName,Finder 查询使用分组 metadata.name。 -->
|
||||
<th:block th:unless="${#strings.isEmpty(selectedTag)}" th:each="group : ${equipmentGroups}">
|
||||
<th:block th:if="${#strings.equals(selectedTag, group.spec.displayName) or #strings.equals(selectedTag, group.metadata.name)}"
|
||||
th:with="equipmentPage = ${equipmentFinder.list(page, pageSize, group.metadata.name)}">
|
||||
<th:block th:replace="~{macro/equipment :: equipment-page(${equipmentPage},${equipmentGroups},${selectedTag})}"></th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<th:block th:fragment="equipment-page(equipmentPage,equipmentGroups,selectedTag)">
|
||||
|
||||
<div class="blog_list equipments_page">
|
||||
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
|
||||
|
||||
<div class="friends_cat_nav equipments_cat_nav">
|
||||
<ul id="cat_nav_items">
|
||||
<li>
|
||||
<a th:attr="data-href=@{/equipments}"
|
||||
th:classappend="${#strings.isEmpty(selectedTag) ? 'active' : ''}"
|
||||
class="cat-link">
|
||||
<span>全部</span>
|
||||
</a>
|
||||
</li>
|
||||
<li th:each="group : ${equipmentGroups}">
|
||||
<a th:attr="data-href=@{/equipments(tag=${group.spec.displayName})}"
|
||||
th:classappend="${#strings.equals(selectedTag, group.spec.displayName) or #strings.equals(selectedTag, group.metadata.name) ? 'active' : ''}"
|
||||
class="cat-link">
|
||||
<span th:text="${group.spec.displayName}">分组</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="post_item" class="moment_list equipment_list">
|
||||
<article th:each="equipment : ${equipmentPage.items}"
|
||||
class="loop_content p_item moment_item equipment_item uk-animation-slide-bottom-small"
|
||||
th:if="${equipment.spec != null and not #strings.isEmpty(equipment.spec.cover)}">
|
||||
|
||||
<div class="p_item_inner equipment_card_inner">
|
||||
<div class="equipment_visual">
|
||||
<img loading="lazy" th:src="${equipment.spec.cover}"
|
||||
th:alt="${equipment.spec.description}">
|
||||
<span class="equipment_overlay"
|
||||
th:if="${not #strings.isEmpty(equipment.spec.description)}">
|
||||
<span class="equipment_description" th:text="${equipment.spec.description}">描述</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<th:block th:if="${#lists.isEmpty(equipmentPage.items)}">
|
||||
<th:block th:replace="~{macro/tpl/content-none}" />
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
<th:block th:if="${equipmentPage.totalPages > 1}">
|
||||
<div id="t_pagination">
|
||||
<div class="post-paging" th:with="_page = ${equipmentPage.page + 1}">
|
||||
<a th:if="${equipmentPage.hasNext() and #strings.isEmpty(selectedTag)}"
|
||||
th:attr="data=@{/equipments(page=${_page})}"
|
||||
th:text="${theme.config.base_set.site_page}"></a>
|
||||
<a th:if="${equipmentPage.hasNext() and not #strings.isEmpty(selectedTag)}"
|
||||
th:attr="data=@{/equipments(tag=${selectedTag},page=${_page})}"
|
||||
th:text="${theme.config.base_set.site_page}"></a>
|
||||
<form class="page-jump-form" method="get" action="/equipments">
|
||||
<span class="page-jump-label">转到</span>
|
||||
<input th:if="${not #strings.isEmpty(selectedTag)}" type="hidden" name="tag"
|
||||
th:value="${selectedTag}" />
|
||||
<span class="page-jump-input-wrap">
|
||||
<button class="page-jump-step page-jump-step-down" type="button"
|
||||
title="减少页码" aria-label="减少页码">
|
||||
<i class="ri-subtract-line" aria-hidden="true"></i>
|
||||
</button>
|
||||
<input class="page-jump-input" type="number" name="page" min="1"
|
||||
th:max="${equipmentPage.totalPages}" th:value="${equipmentPage.page}"
|
||||
inputmode="numeric" aria-label="页码" autocomplete="off" required />
|
||||
<button class="page-jump-step page-jump-step-up" type="button"
|
||||
title="增加页码" aria-label="增加页码">
|
||||
<i class="ri-add-line" aria-hidden="true"></i>
|
||||
</button>
|
||||
</span>
|
||||
<span class="page-jump-total">/ [[${equipmentPage.totalPages}]]</span>
|
||||
<button class="page-jump-submit" type="submit" title="跳转到指定页"
|
||||
aria-label="跳转到指定页">
|
||||
<i class="ri-arrow-right-line" aria-hidden="true"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
<div id="comment_form_reset"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
@@ -1,5 +1,5 @@
|
||||
<th:block th:fragment="footer">
|
||||
<th:block th:with="customJsVersion='1.2.5-8'">
|
||||
<th:block th:with="customJsVersion='1.2.5-9'">
|
||||
|
||||
<!-- 奇遇容器 -->
|
||||
<div class="center-img-container" id="centerImgContainer">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<th:block th:fragment="head" th:with="customJsVersion=${'1.2.5-8'}">
|
||||
<th:block th:fragment="head" th:with="customJsVersion=${'1.2.5-9'}">
|
||||
<th:block th:replace="~{'modules/variables/msg'}" />
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ spec:
|
||||
issues: "https://github.com/chengzhongxue/halo-theme-pix/issues"
|
||||
settingName: "theme-pix-setting"
|
||||
configMapName: "theme-pix-configMap"
|
||||
version: "1.2.5-8"
|
||||
version: "1.2.5-9"
|
||||
require: ">=2.20.0"
|
||||
customTemplates:
|
||||
page:
|
||||
|
||||
Reference in New Issue
Block a user