3 Commits

Author SHA1 Message Date
anian d575d584cb 新增奇遇界面;修复异常 2026-07-26 21:52:40 +08:00
anian 03e5e2f529 重构课外书;修复异常;优化体验 2026-07-26 06:55:48 +08:00
anian 711cff953b 新增页码跳转;修复异常;优化效果 2026-07-25 15:34:40 +08:00
18 changed files with 1085 additions and 814 deletions
+8
View File
@@ -2,6 +2,14 @@
> 基于原作者v1.2.5代码修改
#### v1.2.5-9
1. 修复导航栏居中显示失效、分享海报高度、页码更新、加载动画异常
2. 优化上一页动画效果
3. 新增页面底部页码跳转功能
4. 重构课外书(依赖豆瓣插件v1.2.2-3,模板端处理,支持换行)
5. 新增奇遇页面(依赖装备插件,支持换行)
6. 新增网易云音乐播放JS函数`play_netease_music(2639350114)`
#### v1.2.5-8
1. 重写作文目录、置顶样式
2. 更换(通知书等)域名
+238 -78
View File
@@ -584,42 +584,7 @@
}
}
#douban_pagination {
display: none;
padding: 30px;
text-align: center;
align-items: center;
justify-content: center;
border-top: 1px solid var(--pix-background);
}
#douban_pagination .post-paging {
display: flex;
align-items: center;
justify-content: center;
min-height: 38px;
}
#douban_pagination a {
padding: 10px 15px;
background: var(--pix-theme);
color: #fff;
border-radius: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
flex: none;
width: auto;
text-align: center;
}
#douban_pagination .douban-more-loading {
display: inline-flex;
align-items: center;
justify-content: center;
}
.douban_page #douban_item {
.douban_page #post_item {
padding: 0;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -628,12 +593,21 @@
align-items: center;
}
.douban_page #douban_item .loading_box {
.douban_page #post_item .loading_box {
text-align: center;
grid-column: 1 / -1;
}
.douban_page #douban_item .douban_card_item {
.douban_page #post_item > .no-results {
grid-column: 1 / -1;
width: 100%;
}
.douban_page #post_item > #prev_pagination {
grid-column: 1 / -1;
}
.douban_page #post_item .douban_card_item {
width: 100%;
margin: 0;
padding: 0 40px;
@@ -642,11 +616,11 @@
align-items: flex-start;
}
.douban_page #douban_item .douban_card_item:nth-child(2n) {
.douban_page #post_item .douban_card_item:nth-child(2n) {
border-right: none;
}
.douban_page #douban_item .douban_card_inner {
.douban_page #post_item .douban_card_inner {
display: grid !important;
grid-template-columns: 100px 1fr;
grid-template-rows: auto auto 1fr;
@@ -658,7 +632,7 @@
align-items: start;
}
.douban_page #douban_item .douban_media_col {
.douban_page #post_item .douban_media_col {
width: 100px;
display: flex;
flex-direction: column;
@@ -669,16 +643,16 @@
}
.douban_page #douban_item {
.douban_page #post_item {
align-items: stretch !important;
}
.douban_page #douban_item .douban_poster_link,
.douban_page #douban_item .douban_poster_img {
.douban_page #post_item .douban_poster_link,
.douban_page #post_item .douban_poster_img {
width: 100px;
}
.douban_page #douban_item .douban_poster_img {
.douban_page #post_item .douban_poster_img {
display: block;
height: 140px;
object-fit: cover;
@@ -687,34 +661,75 @@
}
.douban_page #douban_item .douban_rating_wrap {
.douban_page #post_item .douban_rating_wrap {
display: none;
}
.douban_page #douban_item .douban_text_col {
.douban_page #post_item .douban_text_col {
display: contents;
}
.douban_page #douban_item .douban_title_row {
.douban_page #post_item .douban_title_row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
grid-column: 1 / -1;
grid-row: 1;
margin-bottom: 6px;
text-align: left;
}
.douban_page #douban_item .douban_title_text {
.douban_page #post_item .douban_title_text {
min-width: 0;
overflow: hidden;
color: var(--pix-theme);
font-size: 16px;
line-height: 1.35;
font-weight: 650;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
}
.douban_page #douban_item .douban_title_text:hover {
color: rgb(28, 156, 90);
.douban_page #post_item .douban_title_text:hover {
color: var(--hilight-color);
}
.douban_page #douban_item .douban_sub_meta {
.douban_page #post_item .douban_title_text_plain,
.douban_page #post_item .douban_title_text_plain:hover {
color: #000;
}
.douban_page #post_item .douban_detail_link {
flex: 0 0 auto;
width: auto;
height: auto;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px 5px;
border-radius: 4px;
color: var(--pix-theme);
font-size: 13px;
line-height: 1.4;
text-decoration: none;
visibility: hidden;
pointer-events: none;
transition: color 0.2s ease, background-color 0.2s ease;
}
.douban_page #post_item .douban_detail_link.is-visible {
visibility: visible;
pointer-events: auto;
}
.douban_page #post_item .douban_detail_link:hover {
background: var(--pix-background);
color: var(--hilight-color);
}
.douban_page #post_item .douban_sub_meta {
display: flex;
align-items: center;
gap: 0px;
@@ -725,24 +740,24 @@
align-self: start;
}
.douban_page #douban_item .douban_time_text {
.douban_page #post_item .douban_time_text {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
background: rgba(168, 85, 247, 0.12);
color: #a855f7;
color: #8b5cf6;
font-size: 12px;
line-height: 1.4;
font-weight: 500;
margin-right: 7px;
}
.douban_page #douban_item .douban_type_badge {
.douban_page #post_item .douban_type_badge {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
background: rgba(56, 189, 248, 0.14);
color: #0369a1;
background: rgba(14, 165, 233, 0.13);
color: #0284c7;
font-size: 12px;
line-height: 1.4;
vertical-align: middle;
@@ -750,7 +765,7 @@
margin-right: 7px;
}
.douban_page #douban_item .douban_score_badge {
.douban_page #post_item .douban_score_badge {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
@@ -762,30 +777,26 @@
font-weight: 500;
}
.douban_page #douban_item .douban_content_box {
color: #374151;
.douban_page #post_item .douban_content_box {
color: #55716a;
grid-column: 2;
grid-row: 3;
align-self: start;
}
.douban_page #douban_item .douban_content_main {
.douban_page #post_item .douban_content_main {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: #1f2937;
display: block;
color: #43584d;
white-space: pre-wrap;
display: -webkit-box;
overflow: hidden;
max-height: 89.6px;
transition: max-height 0.35s ease;
will-change: max-height;
-webkit-box-orient: vertical;
-webkit-line-clamp: 5;
}
.douban_page #douban_item .douban_content_main.is-expanded {
max-height: 10000px;
}
.douban_page #douban_item .douban_expand_btn {
.douban_page #post_item .douban_expand_btn {
display: inline-block;
padding: 0;
color: var(--pix-theme);
@@ -798,30 +809,179 @@
line-height: 1.6;
}
.douban_page #douban_item .douban_content_meta {
.douban_page #post_item .douban_content_meta {
margin: 8px 0 0;
font-size: 12px;
color: #6b7280;
color: #76937f;
line-height: 1.5;
}
.douban_detail_page #post_item {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.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 {
display: none;
}
.douban_detail_page #post_item .douban_title_text {
overflow: visible;
text-overflow: clip;
white-space: normal;
overflow-wrap: anywhere;
}
.douban_detail_page #post_item .douban_content_main {
display: block;
overflow: visible;
overflow-wrap: anywhere;
-webkit-line-clamp: unset;
-webkit-box-orient: initial;
}
@media only screen and (max-width:1359px) {
.douban_page #douban_item {
.douban_page #post_item {
grid-template-columns: 1fr;
}
.douban_page #douban_item .douban_card_item {
.douban_page #post_item .douban_card_item {
border-right: none !important;
}
}
@media only screen and (max-width:540px) {
.douban_page #douban_item .douban_card_item {
padding: 0 15px;
.douban_page #post_item .douban_card_item {
padding: 0 20px;
}
.douban_page #douban_item .douban_card_inner {
.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;
}
}
+145 -2
View File
@@ -1446,13 +1446,25 @@ a.close_local {
#pagination,
#p_pagination,
#prev_pagination {
padding: 30px;
padding: 18px 10px;
text-align: center;
display: flex;
justify-content: center;
border-top: 1px solid var(--pix-background);
}
#t_pagination .post-paging,
#pagination .post-paging,
#p_pagination .post-paging,
#prev_pagination .post-paging {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 15px;
width: 100%;
}
#t_pagination a,
#pagination a,
#p_pagination a,
@@ -1464,6 +1476,137 @@ a.close_local {
display: flex;
}
#t_pagination .page-jump-form,
#pagination .page-jump-form,
#p_pagination .page-jump-form {
display: inline-flex;
align-items: center;
gap: 4px;
color: #7aa1a1;
font-size: 15px;
line-height: 1;
}
#t_pagination .page-jump-input,
#pagination .page-jump-input,
#p_pagination .page-jump-input {
width: 48px;
height: 30px;
padding: 0 4px;
border: 1px solid var(--pix-background);
border-radius: 0;
background: #fff;
color: #55716a;
font-size: 15px;
line-height: 30px;
text-align: center;
box-sizing: border-box;
-moz-appearance: textfield;
}
#t_pagination .page-jump-input-wrap,
#pagination .page-jump-input-wrap,
#p_pagination .page-jump-input-wrap {
display: inline-flex;
height: 30px;
align-items: stretch;
flex: 0 0 auto;
}
#t_pagination .page-jump-step,
#pagination .page-jump-step,
#p_pagination .page-jump-step {
width: 18px;
height: 30px;
flex: 0 0 18px;
padding: 0;
border: 1px solid var(--pix-background);
border-radius: 0;
background: #e8f5ed;
color: var(--pix-theme);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
line-height: 1;
font-family: inherit;
transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
#t_pagination .page-jump-step-down,
#pagination .page-jump-step-down,
#p_pagination .page-jump-step-down {
border-right: 0;
border-radius: 4px 0 0 4px;
}
#t_pagination .page-jump-step-up,
#pagination .page-jump-step-up,
#p_pagination .page-jump-step-up {
border-left: 0;
border-radius: 0 4px 4px 0;
}
#t_pagination .page-jump-step:hover:not(:disabled),
#pagination .page-jump-step:hover:not(:disabled),
#p_pagination .page-jump-step:hover:not(:disabled) {
background: var(--pix-theme);
color: #fff;
}
#t_pagination .page-jump-step:disabled,
#pagination .page-jump-step:disabled,
#p_pagination .page-jump-step:disabled {
opacity: .35;
cursor: not-allowed;
}
#t_pagination .page-jump-step i,
#pagination .page-jump-step i,
#p_pagination .page-jump-step i {
font-size: 12px;
}
#t_pagination .page-jump-input:focus,
#pagination .page-jump-input:focus,
#p_pagination .page-jump-input:focus {
border-color: var(--pix-theme);
}
#t_pagination .page-jump-input::-webkit-inner-spin-button,
#t_pagination .page-jump-input::-webkit-outer-spin-button,
#pagination .page-jump-input::-webkit-inner-spin-button,
#pagination .page-jump-input::-webkit-outer-spin-button,
#p_pagination .page-jump-input::-webkit-inner-spin-button,
#p_pagination .page-jump-input::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
appearance: none;
}
#t_pagination .page-jump-submit,
#pagination .page-jump-submit,
#p_pagination .page-jump-submit {
width: 30px;
height: 30px;
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
color: var(--pix-theme);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-family: inherit;
}
#t_pagination .page-jump-submit i,
#pagination .page-jump-submit i,
#p_pagination .page-jump-submit i {
font-size: 20px;
}
#prev_pagination {
overflow: hidden;
max-height: 0;
@@ -5599,7 +5742,7 @@ a.m_loop {
width: 330px;
padding: 5px;
border-radius: 5px;
min-height: 450px;
max-height: 450px;
}
.poster_box .loading_box {
+14 -461
View File
@@ -246,445 +246,25 @@ function confirmPixarAction() {
customLogout();
}
// 豆瓣页:分类筛选 + AJAX加载(不依赖 finder API
function init_douban_page() {
var $page = $('.douban_page');
if ($page.length === 0) {
function initDoubanDetailLinks() {
document.querySelectorAll('.douban_page:not(.douban_detail_page) .douban_card_item').forEach(function (card) {
var link = card.querySelector('.douban_detail_link');
var title = card.querySelector('.douban_title_text');
var content = card.querySelector('.douban_content_main');
if (!link || !title || !content) {
return;
}
var $list = $('#douban_item');
var $pagination = $('#douban_pagination');
var $paginationBtn = $('#douban_pagination a');
if ($list.length === 0 || $paginationBtn.length === 0) {
return;
}
var state = {
page: 1,
size: 10,
type: '',
loading: false
};
function escapeHtml(input) {
if (input === null || input === undefined) {
return '';
}
return String(input)
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
}
function formatTime(isoTime) {
if (!isoTime) {
return '--';
}
var date = new Date(isoTime);
if (Number.isNaN(date.getTime())) {
return '--';
}
var year = date.getFullYear();
var month = String(date.getMonth() + 1).padStart(2, '0');
var day = String(date.getDate()).padStart(2, '0');
return year + '-' + month + '-' + day;
}
function buildRequestUrl(page, type) {
var query = new URLSearchParams({
page: String(page),
size: String(state.size)
});
if (type) {
query.append('type', type);
}
return '/apis/api.douban.moony.la/v1alpha1/doubanmovies?' + query.toString();
}
function renderEmpty() {
return '<div class="loading_box"><img src="/themes/theme-pix/assets/img/no-data.webp" alt="暂无内容" style="max-width: 280px; width: 100%; height: auto;"></div>';
}
function parseScoreValue(rawScore) {
if (rawScore === null || rawScore === undefined || rawScore === '') {
return null;
}
var scoreText = String(rawScore);
var matched = scoreText.match(/(\d+(?:\.\d+)?)/);
if (!matched || !matched[1]) {
return null;
}
var scoreNumber = parseFloat(matched[1]);
if (Number.isNaN(scoreNumber)) {
return null;
}
if (scoreNumber < 0) {
scoreNumber = 0;
}
if (scoreNumber > 5) {
scoreNumber = 5;
}
return scoreNumber;
}
function renderTypeNav(typeList) {
var $navList = $('.douban_cat_nav ul');
if ($navList.length === 0) {
return;
}
var navHtml = ['<li><a data-type="" class="cat-link active">全部<span></span></a></li>'];
var seen = {};
if (Array.isArray(typeList)) {
typeList.forEach(function (item) {
var key = item && item.key !== undefined && item.key !== null ? String(item.key).trim() : '';
if (!key || seen[key]) {
return;
}
seen[key] = true;
var safeKey = escapeHtml(key);
navHtml.push('<li><a data-type="' + safeKey + '" class="cat-link">' + safeKey + '<span></span></a></li>');
var titleOverflow = title.scrollWidth > title.clientWidth;
var contentOverflow = content.scrollHeight > content.clientHeight + 1;
link.classList.toggle('is-visible', titleOverflow || contentOverflow);
});
}
$navList.html(navHtml.join(''));
}
function renderScore(rawScore) {
var scoreValue = parseScoreValue(rawScore);
if (scoreValue === null) {
return '暂无评分';
}
var formatted = scoreValue.toFixed(1);
return formatted + ' / 5.0';
}
function renderItem(item) {
var spec = item && item.spec ? item.spec : {};
var faves = item && item.faves ? item.faves : {};
var name = escapeHtml(spec.name || '未命名条目');
var link = escapeHtml(spec.link || 'javascript:void(0);');
var poster = escapeHtml(spec.poster || '/themes/theme-pix/assets/img/theme/banner-all.webp');
var rawScore = faves.score || spec.score || '';
var createTime = escapeHtml(formatTime(faves.createTime));
var dataType = escapeHtml(spec.type || '--');
var contentText = escapeHtml(spec.cardSubtitle || '暂无内容简介');
var pid = escapeHtml((item.metadata && item.metadata.name) || ('douban-' + Date.now()));
var scoreText = renderScore(rawScore);
return '' +
'<div id="post-' + pid + '" class="loop_content p_item moment_item douban_card_item uk-animation-slide-bottom-small">' +
' <div class="p_item_inner douban_card_inner">' +
' <div class="douban_text_col">' +
' <div class="douban_title_row">' +
' <a class="douban_title_text" target="_blank" rel="noopener" href="' + link + '">' +
' ' + name +
' </a>' +
' </div>' +
' <div class="douban_media_col">' +
' <img class="douban_poster_img" src="' + poster + '" alt="' + name + '">' +
' </div>' +
' <div class="douban_sub_meta">' +
' <time class="douban_time_text" datetime="' + createTime + '">' + createTime + '</time>' +
' <span class="douban_type_badge">' + dataType + '</span>' +
' <span class="douban_score_badge">' + escapeHtml(scoreText) + '</span>' +
' </div>' +
' <div class="douban_content_box">' +
' <p class="douban_content_main douban_content_collapsed" data-full="' + escapeHtml(contentText) + '">' + contentText + '</p>' +
' <a class="douban_expand_btn" style="display:none;">展开</a>' +
' </div>' +
' </div>' +
' </div>' +
'</div>';
}
function updatePagination(hasNext, nextPage) {
if (hasNext) {
$paginationBtn
.attr('data-next-page', String(nextPage))
.attr('data', String(nextPage))
.text((window.Theme && Theme.site_page) ? Theme.site_page : '翻阅更多')
.show();
$pagination.removeClass('u-hide').css('display', 'flex');
} else {
$paginationBtn.removeAttr('data-next-page').removeAttr('data');
$paginationBtn.hide();
$pagination.hide();
}
}
function renderList(data, isAppend) {
var items = (data && data.items) ? data.items : [];
if (!isAppend) {
$list.empty();
}
if (items.length === 0 && !isAppend) {
$list.html(renderEmpty());
updatePagination(false, 1);
return;
}
var html = items.map(renderItem).join('');
$list.append($(html).fadeIn(300));
if (typeof lazyLoadInstance !== 'undefined') {
lazyLoadInstance.update();
}
if (typeof initializeMomentFold === 'function') {
initializeMomentFold();
}
initializeDoubanExpand();
updatePagination(!!data.hasNext, (data.page || state.page) + 1);
}
function initializeDoubanExpand() {
var collapsedHeight = 89.6;
$(document).off('click.doubanExpand', '.douban_expand_btn').on('click.doubanExpand', '.douban_expand_btn', function (e) {
e.preventDefault();
var $btn = $(this);
var $content = $btn.prev('.douban_content_main');
if ($content.length === 0) {
return;
}
if ($content.hasClass('is-expanded')) {
$content.removeClass('is-expanded');
$content.css('max-height', collapsedHeight + 'px');
$btn.text('展开');
} else {
var contentEl = $content[0];
var fullHeight = $content.data('fullHeight') || (contentEl ? contentEl.scrollHeight : 0);
$content.addClass('is-expanded');
$content.css('max-height', fullHeight + 'px');
$btn.text('收起');
}
});
$('.douban_content_main').each(function () {
var $content = $(this);
var $btn = $content.next('.douban_expand_btn');
if ($btn.length === 0) {
return;
}
var scrollHeight = this.scrollHeight;
var clientHeight = this.clientHeight;
if (scrollHeight > clientHeight) {
$btn.show();
$content.data('fullHeight', scrollHeight);
$content.css('max-height', collapsedHeight + 'px');
}
});
}
function requestList(page, type, isAppend, hooks) {
hooks = hooks || {};
if (state.loading) {
return;
}
state.loading = true;
var appendStartIndex = isAppend ? $list.children('.p_item').length : 0;
var oldState = {
listHtml: $list.html(),
paginationVisible: $pagination.is(':visible'),
btnVisible: $paginationBtn.is(':visible'),
btnText: $paginationBtn.text(),
btnNextPage: $paginationBtn.attr('data-next-page')
};
var apiUrl = buildRequestUrl(page, type);
$.ajax({
type: 'GET',
url: apiUrl,
dataType: 'json',
beforeSend: function () {
if (!isAppend) {
$list.html('<div class="loading_box"><div uk-spinner></div></div>');
$pagination.hide();
} else {
$paginationBtn.hide();
if ($('#douban_pagination .douban-more-loading').length === 0) {
$('#douban_pagination .post-paging').append('<div class="douban-more-loading"><div uk-spinner></div></div>');
}
$pagination.css('display', 'flex');
}
},
success: function (data) {
state.page = page;
renderList(data || {}, !!isAppend);
if (typeof hooks.onSuccess === 'function') {
hooks.onSuccess(data || {});
}
if (isAppend) {
var $newItems = $list.children('.p_item').slice(appendStartIndex);
if ($newItems.length > 0) {
var $scrollBody = (typeof $body !== 'undefined') ? $body : $('html,body');
var targetTop = $newItems.first().offset().top - 58;
if (!window.scroll_param || (!window.loadMoreTimeout && window.scroll_param > targetTop)) {
$scrollBody.animate({ scrollTop: targetTop }, 500);
} else {
window.forceStopLoading = true;
}
}
}
},
error: function () {
cocoMessage.error('数据获取失败');
if (!isAppend) {
if ($.trim(oldState.listHtml || '') !== '') {
$list.html(oldState.listHtml);
} else {
$list.html(renderEmpty());
}
}
if (oldState.paginationVisible) {
$pagination.css('display', 'flex');
} else {
$pagination.hide();
}
if (oldState.btnVisible) {
$paginationBtn.show();
} else {
$paginationBtn.hide();
}
if (oldState.btnText) {
$paginationBtn.text(oldState.btnText);
}
if (oldState.btnNextPage) {
$paginationBtn.attr('data-next-page', oldState.btnNextPage);
$paginationBtn.attr('data', oldState.btnNextPage);
}
if (typeof hooks.onError === 'function') {
hooks.onError();
}
},
complete: function () {
state.loading = false;
$('#douban_pagination .douban-more-loading').remove();
$('.douban_cat_nav .cat-link').removeClass('disabled');
$paginationBtn.text((window.Theme && Theme.site_page) ? Theme.site_page : '翻阅更多');
}
});
}
$(document).off('click.doubanCat', '.douban_cat_nav .cat-link').on('click.doubanCat', '.douban_cat_nav .cat-link', function () {
var $this = $(this);
if ($this.hasClass('disabled')) {
return false;
}
if ($this.hasClass('active')) {
if (window._tagSwitchCallback) {
window._tagSwitchCallback.resolve();
window._tagSwitchCallback = null;
}
return false;
}
$('.douban_cat_nav .cat-link').addClass('disabled');
var $activeBefore = $('.douban_cat_nav .cat-link.active');
var oldType = state.type;
var targetType = $this.attr('data-type') || '';
var targetTag = $this.clone().find('span').remove().end().text().trim();
state.page = 1;
state.type = targetType;
requestList(1, state.type, false, {
onSuccess: function () {
$this.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
pix.centerCategoryNavActive($this);
}
var currentUrl = new URL(window.location.href);
if (!targetTag || targetTag === '全部') {
currentUrl.searchParams.delete('tag');
} else {
currentUrl.searchParams.set('tag', targetTag);
}
history.pushState({ url: currentUrl.pathname + currentUrl.search }, '', currentUrl.pathname + currentUrl.search);
// 分类切换后重置分页记录,避免自动恢复加载旧分类页数
$.removeCookie('page', { path: '/' });
if (window._tagSwitchCallback) {
window._tagSwitchCallback.resolve();
window._tagSwitchCallback = null;
}
},
onError: function () {
state.type = oldType;
if ($activeBefore.length > 0) {
$activeBefore.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
}
if (window._tagSwitchCallback) {
window._tagSwitchCallback.reject();
window._tagSwitchCallback = null;
}
}
});
return false;
});
$(document).off('click.doubanMore', '#douban_pagination a').on('click.doubanMore', '#douban_pagination a', function () {
if (state.loading) {
return false;
}
var pageAttr = $(this).attr('data-next-page') || $(this).attr('data');
var nextPage = parseInt(pageAttr, 10);
if (!nextPage || Number.isNaN(nextPage)) {
return false;
}
requestList(nextPage, state.type, true, {
onSuccess: function () {
// 与 app.js 现有逻辑保持一致:记录当前已加载到的页码
$.cookie('page', nextPage, { path: '/' });
}
});
return false;
});
function applyUrlTagState() {
var urlTag = new URLSearchParams(window.location.search).get('tag');
if (urlTag && urlTag.trim() !== '') {
var $matchedTag = $('.douban_cat_nav .cat-link').filter(function () {
var tagText = $(this).clone().find('span').remove().end().text().trim();
return tagText === urlTag;
}).first();
if ($matchedTag.length > 0) {
$matchedTag.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
pix.centerCategoryNavActive($matchedTag);
}
state.type = $matchedTag.attr('data-type') || '';
} else {
state.type = $('.douban_cat_nav .cat-link.active').attr('data-type') || '';
}
} else {
state.type = $('.douban_cat_nav .cat-link.active').attr('data-type') || '';
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
pix.centerCategoryNavActive($('.douban_cat_nav .cat-link.active').first());
}
}
}
$.ajax({
type: 'GET',
url: '/apis/api.douban.moony.la/v1alpha1/doubanmovies/-/types',
dataType: 'json',
success: function (data) {
var typeList = Array.isArray(data) ? data : ((data && Array.isArray(data.items)) ? data.items : []);
renderTypeNav(typeList);
},
complete: function () {
applyUrlTagState();
requestList(1, state.type, false);
}
});
}
document.addEventListener('pjax:complete', initDoubanDetailLinks);
document.addEventListener('DOMContentLoaded', initDoubanDetailLinks);
window.addEventListener('resize', initDoubanDetailLinks);
// 打开确认模态框
function openModal(title, msg, type) {
@@ -699,32 +279,5 @@ function openModal(title, msg, type) {
modal.fadeIn(200);
}
// = = = = = = = = = = = = = = = = 触发器 = = = = = = = = = = = = = = = =
// 集合:PJAX(初始化执行+PJAX执行)
function init_anian_pjax() {
// modify_moment_video_size();
init_douban_page();
}
// 集合:初始化(仅初始化执行一次)
function init_anian_inport() {
init_anian_pjax();
// 主题通用交互初始化
modify_m_bottom_music_button_link();
}
// PJAX监听
document.addEventListener('pjax:complete', function () {
init_anian_pjax();
})
// 入口
init_anian_inport();
+167 -86
View File
@@ -60,6 +60,16 @@ function highlightMenu() {
}
})
}
// 高亮完成后再滚动,确保当前项在导航容器内可见并尽量居中。
const activeMenuLink = document.querySelector('.left_menu_box ul li.current-pjax-item a');
if (activeMenuLink && typeof activeMenuLink.scrollIntoView === 'function') {
activeMenuLink.scrollIntoView({
behavior: 'smooth',
block: 'nearest',
inline: 'center'
});
}
}
function closeMomentPushModal() {
@@ -122,8 +132,16 @@ function syncPageParamToUrl(page) {
url.searchParams.delete('page');
}
const displayUrl = buildRelativeUrl(url);
const currentState = history.state && typeof history.state === 'object' ? history.state : {};
history.replaceState(Object.assign({}, currentState, { page: pageNumber }), '', buildRelativeUrl(url));
// PJAX uses history.state.url when restoring a popstate entry. Keep it in
// sync with the visible URL after AJAX pagination changes the current page.
history.replaceState(
Object.assign({}, currentState, { url: displayUrl, page: pageNumber }),
'',
displayUrl
);
}
function getPageNumberFromUrl(urlValue) {
@@ -227,6 +245,7 @@ function getPreviousPageContext() {
initAgree();
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
initializeMomentFold();
initDoubanDetailLinks();
}
};
}
@@ -268,6 +287,7 @@ function initPreviousPageButton(page) {
return;
}
// 有BUG:PJAX加载失败后可能会新增本不该存在的上一页按钮,不管了
if ((page === undefined || page === null) && $oldButton.length) {
return;
}
@@ -409,7 +429,6 @@ function updateLoadMorePagination(paginationSelector, insertAfterSelector, data,
newHref = $data.find(fallbackPaginationSelector + ' a').attr('data');
}
if (newHref !== undefined) {
const newPaginationHtml = $newPagination.length ? $newPagination.prop('outerHTML') : '';
let $pagination = $(paginationSelector);
@@ -419,17 +438,25 @@ function updateLoadMorePagination(paginationSelector, insertAfterSelector, data,
} else {
$(insertAfterSelector).last().after(newPaginationHtml);
}
$pagination = $(paginationSelector);
}
if (newHref !== undefined) {
const $paginationBtn = ensureLoadMoreButton(paginationSelector, insertAfterSelector);
$paginationBtn.attr('data', newHref).text(getLoadMoreText()).show();
$(paginationSelector).show();
$(paginationSelector + ' .post-paging').show();
} else if (newPaginationHtml) {
// 最后一页仍保留页码跳转控件,只隐藏不存在的下一页按钮。
$(paginationSelector + ' .post-paging > a').hide();
$(paginationSelector).show();
$(paginationSelector + ' .post-paging').show();
} else {
$(paginationSelector + ' a').hide();
$(paginationSelector).hide();
}
initPageJumpSteppers();
return newHref;
}
@@ -437,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') {
@@ -1177,6 +1208,7 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
showListLoading('.moment_list');
hidePagination('#t_pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1208,9 +1240,6 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
// ajax分类筛选朋友圈
$(document).on('click', '.friends_cat_nav .cat-link', function () {
var $this = $(this);
if ($this.closest('.douban_cat_nav').length > 0) {
return;
}
if ($this.hasClass('disabled')) {
return false;
}
@@ -1242,8 +1271,8 @@ $(document).on('click', '.friends_cat_nav .cat-link', function () {
url: url,
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
// 显示加载动画
showListLoading('.moment_list');
hidePagination('#t_pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1261,6 +1290,7 @@ $(document).on('click', '.friends_cat_nav .cat-link', function () {
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
$('.friends_cat_nav .cat-link').removeClass('disabled');
initializeMomentFold();
initDoubanDetailLinks();
// 更新浏览器历史状态
if (typeof url === 'string') {
@@ -1319,7 +1349,7 @@ $(document).on('click', '#prev_pagination a', function () {
const listHeightAfterLoad = context.$list[0] ? context.$list[0].scrollHeight : listHeightBeforeLoad;
const heightDelta = Math.max(0, listHeightAfterLoad - listHeightBeforeLoad);
window.scrollTo(0, scrollTopBeforeLoad + heightDelta);
window.scrollTo(0, scrollTopBeforeLoad + heightDelta - 50);
$body.animate({ scrollTop: '-=100' }, 500);
},
error: function () {
@@ -1330,6 +1360,117 @@ $(document).on('click', '#prev_pagination a', function () {
return false;
});
function updatePageJumpStepperState(input) {
const value = Number(input.value);
const min = Number(input.min);
const max = Number(input.max);
const $stepper = $(input).closest('.page-jump-input-wrap');
$stepper.find('.page-jump-step-up').prop('disabled', Number.isFinite(value) && value >= max);
$stepper.find('.page-jump-step-down').prop('disabled', !Number.isFinite(value) || value <= min);
}
function validatePageJumpInput(input, notify) {
const value = input.value.trim();
const min = input.min === '' ? null : Number(input.min);
const max = input.max === '' ? null : Number(input.max);
const page = Number(value);
let message = '';
if (!value) {
message = '请输入页码';
} else if (!Number.isInteger(page)) {
message = '请输入有效页码';
} else if (Number.isFinite(min) && page < min) {
message = `页码不能小于 ${min}`;
} else if (Number.isFinite(max) && page > max) {
message = `页码不能大于 ${max}`;
}
const wasInvalid = input.dataset.pageJumpInvalid === 'true';
input.setCustomValidity(message);
input.dataset.pageJumpInvalid = message ? 'true' : 'false';
if (notify && message && message !== '请输入页码' && !wasInvalid
&& window.cocoMessage && typeof window.cocoMessage.warning === 'function') {
window.cocoMessage.warning(message);
}
return !message;
}
function stepPageJumpInput(input, direction) {
const min = Number(input.min);
const max = Number(input.max);
const step = Number(input.step) > 0 ? Number(input.step) : 1;
const current = Number(input.value);
const value = Number.isFinite(current) ? current + direction * step : min;
input.value = String(Math.min(max, Math.max(min, value)));
input.dispatchEvent(new Event('input', { bubbles: true }));
input.focus();
}
function initPageJumpSteppers() {
$('.page-jump-input').each(function () {
updatePageJumpStepperState(this);
});
}
$(document).on('click', '.page-jump-step', function (event) {
event.preventDefault();
if (this.disabled) return;
const input = $(this).closest('.page-jump-input-wrap').find('.page-jump-input')[0];
if (input) {
stepPageJumpInput(input, $(this).hasClass('page-jump-step-up') ? 1 : -1);
}
});
$(document).on('keydown', '.page-jump-input', function (event) {
if (event.ctrlKey || event.metaKey || event.altKey) return;
const allowedKeys = ['Backspace', 'Delete', 'Tab', 'Enter', 'Escape', 'ArrowLeft', 'ArrowRight', 'Home', 'End'];
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
event.preventDefault();
stepPageJumpInput(this, event.key === 'ArrowUp' ? 1 : -1);
return;
}
if (!allowedKeys.includes(event.key) && !/^[0-9]$/.test(event.key)) {
event.preventDefault();
}
});
$(document).on('input', '.page-jump-input', function () {
this.value = this.value.replace(/[^0-9]/g, '').replace(/^0+(?=\d)/, '');
validatePageJumpInput(this, true);
updatePageJumpStepperState(this);
});
// 跳转到指定页:沿用当前 URL 的分类或标签参数,通过 PJAX 加载目标页。
$(document).on('submit', '.page-jump-form', function (event) {
event.preventDefault();
const $form = $(this);
const input = $form.find('.page-jump-input')[0];
validatePageJumpInput(input, true);
if (!this.checkValidity()) {
input.focus();
if (typeof input.reportValidity === 'function') input.reportValidity();
return false;
}
const targetPage = parseInt($form.find('.page-jump-input').val(), 10);
const href = buildPageUrlFromCurrent(targetPage);
if (window.pjax && typeof window.pjax.loadUrl === 'function') {
window.pjax.loadUrl(href);
} else {
window.location.assign(href);
}
return false;
});
//ajax加载片刻
$(document).on('click', '#t_pagination a', function () {
var href = $(this).attr('data');
@@ -1347,22 +1488,17 @@ $(document).on('click', '#t_pagination a', function () {
success: function (posts) {
if (posts) {
var result = $(posts).find(".moment_list .p_item");
$('#t_pagination .post-paging').html(`<a>${Theme.site_page}</a>`);
$(".moment_list").append(result.fadeIn(300));
refreshAjaxPostList();
var newhref = $(posts).find("#t_pagination a").attr("data");
if (newhref != undefined) {
$("#t_pagination a").attr("data", newhref);
$('#t_pagination a').show();
} else {
$("#t_pagination a").hide();
updateLoadMorePagination('#t_pagination', '.moment_list', posts);
if (result.length) {
$body.animate({ scrollTop: result.first().offset().top - 58 }, 500);
}
$body.animate({ scrollTop: result.offset().top - 58 }, 500);
getMomentAudio();
initAgree();
lazyLoadInstance.update();
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
initializeMomentFold();
initDoubanDetailLinks();
syncPageParamToUrl(currentPage);
} else {
$('#t_pagination a').hide();
@@ -1408,13 +1544,16 @@ $(document).ready(function () {
paginationSelector: '#p_pagination'
});
$photosItem.empty();
$('#p_pagination a').hide();
$.ajax({
type: "GET",
url: url,
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
showListLoading("#photos_item", PHOTO_LIST_LOADING_HTML);
$('#p_pagination').hide();
hidePagination('#p_pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1466,15 +1605,8 @@ $(document).on('click', '#p_pagination a', function () {
success: function (photos) {
if (photos) {
var result = $(photos).find(".norpost_list .gallery-photo");
$('#p_pagination .post-paging').html(`<a>${Theme.site_page}</a>`);
$(".gallery-photos").append(result.fadeIn(300));
var newhref = $(photos).find("#p_pagination a").attr("data"); //找出新的下一页链接
if (newhref != undefined) {
$("#p_pagination a").attr("data", newhref);
$('#p_pagination a').show();
} else {
$("#p_pagination a").hide(); //如果没有下一页了,隐藏
}
updateLoadMorePagination('#p_pagination', '#photos_item', photos);
$body.animate({ scrollTop: targetOffsetTop - 358 }, 500);
pix.initGalleryPhotos();
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
@@ -1676,6 +1808,7 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
showListLoading('.norpost_list');
hidePagination('#pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1686,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');
@@ -1716,22 +1849,15 @@ $('body').on('click', '#pagination a', function () {
success: function (data) {
if (data) {
var result = $(data).find(".norpost_list ").children();
$('#pagination .post-paging').html(`<a>${Theme.site_page}</a>`);
$('.norpost_list').append($(result).fadeIn(400));
refreshAjaxPostList();
var newhref = $(data).find("#pagination a").attr("data") || $(data).find(".arc_pagenav a").attr("data"); //找出新的下一页链接
if (newhref != undefined) {
$("#pagination a").attr("data", newhref);
$('#pagination a').show();
} else {
$("#pagination a").hide(); //如果没有下一页了,隐藏
updateLoadMorePagination('#pagination', '.norpost_list', data, '.arc_pagenav');
if (result.length) {
$body.animate({ scrollTop: result.first().offset().top - 58 }, 500);
}
$body.animate({ scrollTop: result.offset().top - 58 }, 500);
initAgree()
lazyLoadInstance.update();
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
syncPageParamToUrl(currentPage);
} else {
$("#pagination a").hide();
@@ -1993,12 +2119,6 @@ if (Theme.pjax) {
cacheBust: false,
});
let isPopNav = false;
// 监听popstate(用户点浏览器前进、后退按钮)
window.addEventListener('popstate', function () {
isPopNav = true;
});
document.addEventListener('pjax:send', function () {
NProgress.start();
})
@@ -2009,19 +2129,10 @@ if (Theme.pjax) {
typeof Prism === 'object' && Prism.highlightAll();
autoload_posts_music();
initBlog();
initPageJumpSteppers();
refreshCommentWidget();
NProgress.done();
if (isPopNav) {
// 用户点击前进后退:删除page参数
isPopNav = false;
const cleanUrl = removePageParamFromUrl(window.location.href);
if (cleanUrl !== window.location.pathname + window.location.search + window.location.hash) {
history.replaceState(history.state || {}, '', cleanUrl);
}
} else {
// 用户点击链接
initPreviousPageButton()
}
})
}
@@ -2108,18 +2219,6 @@ $(document).scroll(function () {
});
// 获取当前具有 "current" 类的元素
var currentElement = document.querySelector('.current');
// 检查是否找到了具有 "current" 类的元素
if (currentElement) {
// 将当前元素滚动到视图中
currentElement.scrollIntoView({
behavior: 'smooth', // 平滑滚动
block: 'start' // 将当前元素顶部对齐到视口顶部
});
}
$('body').on('click', '.listree-btn', function (event) {
event.preventDefault();
setListreeOpen(!$('.listree-box').hasClass('is-open'));
@@ -3006,26 +3105,7 @@ function anianxSpeedFetchXiehouyuWithTimeout(timeout) {
}
function initjump() {
// 功能1:自定义页面tag接管(后续在自定义测实现,当前为过度)
const targetPaths = ['/douban'];
const pathname = window.location.pathname;
const urlParams = new URLSearchParams(window.location.search);
const activeTag = urlParams.get('tag')?.trim();
// 同时存在tag、且当前路径在集合内,才执行点击逻辑,不满足直接跳过
if (activeTag && targetPaths.includes(pathname)) {
// 统一导航按钮选择器
const navSelector = '.douban_cat_nav ul li a';
const targetLink = $(navSelector).filter(function () {
const linkText = $(this).clone().find('span').remove().end().text().trim();
return linkText === activeTag;
});
// 匹配到元素则模拟点击
if (targetLink.length) {
targetLink.trigger('click');
}
}
// 功能2:登录登出、发布更新等操作后,显示提示信息
// 登录登出、发布更新等操作后,显示提示信息
let closeLoading = null;
const loadType = $.cookie('load_type');
if (loadType) {
@@ -3131,6 +3211,7 @@ function initBlog() {
$(document).ready(function () {
pix.roleMoments();
initBlog();
initPageJumpSteppers();
initPreviousPageButton()
setPageGrayscale();
+89 -15
View File
@@ -41,37 +41,107 @@ 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() {
@@ -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. 同步更新全局播放列表选中状态(避免后续操作信息混乱)
+33
View File
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org"
th:replace="~{modules/layouts/layout :: layout(_head = null,_content = ~{::content},_title = ${douban != null and douban.spec != null ? douban.spec.name + ' - ' + site.title : title + ' - ' + site.title})}">
<th:block th:fragment="content">
<div class="page_main uk-width-2-3@m">
<th:block th:replace="~{modules/header}" />
<div id="pjax-container">
<div class="blog_list douban_page douban_detail_page">
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div id="post_item" class="moment_list douban_list">
<th:block th:replace="~{macro/douban-item :: douban-item(${douban})}"></th:block>
<th:block th:if="${douban == null or douban.spec == null}">
<th:block th:replace="~{macro/tpl/content-none}" />
</th:block>
</div>
<div id="comment_form_reset"></div>
</div>
</div>
</div>
<th:block th:replace="~{modules/footer-main}" />
</div>
</th:block>
</html>
+64 -7
View File
@@ -8,24 +8,81 @@
<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]},
doubanPage = ${doubanFinder.list(page, 10, selectedTag, null)}
">
<div class="blog_list douban_page">
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div class="friends_cat_nav douban_cat_nav">
<ul>
<li><a data-type="" class="cat-link active">全部<span></span></a></li>
<ul id="cat_nav_items">
<li>
<a th:attr="data-href=@{/books}"
th:classappend="${#strings.isEmpty(selectedTag) ? 'active' : ''}"
class="cat-link">
全部<span></span>
</a>
</li>
<li th:each="type : ${types}">
<a th:attr="data-href=@{/books(tag=${type.key})}"
th:classappend="${#strings.equals(selectedTag, type.key) ? 'active' : ''}"
class="cat-link">
<span th:text="${#strings.isEmpty(type.name) ? type.key : type.name}">类型</span>
</a>
</li>
</ul>
</div>
<div id="douban_item" class="moment_list douban_list"></div>
<div id="post_item" class="moment_list douban_list">
<th:block th:each="doubanItem : ${doubanPage.items}">
<th:block th:replace="~{macro/douban-item :: douban-item(${doubanItem})}"></th:block>
</th:block>
<th:block th:if="${#lists.isEmpty(doubanPage.items)}">
<th:block th:replace="~{macro/tpl/content-none}" />
</th:block>
</div>
<th:block th:if="${doubanPage.totalPages > 1}">
<div id="t_pagination">
<div class="post-paging" th:with="_page = ${doubanPage.page + 1}">
<a th:if="${doubanPage.hasNext() and #strings.isEmpty(selectedTag)}"
th:attr="data=@{/books(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${doubanPage.hasNext() and not #strings.isEmpty(selectedTag)}"
th:attr="data=@{/books(tag=${selectedTag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" action="/books">
<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="${doubanPage.totalPages}" th:value="${doubanPage.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">/ [[${doubanPage.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 id="douban_pagination" class="u-hide">
<div class="post-paging">
<a data-next-page="2" th:text="${theme.config.base_set.site_page}"></a>
</div>
</div>
</th:block>
<div id="comment_form_reset"></div>
+15 -76
View File
@@ -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">
<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 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>
</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>
<!-- URL 中的 tag 使用分组 displayNameFinder 查询使用分组 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>
</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>
</div>
+22 -4
View File
@@ -114,10 +114,28 @@
<!-- 分页:必须保持在 blog_list_inner 里面 -->
<th:block th:if="${friendPage.totalPages>1}">
<div id="t_pagination">
<div class="post-paging" th:if="${friendPage.hasNext()}">
<a th:data="${friendPage.nextUrl}"
th:text="${theme.config.base_set.site_page}">
</a>
<div class="post-paging">
<a th:if="${friendPage.hasNext()}" th:data="${friendPage.nextUrl}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" action="/friends">
<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="${friendPage.totalPages}" th:value="${friendPage.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">/ [[${friendPage.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div>
</div>
</th:block>
+63
View File
@@ -0,0 +1,63 @@
<th:block th:fragment="douban-item(doubanItem)" th:if="${doubanItem != null and doubanItem.spec != null}"
th:with="spec = ${doubanItem.spec}, faves = ${doubanItem.faves}, score = ${faves == null ? spec.score : (not #strings.isEmpty(faves.score) ? faves.score : spec.score)}, isRead = ${faves != null and faves.status == 'done'}">
<div th:id="${'post-' + doubanItem.metadata.name}"
class="loop_content p_item moment_item douban_card_item uk-animation-slide-bottom-small">
<div class="p_item_inner douban_card_inner">
<div class="douban_text_col">
<div class="douban_title_row">
<a th:if="${isRead and not #strings.isEmpty(spec.link)}"
class="douban_title_text"
th:href="${spec.link}"
th:text="${spec.name}">
豆瓣条目
</a>
<span th:unless="${isRead and not #strings.isEmpty(spec.link)}"
class="douban_title_text douban_title_text_plain"
th:text="${spec.name}">
豆瓣条目
</span>
<a class="douban_detail_link"
th:href="${'/books/' + doubanItem.metadata.name}"
aria-label="查看详情" title="查看详情">
详情
</a>
</div>
<div class="douban_media_col">
<span class="fancybox"
th:href="${#strings.isEmpty(spec.poster) ? '/themes/theme-pix/assets/img/banner-all.webp' : spec.poster}"
th:data-fancybox="${'douban-' + doubanItem.metadata.name}">
<img class="douban_poster_img"
th:src="${#strings.isEmpty(spec.poster) ? '/themes/theme-pix/assets/img/banner-all.webp' : spec.poster}"
th:alt="${spec.name}">
</span>
</div>
<div class="douban_sub_meta">
<time class="douban_time_text"
th:if="${faves != null and faves.createTime != null}"
th:datetime="${#dates.format(faves.createTime, 'yyyy-MM-dd HH:mm')}">
<span th:text="${#dates.format(faves.createTime, 'yyyy-MM-dd')}">2025-01-01</span>
</time>
<span class="douban_type_badge" th:text="${spec.type}">类型</span>
<span class="douban_score_badge"
th:if="${not #strings.isEmpty(score)}"
th:text="|${score}分|">评分</span>
</div>
<div class="douban_content_box">
<p class="douban_content_main"
th:text="${#strings.isEmpty(spec.cardSubtitle) ? '暂无简介' : spec.cardSubtitle}">
暂无简介
</p>
<p class="douban_content_meta">
<span th:if="${not #strings.isEmpty(spec.year)}" th:text="${spec.year}"></span>
<span th:if="${not #strings.isEmpty(spec.pubdate)}" th:text="${spec.pubdate}"></span>
</p>
</div>
</div>
</div>
</div>
</th:block>
+87
View File
@@ -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>
+23 -4
View File
@@ -39,13 +39,32 @@
<th:block th:if="${_posts.totalPages>1}">
<div id="pagination">
<div class="post-paging" th:if="${_posts.hasNext()}"
<div class="post-paging"
th:with="_page = ${_posts.page+1},_path = ${path +'page/'+_page }">
<a th:if="${path == '/archives' and #strings.isEmpty(tag)}"
<a th:if="${_posts.hasNext() and path == '/archives' and #strings.isEmpty(tag)}"
th:data="@{/archives(page=${_page})}" th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${path == '/archives' and not #strings.isEmpty(tag)}"
<a th:if="${_posts.hasNext() and path == '/archives' and not #strings.isEmpty(tag)}"
th:data="@{/archives(tag=${tag},page=${_page})}" th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${path != '/archives'}" th:data="${_path}" th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${_posts.hasNext() and path != '/archives'}" th:data="${_path}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" th:action="@{${path}}">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(tag)}" type="hidden" name="tag" th:value="${tag}" />
<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="${_posts.totalPages}" th:value="${_posts.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">/ [[${_posts.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div>
</div>
</th:block>
+21 -3
View File
@@ -26,14 +26,32 @@
</div>
<th:block th:if="${_moments.totalPages>1}">
<div id="t_pagination">
<div class="post-paging" th:if="${_moments.hasNext()}"
<div class="post-paging"
th:with="tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},_page = ${_moments.page+1}">
<a th:if="${#strings.isEmpty(tag)}"
<a th:if="${_moments.hasNext() and #strings.isEmpty(tag)}"
th:data="@{${_path}(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:unless="${#strings.isEmpty(tag)}"
<a th:if="${_moments.hasNext() and not #strings.isEmpty(tag)}"
th:data="@{${_path}(tag=${tag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" th:action="@{${_path}}">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(tag)}" type="hidden" name="tag" th:value="${tag}" />
<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="${_moments.totalPages}" th:value="${_moments.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">/ [[${_moments.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div>
</div>
</th:block>
+21 -3
View File
@@ -70,14 +70,32 @@
<!-- 分页 -->
<th:block th:if="${photoPage.hasPrevious()} or ${photoPage.hasNext()}">
<div id="p_pagination">
<div class="post-paging" th:if="${photoPage.hasNext()}"
<div class="post-paging"
th:with="_page = ${photoPage.page+1}">
<a th:if="${#strings.isEmpty(tag)}"
<a th:if="${photoPage.hasNext() and #strings.isEmpty(tag)}"
th:data="@{/photos(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:unless="${#strings.isEmpty(tag)}"
<a th:if="${photoPage.hasNext() and not #strings.isEmpty(tag)}"
th:data="@{/photos(tag=${tag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" action="/photos">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(tag)}" type="hidden" name="tag" th:value="${tag}" />
<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="${photoPage.totalPages}" th:value="${photoPage.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">/ [[${photoPage.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div>
</div>
</th:block>
+1 -1
View File
@@ -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 -1
View File
@@ -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
View File
@@ -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: