修正 fa fab 的字体优先级,微信、QQ、微博等图标现在使用 Brands 字体。

This commit is contained in:
2026-08-19 23:11:44 +08:00
parent 3312323f6e
commit 13ed02c93a
4 changed files with 28 additions and 0 deletions
@@ -14,6 +14,7 @@ const provider = read('src/Admin/SchemaProvider.php')
const settingsFacade = read('src/Settings/Settings.php')
const scriptsPart1c = read('src/Core/ScriptsPart1c.php')
const footerCss = read('assets/css/frontend/footer/zibll-shell.css')
const frontendBaseCss = read('assets/css/frontend/base.css')
const headerMenuButtons = read('inc/helpers/aksrt-header-menu-buttons.php')
function activeRepositorySource() {
@@ -178,6 +179,17 @@ test('front-end page-display consumers read only the canonical section contracts
assert.doesNotMatch(scriptsPart1c, /\$runtime_routes\[['"]cart['"]\]/)
})
test('footer brand icons keep the Brands font when legacy fa prefix is present', () => {
const footer = read('footer.php')
const icons = read('inc/helpers/aksrt-icons.php')
assert.match(footer, /class="fa fab fa-weixin"/)
assert.match(footer, /class="fa fab fa-qq"/)
assert.match(footer, /class="fa fab fa-weibo"/)
assert.match(frontendBaseCss, /\.fa\.fab\s*\{[^}]*font-family:\s*"Font Awesome 5 Brands"[^}]*font-weight:\s*400/s)
assert.match(icons, /'wechat'\s*=>\s*'fa fab fa-weixin'/)
})
test('save contract rejects invalid input and round-trips canonical nested values', () => {
const result = spawnSync(process.env.PHP_BINARY || 'php', [path.join(__dirname, 'page-display-save-harness.php')], {
cwd: root,