修改样式问题

This commit is contained in:
rain
2026-07-29 17:23:13 +08:00
parent dea2f5fe73
commit a178111378
2 changed files with 50 additions and 28 deletions
+22 -1
View File
@@ -355,6 +355,27 @@ select {
font-size: 12px;
}
.site-footer__copyright-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.site-footer__copyright-row {
margin: 0;
color: rgba(255, 255, 255, .62);
font-size: 12px;
line-height: 1.8;
}
.site-footer__copyright-row.index-style-02 {
color: rgba(255, 255, 255, .56);
}
.site-footer__copyright-row.index-style-02:hover {
color: rgba(255, 255, 255, .86);
}
.site-footer__meta {
display: flex;
flex-wrap: wrap;
@@ -1246,4 +1267,4 @@ select {
height: auto;
aspect-ratio: 1 / 1;
}
}
}
+28 -27
View File
@@ -967,47 +967,48 @@ const CommonUtil = {
.sort((a, b) => (Number(a.sort) || 0) - (Number(b.sort) || 0));
if (!list.length) return;
const copyrightItem = list.find((item) => /©|版权|copyright/i.test(String(item.content || ''))) || null;
const descItem =
list.find((item) => /本站|历史数据|数据分析|投注建议|不涉及|仅供/i.test(String(item.content || ''))) ||
list.find((item) => item !== copyrightItem && !/ICP备|工信部|公网安备|公安/.test(String(item.content || ''))) ||
null;
$('.site-footer__brand').each((_, brand) => {
const $brand = $(brand);
let $list = $brand.find('.site-footer__copyright-list').first();
if (copyrightItem?.content) $('#copyright-info').text(copyrightItem.content.trim());
if (descItem?.content) $('#additional-info').text(descItem.content.trim());
if (!$list.length) {
$list = $('<div>', { class: 'site-footer__copyright-list' }).appendTo($brand);
}
const $meta = $('.site-footer__legal, .site-footer__meta').first();
if (!$meta.length) return;
$brand
.find('.site-footer__legal, .site-footer__meta, #copyright-info, #additional-info')
.remove();
$list.empty();
$meta.empty();
list
.forEach((item) => {
list.forEach((item) => {
const content = String(item.content || '').trim();
if (!content) return;
const isIcp = /ICP备|工信部/.test(content);
const isPolice = /公网安备|公安/.test(content);
const isCopyright = /©|版权|copyright/i.test(content);
const isDescription = /本站|历史数据|数据分析|投注建议|不涉及|仅供/i.test(content);
const attributes = {
class: 'site-footer__copyright-row',
text: content,
};
if (isIcp) {
$('<a>', {
...attributes,
id: 'beian',
href: 'https://beian.miit.gov.cn/',
target: '_blank',
class: 'index-style-02',
text: content,
}).appendTo($meta);
} else if (isPolice) {
$('<span>', {
id: 'police-record',
text: content,
}).appendTo($meta);
class: 'site-footer__copyright-row index-style-02',
}).appendTo($list);
} else {
if (isPolice) attributes.id = 'police-record';
else if (isCopyright) attributes.id = 'copyright-info';
else if (isDescription) attributes.id = 'additional-info';
$('<p>', attributes).appendTo($list);
}
});
if (!$meta.children().length && descItem?.content) {
$('<span>', {
id: 'additional-info',
text: descItem.content.trim(),
}).appendTo($meta);
}
});
},
setMeta(name, content) {