@glossarist/concept-browser 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glossarist/concept-browser",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Vue SPA for browsing Glossarist terminology datasets with cross-reference resolution, graph visualization, and multi-language support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -885,6 +885,14 @@ async function processLogo(logoConfig, filename) {
|
|
|
885
885
|
await processLogo(config.branding?.logo, `${config.id}-logo.svg`);
|
|
886
886
|
await processLogo(config.branding?.footerLogo, `${config.id}-footer-logo.svg`);
|
|
887
887
|
|
|
888
|
+
// Process light/dark logo variants
|
|
889
|
+
if (config.branding?.logo?.localLight) {
|
|
890
|
+
await processLogo({ localPath: config.branding.logo.localLight }, `${config.id}-logo-light.svg`);
|
|
891
|
+
}
|
|
892
|
+
if (config.branding?.logo?.localDark) {
|
|
893
|
+
await processLogo({ localPath: config.branding.logo.localDark }, `${config.id}-logo-dark.svg`);
|
|
894
|
+
}
|
|
895
|
+
|
|
888
896
|
// === Page processors ===
|
|
889
897
|
|
|
890
898
|
function processNewsPage(config, page) {
|
|
@@ -1107,9 +1115,14 @@ const basePathPrefix = process.env.BASE_PATH?.replace(/\/+$/, '') || '';
|
|
|
1107
1115
|
for (const key of ['logo', 'footerLogo']) {
|
|
1108
1116
|
const suffix = key === 'logo' ? 'logo.svg' : 'footer-logo.svg';
|
|
1109
1117
|
if (siteBranding[key]) {
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1118
|
+
const updated = { ...siteBranding[key], path: `${basePathPrefix}/logos/${config.id}-${suffix}` };
|
|
1119
|
+
if (siteBranding[key].localLight) updated.light = `${basePathPrefix}/logos/${config.id}-${suffix.replace('.svg', '-light.svg')}`;
|
|
1120
|
+
if (siteBranding[key].localDark) updated.dark = `${basePathPrefix}/logos/${config.id}-${suffix.replace('.svg', '-dark.svg')}`;
|
|
1121
|
+
delete updated.localPath;
|
|
1122
|
+
delete updated.remoteUrl;
|
|
1123
|
+
delete updated.localLight;
|
|
1124
|
+
delete updated.localDark;
|
|
1125
|
+
siteBranding[key] = updated;
|
|
1113
1126
|
}
|
|
1114
1127
|
}
|
|
1115
1128
|
|
|
@@ -64,6 +64,13 @@ onBeforeUnmount(() => document.removeEventListener('click', closeLangOnOutside))
|
|
|
64
64
|
<button @click="goHome" class="flex items-center gap-2 hover:opacity-80 transition flex-shrink-0 group">
|
|
65
65
|
<div v-if="siteConfig?.branding?.logo" class="h-8 flex items-center">
|
|
66
66
|
<img
|
|
67
|
+
v-if="siteConfig.branding.logo.light && siteConfig.branding.logo.dark"
|
|
68
|
+
:src="ui.isDark ? siteConfig.branding.logo.dark : siteConfig.branding.logo.light"
|
|
69
|
+
:alt="siteConfig.branding.logo.alt"
|
|
70
|
+
class="h-8 max-w-[48px] object-contain rounded"
|
|
71
|
+
/>
|
|
72
|
+
<img
|
|
73
|
+
v-else
|
|
67
74
|
:src="siteConfig.branding.logo.path"
|
|
68
75
|
:alt="siteConfig.branding.logo.alt"
|
|
69
76
|
class="h-8 max-w-[48px] object-contain rounded"
|
package/src/config/types.ts
CHANGED
|
@@ -21,8 +21,8 @@ export interface RuntimeSiteConfig {
|
|
|
21
21
|
header?: { family: string; source: string; weights?: number[]; url?: string };
|
|
22
22
|
body?: { family: string; source: string; weights?: number[]; url?: string };
|
|
23
23
|
};
|
|
24
|
-
logo?: { path: string; alt: string; url?: string };
|
|
25
|
-
footerLogo?: { path: string; alt: string; url?: string };
|
|
24
|
+
logo?: { path: string; alt: string; url?: string; light?: string; dark?: string };
|
|
25
|
+
footerLogo?: { path: string; alt: string; url?: string; light?: string; dark?: string };
|
|
26
26
|
ownerName?: string;
|
|
27
27
|
ownerUrl?: string;
|
|
28
28
|
};
|