@acms-subir/core 0.3.13 → 0.3.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @acms-subir/core
2
2
 
3
+ ## 0.3.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 8e89435: Show the published site logo and site name on the admin login page, including its dark-mode logo. Share logo rendering with the admin sidebar so both surfaces retain the framework fallback when no site logo is configured.
8
+
9
+ ## 0.3.14
10
+
11
+ ### Patch Changes
12
+
13
+ - 97e5313: The admin sidebar shows the site's logo (Design → logo, with its dark-mode variant) in place of the framework mark when one is set.
14
+
3
15
  ## 0.3.13
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acms-subir/core",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -0,0 +1,23 @@
1
+ ---
2
+ import { BRAND } from '../lib/brand';
3
+
4
+ interface Props {
5
+ logo?: string;
6
+ logoDark?: string;
7
+ size?: number;
8
+ }
9
+ const { logo, logoDark, size = 20 } = Astro.props;
10
+ ---
11
+
12
+ {logo ? (
13
+ <>
14
+ <img class:list={['brand-logo', { 'logo-light': !!logoDark }]} src={logo} alt="" />
15
+ {logoDark && <img class="brand-logo logo-dark" src={logoDark} alt="" />}
16
+ </>
17
+ ) : (
18
+ <svg width={size} height={size} viewBox="0 0 24 24" role="img" aria-label={BRAND.name}>
19
+ <rect x="1" y="3" width="22" height="4.4" rx="1.9" fill="currentColor" opacity="0.85" />
20
+ <rect x="1" y="10" width="12.5" height="4.4" rx="1.9" fill="var(--accent)" />
21
+ <rect x="1" y="17" width="17.5" height="4.4" rx="1.9" fill="currentColor" opacity="0.35" />
22
+ </svg>
23
+ )}
@@ -10,6 +10,7 @@ import { accessFor } from '../lib/permissions/access';
10
10
  import { AUTH } from '../lib/auth/config';
11
11
  import ClerkSession from '../components/auth/ClerkSession.astro';
12
12
  import ThemeScript from '../components/ThemeScript.astro';
13
+ import AdminLogo from '../components/AdminLogo.astro';
13
14
  import CommandPalette from '../components/CommandPalette';
14
15
  import '../styles/admin.css';
15
16
 
