diff --git a/css/details.css b/css/details.css index df13da2..3612697 100644 --- a/css/details.css +++ b/css/details.css @@ -160,14 +160,21 @@ line-height: 26px; margin-bottom: 66px; } +#details .matter .matter-left .html * { + background: transparent !important; + color: #555555 !important; +} #details .matter .matter-left .html a { text-decoration: underline; - color: #04b0d5; + color: #04b0d5 !important; +} +#details .matter .matter-left .html a * { + color: #04b0d5 !important; } #details .matter .matter-left .html .blue { font-size: 15px; line-height: 26px; - color: #026277; + color: #026277 !important; margin: 0 4px; text-decoration: none; } @@ -176,19 +183,17 @@ display: inline-block; } #details .matter .matter-left .html video { - margin: 0 auto; + margin: 0 auto 5px; + height: 300px; + display: block; } #details .matter .matter-left .html h1 { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-weight: 650; - color: #000000; + color: #000000 !important; font-size: 18px; line-height: 30px; } -#details .matter .matter-left .html tr, -#details .matter .matter-left .html td { - background: transparent; -} #details .matter .matter-left .last-time { color: #aaaaaa; font-size: 13px; diff --git a/css/details.less b/css/details.less index d00e8cb..066357d 100644 --- a/css/details.less +++ b/css/details.less @@ -36,6 +36,7 @@ .content { flex-direction: column; + .name { font-size: 14px; color: #333333; @@ -55,6 +56,7 @@ .operate { position: relative; + .view { .icon { width: 13px; @@ -185,15 +187,25 @@ line-height: 26px; margin-bottom: 66px; + * { + background: transparent !important; + color: #555555 !important; + } + a { text-decoration: underline; - color: #04b0d5; + color: #04b0d5 !important; + + * { + color: #04b0d5 !important; + + } } .blue { font-size: 15px; line-height: 26px; - color: #026277; + color: #026277 !important; margin: 0 4px; text-decoration: none; } @@ -204,21 +216,20 @@ } video { - margin: 0 auto; + margin: 0 auto 5px; + height: 300px; + display: block; } h1 { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-weight: 650; - color: #000000; + color: #000000 !important; font-size: 18px; line-height: 30px; } - tr, - td { - background: transparent; - } + } .last-time { @@ -244,6 +255,7 @@ height: 20px; margin-right: 6px; } + font-size: 14px; color: #333333; cursor: pointer; @@ -254,6 +266,7 @@ &.share { position: relative; + &:hover { .share-box { display: flex; @@ -353,6 +366,7 @@ padding-top: 20px; padding-bottom: 12px; border-bottom: 1px solid #ebebeb; + .text { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-weight: 650; @@ -494,6 +508,7 @@ .author-info { color: #7f7f7f; font-size: 13px; + .amount { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-weight: 650; @@ -508,6 +523,7 @@ width: calc(100% - 16px); padding-bottom: 22px; margin-left: 16px; + .medal-title { font-size: 14px; color: #7f7f7f; @@ -551,6 +567,7 @@ &:hover { color: #000000; } + .dot { width: 6px; height: 6px; @@ -608,6 +625,7 @@ font-weight: 400; color: #7f7f7f; font-size: 14px; + .sum { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-weight: 650; @@ -682,6 +700,7 @@ .coins-total { color: #7f7f7f; font-size: 14px; + .sum { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-weight: 650; @@ -713,6 +732,7 @@ .user { color: #555555; font-size: 13px; + .avatar { width: 32px; height: 32px; @@ -724,6 +744,7 @@ .amount { color: #000000; font-size: 16px; + .text { font-size: 13px; margin-left: 2px; @@ -883,8 +904,7 @@ cursor: pointer; } -.answer-discuss .input-box .bottom .operate .item { -} +.answer-discuss .input-box .bottom .operate .item {} .answer-discuss .input-box .bottom .operate .item .emoji-box { width: 582px; @@ -1421,29 +1441,35 @@ background-color: rgba(0, 0, 0, 0.5); z-index: 12; } + .answer-discuss .edit-comment .box { width: 650px; border-radius: 10px; background: #fff; padding: 20px 15px; } + .answer-discuss .edit-comment .box .text { font-size: 18px; font-weight: 650; margin-bottom: 15px; color: #000; } + .answer-discuss .edit-comment .box .input-box { margin-right: 0; padding-top: 10px; } + .answer-discuss .edit-comment .box .input-box .bottom { // border-top: 1px solid #ebebeb; } + .answer-discuss .edit-comment .box .btn-list { padding: 15px 0; justify-content: flex-end; } + .answer-discuss .edit-comment .box .btn-list .btn { font-size: 14px; color: #333; @@ -1457,6 +1483,7 @@ border: 1px solid #ebebeb; margin-left: 20px; } + .answer-discuss .edit-comment .box .btn-list .btn.send { background-color: #fddf6d; border: 1px solid #fddf6d; @@ -1469,6 +1496,7 @@ width: 100vw; height: 100vh; } + .answer-discuss .emoji-box-mask { position: fixed; top: 0; @@ -1483,6 +1511,7 @@ @media screen and (max-width: 850px) { #details { padding: 10px 10px 0; + .head-top { display: none; } @@ -1494,6 +1523,7 @@ .matter { .matter-left { margin-right: 0 !important; + .action-bar { margin-right: 0 !important; justify-content: space-around; @@ -1508,10 +1538,13 @@ .related-head { padding-left: 14px; } + .list { padding: 14px; + .item { width: 100% !important; + &:not(:last-child) { margin-bottom: 7px; } @@ -1523,10 +1556,12 @@ } } } + .sidebar-box { display: none; } } + .answer-discuss { padding: 15px; @@ -1594,6 +1629,7 @@ .comments-item { .comments-header { font-size: 12px; + .comments-title { height: 14px !important; } @@ -1610,6 +1646,7 @@ .comments-box { .comments-item { .comments-header { + .comment-icon, .like-box { margin-left: 15px; @@ -1619,4 +1656,4 @@ } } } -} +} \ No newline at end of file diff --git a/css/index.css b/css/index.css index ceab5ae..06a761d 100644 --- a/css/index.css +++ b/css/index.css @@ -398,12 +398,16 @@ } #appIndex .header-content-box .header-content-right .offer-box { width: 240px; - height: 214px; background-color: #fff; border: 1px solid #e9eef2; border-radius: 10px; - padding: 17px 10px; overflow: hidden; + height: 64px; + padding: 15px 10px; +} +#appIndex .header-content-box .header-content-right .offer-box.big { + height: 214px; + padding: 17px 10px; } #appIndex .header-content-box .header-content-right .offer-box.small { height: 64px; diff --git a/css/index.less b/css/index.less index 195e379..b83e9fc 100644 --- a/css/index.less +++ b/css/index.less @@ -18,9 +18,11 @@ &:not(:last-child) { margin-right: 12px; } + a { display: block; } + img { width: 468px; height: 60px; @@ -37,6 +39,7 @@ border-radius: 20px 20px 20px 0; margin-top: 0; margin-bottom: 10px; + .icon { width: 15px; height: 12px; @@ -91,6 +94,7 @@ .people { position: relative; justify-content: space-between; + &::after { content: ""; position: absolute; @@ -119,6 +123,7 @@ width: 26px; height: 26px; border-radius: 50%; + .img { width: 26px; height: 26px; @@ -128,12 +133,15 @@ &:nth-child(4) { margin-right: -9px; } + &:nth-child(3) { margin-right: -9px; } + &:nth-child(2) { margin-right: -7px; } + &:nth-child(2) { margin-right: -5px; } @@ -145,6 +153,7 @@ .topic-list { .item { cursor: pointer; + &:not(:last-child) { margin-bottom: 1px; } @@ -222,8 +231,10 @@ border-radius: 10px; padding-left: 12px; margin-top: 12px; + .adv { margin-right: 26px; + .adv-icon { width: 295px; height: 118px; @@ -279,6 +290,7 @@ .header-content-right { width: 240px; + .post-entrance { background-color: #fff; border: 1px solid #e9eef2; @@ -357,9 +369,11 @@ height: 140px; margin-bottom: 10px; display: block; + a { display: block; } + img { width: 240px; height: 140px; @@ -394,12 +408,15 @@ &:nth-child(1) { border-top-left-radius: 8px; } + &:nth-child(2) { border-top-right-radius: 8px; } + &:nth-child(3) { border-bottom-left-radius: 8px; } + &:nth-child(4) { border-bottom-right-radius: 8px; } @@ -429,6 +446,7 @@ line-height: 22px; position: relative; + .title { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-weight: 650; @@ -455,6 +473,7 @@ padding: 20px; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.168627450980392); flex-direction: column; + .QRcode { width: 100px; height: 100px; @@ -472,13 +491,21 @@ .offer-box { width: 240px; - height: 214px; + // height: 214px; background-color: #fff; border: 1px solid #e9eef2; border-radius: 10px; - padding: 17px 10px; + // padding: 17px 10px; overflow: hidden; + height: 64px; + padding: 15px 10px; + + &.big { + height: 214px; + padding: 17px 10px; + } + &.small { height: 64px; padding: 15px 10px; @@ -521,6 +548,7 @@ .admission { margin-bottom: 30px; + .admission-header { margin-bottom: 24px; display: inline-flex; @@ -543,6 +571,7 @@ .admission-list { flex-wrap: wrap; + .admission-item { width: 291px; height: 103px; @@ -602,6 +631,7 @@ &:not(:last-child) { margin-bottom: 10px; } + .item { font-family: "PingFangSC-Regular", "PingFang SC", sans-serif; font-weight: 400; @@ -622,6 +652,7 @@ } } } + .item-box { margin-bottom: 12px; } @@ -641,6 +672,7 @@ height: 220px; margin-bottom: 12px; cursor: pointer; + img { width: 291px; height: 220px; @@ -669,4 +701,4 @@ } } } -} +} \ No newline at end of file diff --git a/js/edit.js b/js/edit.js index 922a87f..45d11f8 100644 --- a/js/edit.js +++ b/js/edit.js @@ -53,8 +53,6 @@ const editApp = createApp({ cUpload(); - // console.log(valueA.value); - valueUrl = valueA.value.innerText; if (location.hostname == "127.0.0.1") { @@ -67,6 +65,7 @@ const editApp = createApp({ isLogin.value = true; } + }); let imageLength = 10; @@ -167,19 +166,13 @@ const editApp = createApp({ const infoTarget = data.info || {}; - // if (location.hostname == "127.0.0.1") - // infoTarget.content = `
- html = html.replace(/\[p\]([\s\S]*?)\[\/p\]/gi, "
$1
"); + // html = html.replace(/\[p\]([\s\S]*?)\[\/p\]/gi, "$1
"); // 0. 基础清理:换行符转/g, "
"); html = html.replace(/$1
'); + // 移除 align 后紧跟的换行符(因为 align 转换为了块级元素 p/h1,其后的换行符通常是多余的) + html = html.replace(/(.*?<\/p>)\s*
/gi, "$1");
+ html = html.replace(/(
<\/p>/gi, "\n");
// 1. 处理居中 [align=center] (p, div, h1-h6)
html = html.replace(/<(p|div|h[1-6])[^>]*style="[^"]*text-align:\s*center;[^"]*"[^>]*>([\s\S]*?)<\/\1>/gi, (match, tag, content) => {
@@ -637,7 +660,10 @@ const editApp = createApp({
html = html.replace(/
]*>([\s\S]*?)<\/p>/gi, "[p]$1[/p]"); + // 优先处理空段落
]*>\s*
\s*<\/p>/gi, "\n");
+ // 处理普通段落结束符
+ html = html.replace(/<\/p>/gi, "\n");
// 3. 处理加粗 [b] (对应 strong, b)
html = html.replace(/<(strong|b)[^>]*>([\s\S]*?)<\/\1>/gi, "[b]$2[/b]");
@@ -667,7 +693,7 @@ const editApp = createApp({
// 匹配数字+单位 (px或%)
const wMatch = styleMatch[1].match(/width:\s*([\d.]+(?:px|%)?)/i);
const hMatch = styleMatch[1].match(/height:\s*([\d.]+(?:px|%)?)/i);
-
+
if (wMatch) {
// 如果是百分比,直接保留字符串;如果是纯数字默认视为 px;如果是 px 去掉单位
let val = wMatch[1];
@@ -703,14 +729,16 @@ const editApp = createApp({
// 处理 data-href,包裹在 [url] 中
const hrefMatch = imgTag.match(/data-href="([^"]+)"/i);
- if (hrefMatch && hrefMatch[1]) {
- result = `[url=${hrefMatch[1]}]${result}[/url]`;
- }
+ if (hrefMatch && hrefMatch[1]) result = `[url=${hrefMatch[1]}]${result}[/url]`;
return result;
});
// 5. 处理视频 [attach]
+ html = html.replace(/