品牌露出 4 处默认显示(页底落款 / 专属福利「兜爸出品」/ 测一测「兜爸原创」/ 投稿卡「兜爸心选 · 官方征集」,?brand=0 可关);专题页底部加「兜爸心选 | 孕育知识整理」落款(共用模板 + 5 个自带页);v26110203

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-02 06:37:11 +00:00
parent 1dd1456f16
commit 29e1f3a9a2
107 changed files with 226 additions and 203 deletions

View File

@@ -185,3 +185,7 @@ b{color:var(--h)}
/* 横条格子字多时允许换两行,别挤出格 */
.bars{height:auto;min-height:26px}
.bars i{min-height:26px;padding:3px 3px;white-space:normal;text-align:center;line-height:1.25;font-size:11px;word-break:break-all}
/* 11-02 品牌落款:兜爸心选 logo + 孕育知识整理 */
.tp-brand{display:flex;align-items:center;justify-content:center;gap:6px;margin:14px auto 22px;font-size:11.5px;color:#C29A8F;letter-spacing:.06em}
.tp-brand img{width:58px;height:auto;opacity:.6}.tp-brand i{width:1px;height:10px;background:#E5CFC8}

View File

@@ -124,7 +124,8 @@
D.sources.forEach(function (x) { h += '<li>' + esc(x) + '</li>'; });
h += '</ul></details>';
}
h += '<p class="foot">本页为科普参考,不能代替医生诊断。</p></div>';
h += '<p class="foot">本页为科普参考,不能代替医生诊断。</p>' +
'<div class="tp-brand"><img src="../../assets/img/brand-logo-c.png" alt="兜爸心选"><i></i><span>孕育知识整理</span></div></div>'; /* 11-02 品牌落款(样式在 article.css) */
document.body.insertAdjacentHTML('afterbegin', h);
document.title = D.q || document.title;

16
topic/_shared/brand.js Normal file
View File

@@ -0,0 +1,16 @@
/* 11-02 用户:专题页底部加品牌落款「兜爸心选 · 孕育知识整理」(页面会被单独转发,低调署名)。
共用模板 article.js 已内置;自带页面(huafei / wen / buji / zhichang / yingyang)各引一次本文件。
放在最后一个 .foot 后面;没有 .foot 的页面必须写 data-after。 */
(function () {
if (document.querySelector('.tp-brand')) return;
var st = document.createElement('style');
st.textContent = '.tp-brand{display:flex;align-items:center;justify-content:center;gap:6px;margin:14px auto 22px;font-size:11.5px;color:#C29A8F;letter-spacing:.06em}' +
'.tp-brand img{width:58px;height:auto;opacity:.6}.tp-brand i{width:1px;height:10px;background:#E5CFC8}';
document.head.appendChild(st);
var h = '<div class="tp-brand"><img src="../../assets/img/brand-logo-c.png" alt="兜爸心选"><i></i><span>孕育知识整理</span></div>';
/* 页面结构特殊的(如 huafei 分好几屏)用 <script data-after="选择器"> 指定放在哪些元素后面 */
var cs = document.currentScript, after = cs && cs.getAttribute('data-after');
if (after) { [].forEach.call(document.querySelectorAll(after), function (el) { el.insertAdjacentHTML('afterend', h); }); return; }
var f = document.querySelectorAll('.foot'), last = f[f.length - 1];
if (last) last.insertAdjacentHTML('afterend', h);
})();