feat: refresh nPanel brand mark

This commit is contained in:
2026-07-29 14:18:19 +08:00
parent 4d3f9c71d2
commit 832034a12c
4 changed files with 10 additions and 18 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
<svg width="120" height="33" viewBox="0 0 120 33" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M16.5 1 30 8.8v15.6L16.5 32 3 24.4V8.8L16.5 1Zm0 3.2-10.7 6.2v12.4l10.7 6.2 10.7-6.2V10.4L16.5 4.2Z"/>
<path d="m11 12.4 5.5-3.2 5.5 3.2v6.4l-5.5 3.2-5.5-3.2v-6.4Zm5.5-.1-2.7 1.5v3.6l2.7 1.5 2.7-1.5v-3.6l-2.7-1.5Z"/>
<path d="M16.5 2.25 29.5 9.75v15L16.5 32.25l-13-7.5v-15l13-7.5Z" fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"/>
<text x="16.5" y="22.25" font-family="Arial, sans-serif" font-size="18" font-weight="700" text-anchor="middle">n</text>
<text x="38" y="23" font-family="Arial, sans-serif" font-size="22" font-weight="700" letter-spacing="0">nPanel</text>
</svg>

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 499 B

@@ -1,8 +1,4 @@
<svg width="33" height="33" viewBox="0 0 33 33" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M19.4207 4.84191L7.78421 11.5601V21.6237L15.323 25.9772L12.4016 27.6635L4.86277 23.3101V9.87373L16.4993 3.15553L19.4207 4.84191Z"/>
<path d="M25.2158 21.6251L13.5779 28.3419L16.4993 30.0283L28.1372 23.3115L25.2158 21.6251Z"/>
<path d="M20.5983 5.52166L17.6769 7.20806L25.2157 11.5601V21.6237L28.1358 23.3101V9.87372L20.5983 5.52166Z"/>
<path d="M16.9219 9.32801L17.8136 9.86003V23.5262L16.9219 24.0405V9.32801Z"/>
<path d="M12.5233 11.8624L16.9219 9.32801L16.9205 24.0418L14.0716 22.3979V13.5775H12.5233V11.8624Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 8.79596L16.4993 1L30 8.79596V24.3879L16.4993 32.1838L3 24.3879V8.79596ZM29.6403 9.00384L16.4993 1.41714V1.41031L3.35834 8.99701V24.1786L16.4993 31.7722L29.6403 24.1854V9.00384Z" />
<svg width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.5 2.25 29.5 9.75v15L16.5 32.25l-13-7.5v-15l13-7.5Z" stroke="currentColor" stroke-width="3" stroke-linejoin="round"/>
<text x="16.5" y="22.25" fill="currentColor" font-family="Arial, sans-serif" font-size="18" font-weight="700" text-anchor="middle">n</text>
</svg>

Before

Width:  |  Height:  |  Size: 869 B

After

Width:  |  Height:  |  Size: 377 B

+3 -8
View File
@@ -1,9 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M11.1451 18.8875L5.66228 15.7224V8.40336L3.5376 7.1759V16.9488L9.02038 20.114L11.1451 18.8875Z" />
<path d="M18.3397 15.7224L12.0005 19.3819L9.87683 20.6083L12.0005 21.8348L20.4644 16.9488L18.3397 15.7224Z" />
<path d="M12.0015 4.74388L14.1252 3.5174L12.0005 2.28995L3.5376 7.17591L5.66228 8.40337L12.0005 4.74388H12.0015Z" />
<path d="M14.9816 4.01077L12.8569 5.23723L18.3397 8.40336V15.7224L20.4634 16.9488V7.1759L14.9816 4.01077Z" />
<path d="M11.9995 1.02569L21.5576 6.54428V17.5795L11.9995 23.0971L2.44343 17.5795V6.54428L11.9995 1.02569ZM11.9995 0.72728L2.18182 6.39707V17.7366L11.9995 23.4064L21.8182 17.7366V6.39707L11.9995 0.72728Z" />
<path d="M12.3079 6.78001L12.9564 7.16695V17.105L12.3079 17.48V6.78001Z" />
<path d="M12.3078 6.78001L9.10889 8.6222V9.86954H10.2359V16.2854L12.3059 17.481L12.3078 6.78001Z" />
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 1.5 21.1 6.75v10.5L12 22.5l-9.1-5.25V6.75L12 1.5Z" stroke="currentColor" stroke-width="2.2" stroke-linejoin="round"/>
<text x="12" y="16.7" fill="currentColor" font-family="Arial, sans-serif" font-size="13" font-weight="700" text-anchor="middle">n</text>
</svg>

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 375 B

+2 -1
View File
@@ -36,6 +36,7 @@ async function getColoredFavicon(url: string, color: string) {
const res = await fetch(url);
let svgText = await res.text();
svgText = svgText.replace(/fill=(["'])(.*?)\1/g, `fill="${color}"`);
svgText = svgText.replaceAll('currentColor', color);
return `data:image/svg+xml,${encodeURIComponent(svgText)}`;
}
@@ -46,7 +47,7 @@ export async function initFavicon() {
const isPro = globalStore.isXpackOrEE;
const themeColor = globalStore.themeConfig.primary;
const customFaviconUrl = `/api/v2/images/favicon?t=${Date.now()}`;
const fallbackSvg = isPro ? await getColoredFavicon(faviconUrl, themeColor) : '/public/favicon.png';
const fallbackSvg = await getColoredFavicon(faviconUrl, isPro ? themeColor : '#005eeb');
const setLink = (href: string) => {
let link = document.querySelector("link[rel*='icon']") as HTMLLinkElement;
if (!link) {