mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-31 16:26:30 +00:00
feat(branding): 启用新版 SVG logo 并在 README 头部展示
- 新增 assets/logo.svg 作为项目默认 logo(512x512 深色圆角底 + 渐变 S 标) - 前端 favicon 与组件兜底 logo 由 logo.png 切换为 frontend/public/logo.svg - 三个 README(EN/CN/JA)头部新增居中 logo 与标题布局 - 删除旧 logo.png 及多余的 lobe 变体 SVG
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
class="sidebar-logo flex h-9 w-9 items-center justify-center overflow-hidden rounded-xl shadow-glow transition-opacity hover:opacity-80"
|
||||
@click="handleMenuItemClick(homePath)"
|
||||
>
|
||||
<img v-if="settingsLoaded" :src="siteLogo || '/logo.png'" alt="Logo" class="h-full w-full object-contain" />
|
||||
<img v-if="settingsLoaded" :src="siteLogo || '/logo.svg'" alt="Logo" class="h-full w-full object-contain" />
|
||||
</router-link>
|
||||
<div class="sidebar-brand" :class="{ 'sidebar-brand-collapsed': sidebarCollapsed }" :aria-hidden="sidebarCollapsed ? 'true' : 'false'">
|
||||
<router-link
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div
|
||||
class="mb-4 inline-flex h-16 w-16 items-center justify-center overflow-hidden rounded-2xl shadow-lg shadow-primary-500/30"
|
||||
>
|
||||
<img :src="siteLogo || '/logo.png'" alt="Logo" class="h-full w-full object-contain" />
|
||||
<img :src="siteLogo || '/logo.svg'" alt="Logo" class="h-full w-full object-contain" />
|
||||
</div>
|
||||
<h1 class="text-gradient mb-2 text-3xl font-bold">
|
||||
{{ siteName }}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { updateFavicon } from '@/utils/branding'
|
||||
|
||||
describe('updateFavicon', () => {
|
||||
beforeEach(() => {
|
||||
document.head.innerHTML = '<link rel="icon" href="/logo.png">'
|
||||
document.head.innerHTML = '<link rel="icon" href="/logo.svg">'
|
||||
})
|
||||
|
||||
it('replaces the default favicon with the configured logo', () => {
|
||||
@@ -17,6 +17,6 @@ describe('updateFavicon', () => {
|
||||
updateFavicon('javascript:alert(1)')
|
||||
|
||||
const link = document.querySelector<HTMLLinkElement>('link[rel="icon"]')
|
||||
expect(link?.getAttribute('href')).toBe('/logo.png')
|
||||
expect(link?.getAttribute('href')).toBe('/logo.svg')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<!-- Logo -->
|
||||
<div class="flex items-center">
|
||||
<div class="h-10 w-10 overflow-hidden rounded-xl shadow-md">
|
||||
<img :src="siteLogo || '/logo.png'" alt="Logo" class="h-full w-full object-contain" />
|
||||
<img :src="siteLogo || '/logo.svg'" alt="Logo" class="h-full w-full object-contain" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<nav class="mx-auto flex max-w-6xl items-center justify-between">
|
||||
<router-link to="/home" class="flex items-center gap-3">
|
||||
<div class="h-10 w-10 overflow-hidden rounded-xl shadow-md">
|
||||
<img :src="siteLogo || '/logo.png'" alt="Logo" class="h-full w-full object-contain" />
|
||||
<img :src="siteLogo || '/logo.svg'" alt="Logo" class="h-full w-full object-contain" />
|
||||
</div>
|
||||
<span class="text-lg font-semibold tracking-tight text-gray-900 dark:text-white">{{ siteName }}</span>
|
||||
</router-link>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<RouterLink to="/home" class="flex min-w-0 items-center gap-3">
|
||||
<template v-if="settings">
|
||||
<span class="flex h-10 w-10 flex-shrink-0 items-center justify-center overflow-hidden rounded-xl bg-white shadow-sm ring-1 ring-gray-200 dark:bg-dark-800 dark:ring-dark-700">
|
||||
<img :src="siteLogo || '/logo.png'" alt="Logo" class="h-full w-full object-contain" />
|
||||
<img :src="siteLogo || '/logo.svg'" alt="Logo" class="h-full w-full object-contain" />
|
||||
</span>
|
||||
<span class="truncate text-base font-semibold text-gray-950 dark:text-white">
|
||||
{{ siteName }}
|
||||
|
||||
Reference in New Issue
Block a user