@contentrain/astro-kit 0.49.1 → 0.49.3

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/catalog.json CHANGED
@@ -3072,6 +3072,11 @@
3072
3072
  "required": true,
3073
3073
  "description": "Site title (site.title or site.organization)."
3074
3074
  },
3075
+ "homeHref": {
3076
+ "type": "url",
3077
+ "default": "/",
3078
+ "description": "Where the brand (the site name) links: the site's home."
3079
+ },
3075
3080
  "tagline": {
3076
3081
  "type": "string",
3077
3082
  "description": "A line under the name (site.tagline, or the source footer's about text); line breaks are kept, so a credit under it stays its own line."
@@ -45,6 +45,8 @@ const footer = tv({
45
45
 
46
46
  interface Props {
47
47
  siteName: string
48
+ /** Where the brand (the site name) links: the site's home, `/` when absent — a source footer's site title links there. */
49
+ homeHref?: string | undefined
48
50
  tagline?: string | undefined
49
51
  /** Link groups for the `columns` layout. `titleHref`: the heading is a link to it (a source heading printed as one). */
50
52
  columns?: Array<{ title?: string | undefined, titleHref?: string | undefined, label?: string | undefined, links: LinkInput[] }> | undefined
@@ -86,7 +88,7 @@ interface Props {
86
88
  wordmarkOrder?: 'last' | 'first' | undefined
87
89
  }
88
90
 
89
- const { siteName, tagline, columns = [], links = [], social = [], contact, copyright, consentLabel, navLabel = 'Footer', layout = 'simple', tone, align, pack, packGap, narrow, packGapNarrow, linkSize, linkSizeNarrow, border, wordmark, wordmarkOrder } = Astro.props
91
+ const { siteName, homeHref = '/', tagline, columns = [], links = [], social = [], contact, copyright, consentLabel, navLabel = 'Footer', layout = 'simple', tone, align, pack, packGap, narrow, packGapNarrow, linkSize, linkSizeNarrow, border, wordmark, wordmarkOrder } = Astro.props
90
92
  const { root, inner, muted, link } = footer({ layout, tone, align, pack: layout === 'columns' ? pack : undefined, narrow: layout === 'columns' && pack === 'end' ? narrow : undefined, border: (border ?? (tone ?? 'default') === 'default') ? 'on' : 'off' })
91
93
  // Custom properties the packed columns and sized links read; none when none is set.
92
94
  const vars = footerVars({ layout, columnCount: columns.length, pack, narrow, packGap, packGapNarrow, linkSize, linkSizeNarrow })
@@ -108,7 +110,7 @@ const mark = wordmark === 'fit' || wordmark === 'crop' ? wordmarkBox(siteName, w
108
110
  {mark && wordmarkOrder === 'first' && <div class="container-page pt-10" data-kit-wordmark><svg viewBox={`0 0 1000 ${mark.height}`} class="block h-auto w-full fill-current" aria-hidden="true" focusable="false"><text x="0" y={mark.baseline} textLength="1000" lengthAdjust="spacing" font-size={mark.size} class="[font-family:var(--font-heading,inherit)] [font-weight:var(--font-weight-heading,700)]">{siteName}</text></svg></div>}
109
111
  <div class:list={[inner(), ...footerLinkSizeClasses({ linkSize, linkSizeNarrow })]} data-kit-footer style={vars || undefined}>
110
112
  <div class="flex flex-col gap-3">
111
- <p class="text-base font-semibold" data-kit-brand>{siteName}</p>
113
+ <p class="text-base font-semibold" data-kit-brand><a href={safeHref(homeHref)} class="text-current no-underline hover:underline">{siteName}</a></p>
112
114
  {/* Line breaks are kept: an about line and the designer's credit under it ("Web Tasarım: …") stay two lines. */}
113
115
  {tagline && <p class={`${muted()} whitespace-pre-line`} data-kit-tagline>{tagline}</p>}
114
116
  {hasContact && (
@@ -75,6 +75,11 @@
75
75
  "required": true,
76
76
  "description": "Site title (site.title or site.organization)."
77
77
  },
78
+ "homeHref": {
79
+ "type": "url",
80
+ "default": "/",
81
+ "description": "Where the brand (the site name) links: the site's home."
82
+ },
78
83
  "tagline": {
79
84
  "type": "string",
80
85
  "description": "A line under the name (site.tagline, or the source footer's about text); line breaks are kept, so a credit under it stays its own line."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentrain/astro-kit",
3
- "version": "0.49.1",
3
+ "version": "0.49.3",
4
4
  "license": "MIT",
5
5
  "description": "Copy-in Astro components for Contentrain sites (shadcn model): typed props, tailwind-variants, zero JavaScript by default — with a machine-readable catalog",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "mapping"
43
43
  ],
44
44
  "dependencies": {
45
- "@contentrain/types": "1.74.0"
45
+ "@contentrain/types": "1.75.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^22.10.0",