@rxova/brand 0.7.0 → 0.8.0
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
|
@@ -20,16 +20,38 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { PROJECTS, RXOVA_ORIGIN, getProject, siteUrl, type ProjectId } from '../sites.ts'
|
|
22
22
|
|
|
23
|
+
/** A standalone surface of rxova.org, for the "Site" column. */
|
|
24
|
+
export interface SiteLink {
|
|
25
|
+
label: string
|
|
26
|
+
/** Absolute — see sites.ts. */
|
|
27
|
+
href: string
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
interface Props {
|
|
24
31
|
/** Current project, if this is a docs site. Omitted on the landing. */
|
|
25
32
|
project?: ProjectId
|
|
26
33
|
/** Optional per-site "Docs" column. */
|
|
27
34
|
docs?: { label: string; href: string }[]
|
|
35
|
+
/**
|
|
36
|
+
* The standalone surfaces to list under "Site", below Home.
|
|
37
|
+
*
|
|
38
|
+
* Defaults to Blog and Updates, which is what every surface showed when this
|
|
39
|
+
* column was hardcoded. It is a prop because only the umbrella repo knows
|
|
40
|
+
* which surfaces are actually *deployed* — `sources.json` gates the mount and
|
|
41
|
+
* the link together — and a hardcoded list advertises a 404 for a surface
|
|
42
|
+
* whose first build has not landed yet. Same reason `Header` takes `items`.
|
|
43
|
+
*/
|
|
44
|
+
site?: readonly SiteLink[]
|
|
28
45
|
}
|
|
29
46
|
|
|
30
|
-
const { project, docs } = Astro.props
|
|
47
|
+
const { project, docs, site } = Astro.props
|
|
31
48
|
const self = project ? getProject(project) : undefined
|
|
32
49
|
const year = new Date().getFullYear()
|
|
50
|
+
|
|
51
|
+
const surfaces: readonly SiteLink[] = site ?? [
|
|
52
|
+
{ label: 'Blog', href: siteUrl('/blog') },
|
|
53
|
+
{ label: 'Updates', href: siteUrl('/updates') },
|
|
54
|
+
]
|
|
33
55
|
---
|
|
34
56
|
|
|
35
57
|
<footer class="rx-footer">
|
|
@@ -108,8 +130,13 @@ const year = new Date().getFullYear()
|
|
|
108
130
|
<h2 class="rx-footer__title">Site</h2>
|
|
109
131
|
<ul class="rx-footer__list">
|
|
110
132
|
<li><a href={RXOVA_ORIGIN}>Home</a></li>
|
|
111
|
-
|
|
112
|
-
|
|
133
|
+
{
|
|
134
|
+
surfaces.map((s) => (
|
|
135
|
+
<li>
|
|
136
|
+
<a href={s.href}>{s.label}</a>
|
|
137
|
+
</li>
|
|
138
|
+
))
|
|
139
|
+
}
|
|
113
140
|
</ul>
|
|
114
141
|
</div>
|
|
115
142
|
|