diff --git a/css/index.css b/css/index.css index afdb65e..d0f0ad6 100644 --- a/css/index.css +++ b/css/index.css @@ -1884,6 +1884,8 @@ margin-left: auto; margin-right: auto; line-height: 1.8; + text-align: center; + /* 居中对齐 */ } /* 网格布局容器 */ @@ -1896,6 +1898,8 @@ padding: 0 20px; position: relative; z-index: 1; + justify-items: center; + /* 网格项居中对齐 */ } /* 网格项样式 */ @@ -1908,8 +1912,13 @@ transition: all 0.3s ease; overflow: hidden; display: flex; + flex-direction: column; align-items: center; justify-content: center; + width: 100%; + /* 占满网格单元 */ + max-width: 220px; + /* 限制最大宽度 */ } .honor-grid-item:hover { @@ -1920,16 +1929,38 @@ } .honor-grid-item img { - width: 100%; + width: auto; + /* 宽度自适应 */ + max-width: 100%; + /* 不超过容器宽度 */ height: 180px; + /* 固定高度 */ object-fit: contain; + /* 保持比例 */ transition: all 0.3s ease; + margin-bottom: 12px; } .honor-grid-item:hover img { transform: scale(1.05); } +/* 证书名称样式 */ +.honor-grid-name { + font-size: 14px; + color: rgba(203, 213, 225, 0.9); + text-align: center; + margin: 0; + margin-top: 8px; + line-height: 1.4; + font-weight: 500; + transition: color 0.3s ease; +} + +.honor-grid-item:hover .honor-grid-name { + color: #38BDF8; +} + .honor-list { gap: 20px; } @@ -3005,12 +3036,18 @@ html { .honor-grid-item { padding: 16px; + max-width: 100%; } .honor-grid-item img { height: 140px; } + .honor-grid-name { + font-size: 13px; + margin-top: 6px; + } + /* ===== 新闻区域 - 紧凑 ===== */ .section.news { padding: 25px 0 !important; @@ -3410,12 +3447,18 @@ html { .honor-grid-item { padding: 12px; + max-width: 100%; } .honor-grid-item img { height: 120px; } + .honor-grid-name { + font-size: 12px; + margin-top: 6px; + } + /* ===== 新闻 - 紧凑 ===== */ .section.news { padding: 20px 0 !important; @@ -3958,12 +4001,18 @@ html { .honor-grid-item { padding: 10px; + max-width: 100%; } .honor-grid-item img { height: 100px; } + .honor-grid-name { + font-size: 11px; + margin-top: 4px; + } + /* ===== 新闻 - 极简 ===== */ .section.news { padding: 18px 0 !important; diff --git a/js/index.js b/js/index.js index 96bd16f..22b00d5 100644 --- a/js/index.js +++ b/js/index.js @@ -88,7 +88,6 @@ $(function () { function setIndexData(commentObj) { // 清空容器,避免重复插入数据 $("#certBox").empty(); - $("#partnerBox").empty(); // 荣誉资质 - 网格布局 if (commentObj.honor && commentObj.honor.length > 0) { @@ -97,19 +96,7 @@ $(function () { $("#honorGrid").append(`
${item.name} -
- `); - }); - } - // 合作伙伴 - if (commentObj.partner && commentObj.partner.length > 0) { - commentObj.partner.forEach((item) => { - $("#partnerBox").append(` -
-
- ${item.name} -
-

${item.name}

+

${item.name}

`); }); diff --git a/plugins/addon/theme_configurator/template/admin/index.html b/plugins/addon/theme_configurator/template/admin/index.html index ca1fd64..fb1ce4f 100644 --- a/plugins/addon/theme_configurator/template/admin/index.html +++ b/plugins/addon/theme_configurator/template/admin/index.html @@ -286,43 +286,6 @@ 新增荣誉 - -
- 用于首页"合作伙伴"模块(partner)。 -
-
-
-

伙伴 {{ index + 1 }}

- - 删除 - -
-
-
- - -
-
- - -
-
- -
- - - - 上传 - - -
-
-
-
- 新增伙伴 -
@@ -808,12 +771,6 @@ removeHonor(index) { this.fullConfig.honor.splice(index, 1); }, - addPartner() { - this.fullConfig.partner.push({ name: "", description: "", img: "" }); - }, - removePartner(index) { - this.fullConfig.partner.splice(index, 1); - }, addFeedbackType() { if (!Array.isArray(this.fullConfig.feedback_type)) { this.fullConfig.feedback_type = [];