@@ -185,11 +186,7 @@ const themeOpts = [
185
186
  <div class="shell" id="acms-shell">
186
187
  <aside class="sidebar" aria-label="Admin navigation">
187
188
  <div class="brand">
188
- <svg width="20" height="20" viewBox="0 0 24 24" role="img" aria-label={BRAND.name}>
189
- <rect x="1" y="3" width="22" height="4.4" rx="1.9" fill="currentColor" opacity="0.85" />
190
- <rect x="1" y="10" width="12.5" height="4.4" rx="1.9" fill="var(--accent)" />
191
- <rect x="1" y="17" width="17.5" height="4.4" rx="1.9" fill="currentColor" opacity="0.35" />
192
- </svg>
189
+ <AdminLogo logo={settings.siteLogo} logoDark={settings.siteLogoDark} />
193
190
  <span class="brand-name" title={`v${BRAND.version} · ${BRAND.stack}`}>{siteName}</span>
194
191
  <button class="icon-btn" type="button" id="acms-rail-toggle" aria-label="Collapse sidebar" title="Collapse sidebar">
195
192
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d={icons.side} /></svg>
@@ -7,6 +7,7 @@ import { allowLogin } from '../../lib/auth/login-limit';
7
7
  import { getRepo } from '../../lib/repo';
8
8
  import { BRAND } from '../../lib/brand';
9
9
  import ThemeScript from '../../components/ThemeScript.astro';
10
+ import AdminLogo from '../../components/AdminLogo.astro';
10
11
  import ClerkSession from '../../components/auth/ClerkSession.astro';
11
12
  import '../../styles/admin.css';
12
13
 
@@ -55,7 +56,8 @@ const logoutAction = `/admin/logout${next ? `?next=${encodeURIComponent(next)}`
55
56
  // the destination query every sign-in link on this page carries forward
56
57
  const keep = next ? `next=${encodeURIComponent(next)}` : back ? `return=${encodeURIComponent(back)}` : '';
57
58
  const retryHref = `/admin/login${keep ? `?${keep}` : ''}`;
58
- const siteName = clerkMode ? (await (await getRepo(Astro.locals)).getSettings()).siteTitle || BRAND.name : BRAND.name;
59
+ const settings = await (await getRepo(Astro.locals)).getSettings();
60
+ const siteName = settings.siteTitle || BRAND.name;
59
61
 
60
62
  let error = '';
61
63
  if (!clerkMode && Astro.request.method === 'POST') {
@@ -105,7 +107,7 @@ if (!clerkMode && Astro.request.method === 'POST') {
105
107
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
106
108
  <ThemeScript />
107
109
  <meta name="robots" content="noindex" />
108
- <title>{clerkView === 'sign-up' ? 'Accept invitation' : 'Sign in'} · {BRAND.name} admin</title>
110
+ <title>{clerkView === 'sign-up' ? 'Accept invitation' : 'Sign in'} · {siteName} admin</title>
109
111
  <link rel="preconnect" href="https://fonts.googleapis.com" />
110
112
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
111
113
  <ClerkSession />
@@ -114,12 +116,8 @@ if (!clerkMode && Astro.request.method === 'POST') {
114
116
  <div class="login-wrap">
115
117
  <main class:list={['card card-pad login-card', { 'is-clerk': clerkMode }]}>
116
118
  <div class="brand">
117
- <svg width="26" height="26" viewBox="0 0 24 24" role="img" aria-label={BRAND.name}>
118
- <rect x="1" y="3" width="22" height="4.4" rx="1.9" fill="currentColor" opacity="0.85" />
119
- <rect x="1" y="10" width="12.5" height="4.4" rx="1.9" fill="var(--accent)" />
120
- <rect x="1" y="17" width="17.5" height="4.4" rx="1.9" fill="currentColor" opacity="0.35" />
121
- </svg>
122
- <div class="brand-name">{BRAND.name}</div>
119
+ <AdminLogo logo={settings.siteLogo} logoDark={settings.siteLogoDark} size={26} />
120
+ <div class="brand-name">{siteName}</div>
123
121
  </div>
124
122
 
125
123
  {!clerkMode && (
@@ -132,6 +132,9 @@ kbd {
132
132
  }
133
133
  .brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 12px; min-width: 0; }
134
134
  .brand-name { font-weight: 700; font-size: 13.5px; letter-spacing: -0.01em; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
135
+ .brand-logo { height: 20px; width: auto; max-width: 96px; object-fit: contain; flex: none; }
136
+ .brand .logo-dark, :root[data-theme='dark'] .brand .logo-light { display: none; }
137
+ :root[data-theme='dark'] .brand .logo-dark { display: block; }
135
138
  .brand-sub { font-size: 11px; color: var(--faint); margin-top: -2px; }
136
139
  .icon-btn {
137
140
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto;
@@ -224,6 +227,7 @@ kbd {
224
227
  .shell.is-rail .nav-item span, .shell.is-rail .nav-item .count, .shell.is-rail .nav-group > summary,
225
228
  .shell.is-rail .account .who, .shell.is-rail .account > svg { display: none; }
226
229
  .shell.is-rail .brand { padding: 6px 0 12px; flex-direction: column; }
230
+ .shell.is-rail .brand-logo { max-width: 40px; }
227
231
  .shell.is-rail .side-search { width: auto; padding: 7px; }
228
232
  .shell.is-rail .nav-item { justify-content: center; padding: 8px; }
229
233
  .shell.is-rail .nav-scroll { margin: 4px 0 0; padding: 0; }
@@ -752,6 +756,7 @@ dialog.modal[open] { animation: modal-in 0.16s ease-out; }
752
756
  .login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
753
757
  .login-card { width: 100%; max-width: 360px; }
754
758
  .login-card .brand { justify-content: center; padding-bottom: 20px; }
759
+ .login-card .brand-logo { height: 26px; max-width: 128px; }
755
760
  .login-card .brand-name { color: var(--text); flex: none; }
756
761
  .login-wrap { background: var(--bg); }
757
762
  .btn.block { width: 100%; justify-content: center; min-height: 38px; }