fulldev-ui 0.15.0 → 0.16.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/CHANGELOG.md +14 -0
- package/package.json +2 -3
- package/public/r/footer-1.json +2 -4
- package/public/r/footer-2.json +2 -4
- package/public/r/footer-3.json +2 -4
- package/public/r/icon.json +1 -1
- package/public/r/init.json +2 -3
- package/public/r/layout.json +1 -1
- package/public/r/registry.json +4 -11
- package/registry.json +4 -5
- package/src/components/blocks/footer-1.astro +16 -29
- package/src/components/blocks/footer-2.astro +13 -30
- package/src/components/blocks/footer-3.astro +16 -29
- package/src/components/ui/icon/icon.astro +13 -2
- package/src/components/ui/layout/layout-head.astro +1 -3
- package/src/lib/utils.ts +1 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#231](https://github.com/fulldotdev/ui/pull/231) [`ddf24cc`](https://github.com/fulldotdev/ui/commit/ddf24cc1ecae126f75e8ef8196bf5fc8a443cb9b) Thanks [@silveltman](https://github.com/silveltman)! - - `src/lib/utils.ts` re-exports `cn` from shadcn's `cn` package, which replaces `clsx` and `tailwind-merge`. The `init` item installs `cn` instead of those two. Existing sites keep working; to switch, replace `src/lib/utils.ts` with `export { cn } from "cn"`, add `cn`, and remove `clsx` and `tailwind-merge`.
|
|
8
|
+
|
|
9
|
+
## 0.16.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#225](https://github.com/fulldotdev/ui/pull/225) [`80f1a6e`](https://github.com/fulldotdev/ui/commit/80f1a6eba9a3ebe9c771d9717d8011c88e806523) Thanks [@silveltman](https://github.com/silveltman)! - - `LayoutHead` no longer renders `<Font>` for `--font-sans` and `--font-mono`, so a site no longer has to configure exactly those two fonts in `astro.config`. Without font configuration, text uses Tailwind's system font stack. A site that configures fonts renders `<Font cssVariable="--font-sans" />` (and any others) inside `LayoutHead`, as the Layout docs show. Sites that relied on the old behavior add those two lines.
|
|
14
|
+
- `footer-1`, `footer-2` and `footer-3` render social icons with `Icon`, so any Lucide or Simple Icons name works instead of only `github`, `discord` and `x`. `icon` is optional: without it, `Icon` derives the brand from the link, such as an Instagram or LinkedIn URL.
|
|
15
|
+
- `Icon` with only an `href` falls back to Lucide's `link` icon when the link is not a known brand or the brand has no logo in either icon set, such as LinkedIn, so a link never renders an empty icon.
|
|
16
|
+
|
|
3
17
|
## 0.15.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fulldev-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.1",
|
|
5
5
|
"description": "Open-source Astro UI components and blocks",
|
|
6
6
|
"homepage": "https://ui.full.dev",
|
|
7
7
|
"bugs": "https://github.com/fulldotdev/ui/issues",
|
|
@@ -73,12 +73,11 @@
|
|
|
73
73
|
"@lexingtonthemes/seo": "^0.4.0",
|
|
74
74
|
"@lucide/astro": "^1.49.0",
|
|
75
75
|
"class-variance-authority": "^0.7.1",
|
|
76
|
-
"
|
|
76
|
+
"cn": "^0.4.0",
|
|
77
77
|
"embla-carousel": "8.6.0",
|
|
78
78
|
"lucide-static": "^1.22.0",
|
|
79
79
|
"shadcn": "^4.12.0",
|
|
80
80
|
"simple-icons": "^16.24.1",
|
|
81
|
-
"tailwind-merge": "^3.6.0",
|
|
82
81
|
"tw-animate-css": "^1.4.0"
|
|
83
82
|
},
|
|
84
83
|
"peerDependencies": {
|
package/public/r/footer-1.json
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
"name": "footer-1",
|
|
4
4
|
"title": "Footer 1",
|
|
5
5
|
"description": "Footer layouts for utility navigation, brand presence, and last-mile calls to action.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"simple-icons"
|
|
8
|
-
],
|
|
9
6
|
"registryDependencies": [
|
|
7
|
+
"@fulldev/icon",
|
|
10
8
|
"@fulldev/logo",
|
|
11
9
|
"@fulldev/section",
|
|
12
10
|
"@fulldev/separator"
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
"files": [
|
|
15
13
|
{
|
|
16
14
|
"path": "src/components/blocks/footer-1.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
15
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoText } from \"@/components/ui/logo\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"footer\"> & {\n brandName: string\n brandHref: string\n description: string\n socials?: {\n label: string\n href: string\n icon?: string\n }[]\n columns: {\n title: string\n links: {\n label: string\n href: string\n }[]\n }[]\n copyright: string\n}\n\nconst {\n class: className,\n brandName,\n brandHref,\n description,\n socials,\n columns,\n copyright,\n ...props\n} = Astro.props\n---\n\n<footer class={cn(\"\", className)} {...props}>\n <Section class=\"py-16 lg:py-20\">\n <SectionContainer>\n <div class=\"grid gap-10 lg:grid-cols-[1fr_2fr]\">\n <div class=\"flex flex-col gap-5\">\n <Logo href={brandHref}>\n <LogoText>{brandName}</LogoText>\n </Logo>\n <p class=\"text-muted-foreground max-w-xs text-sm leading-relaxed\">\n {description}\n </p>\n {\n socials && socials.length > 0 && (\n <div class=\"flex items-center gap-3\">\n {socials.map((social) => (\n <a\n href={social.href}\n class=\"text-muted-foreground hover:text-foreground transition-colors\"\n aria-label={social.label}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n <Icon\n name={social.icon}\n href={social.href}\n class=\"size-4\"\n />\n </a>\n ))}\n </div>\n )\n }\n </div>\n <div class=\"grid gap-8 sm:grid-cols-3\">\n {\n columns.map((column) => (\n <div class=\"flex flex-col gap-3\">\n <p class=\"text-sm font-medium\">{column.title}</p>\n <ul class=\"flex flex-col gap-2.5\">\n {column.links.map((link) => (\n <li>\n <a\n href={link.href}\n class=\"text-muted-foreground hover:text-foreground text-sm transition-colors\"\n >\n {link.label}\n </a>\n </li>\n ))}\n </ul>\n </div>\n ))\n }\n </div>\n </div>\n <Separator />\n <p class=\"text-muted-foreground text-sm\">{copyright}</p>\n </SectionContainer>\n </Section>\n</footer>\n",
|
|
18
16
|
"type": "registry:block"
|
|
19
17
|
}
|
|
20
18
|
],
|
package/public/r/footer-2.json
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
"name": "footer-2",
|
|
4
4
|
"title": "Footer 2",
|
|
5
5
|
"description": "Footer layouts for utility navigation, brand presence, and last-mile calls to action.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"simple-icons"
|
|
8
|
-
],
|
|
9
6
|
"registryDependencies": [
|
|
7
|
+
"@fulldev/icon",
|
|
10
8
|
"@fulldev/logo",
|
|
11
9
|
"@fulldev/section",
|
|
12
10
|
"@fulldev/separator"
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
"files": [
|
|
15
13
|
{
|
|
16
14
|
"path": "src/components/blocks/footer-2.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
15
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoText } from \"@/components/ui/logo\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"footer\"> & {\n brandName: string\n brandHref: string\n description: string\n links?: {\n label: string\n href: string\n }[]\n socials?: {\n label: string\n href: string\n icon?: string\n }[]\n copyright: string\n navigationLabel?: string\n}\n\nconst {\n class: className,\n brandName,\n brandHref,\n description,\n links,\n socials,\n copyright,\n navigationLabel = \"Footer navigation\",\n ...props\n} = Astro.props\n---\n\n<footer class={cn(\"\", className)} {...props}>\n <Section class=\"py-12 lg:py-16\">\n <SectionContainer class=\"items-center text-center\">\n <Logo href={brandHref}>\n <LogoText>{brandName}</LogoText>\n </Logo>\n <p class=\"text-muted-foreground max-w-md text-sm leading-relaxed\">\n {description}\n </p>\n {\n links && links.length > 0 && (\n <nav\n aria-label={navigationLabel}\n class=\"flex flex-wrap items-center justify-center gap-x-6 gap-y-2\"\n >\n {links.map((link) => (\n <a\n href={link.href}\n class=\"text-muted-foreground hover:text-foreground text-sm transition-colors\"\n >\n {link.label}\n </a>\n ))}\n </nav>\n )\n }\n {\n socials && socials.length > 0 && (\n <div class=\"flex items-center justify-center gap-3\">\n {socials.map((social) => (\n <a\n href={social.href}\n class=\"text-muted-foreground hover:text-foreground transition-colors\"\n aria-label={social.label}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n <Icon name={social.icon} href={social.href} class=\"size-4\" />\n </a>\n ))}\n </div>\n )\n }\n <Separator />\n <p class=\"text-muted-foreground text-sm\">{copyright}</p>\n </SectionContainer>\n </Section>\n</footer>\n",
|
|
18
16
|
"type": "registry:block"
|
|
19
17
|
}
|
|
20
18
|
],
|
package/public/r/footer-3.json
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
"name": "footer-3",
|
|
4
4
|
"title": "Footer 3",
|
|
5
5
|
"description": "Footer layouts for utility navigation, brand presence, and last-mile calls to action.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"simple-icons"
|
|
8
|
-
],
|
|
9
6
|
"registryDependencies": [
|
|
7
|
+
"@fulldev/icon",
|
|
10
8
|
"@fulldev/logo",
|
|
11
9
|
"@fulldev/section",
|
|
12
10
|
"@fulldev/separator"
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
"files": [
|
|
15
13
|
{
|
|
16
14
|
"path": "src/components/blocks/footer-3.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
15
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoText } from \"@/components/ui/logo\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"footer\"> & {\n brandName: string\n brandHref: string\n description: string\n socials?: {\n label: string\n href: string\n icon?: string\n }[]\n columns: {\n title: string\n links: {\n label: string\n href: string\n }[]\n }[]\n copyright: string\n bottomLinks?: {\n label: string\n href: string\n }[]\n navigationLabel?: string\n}\n\nconst {\n class: className,\n brandName,\n brandHref,\n description,\n socials,\n columns,\n copyright,\n bottomLinks,\n navigationLabel = \"Footer navigation\",\n ...props\n} = Astro.props\n---\n\n<footer class={cn(\"\", className)} {...props}>\n <Section class=\"py-16 lg:py-20\">\n <SectionContainer>\n <div class=\"grid gap-10 lg:grid-cols-[1fr_2fr]\">\n <div class=\"flex flex-col gap-5\">\n <Logo href={brandHref}>\n <LogoText>{brandName}</LogoText>\n </Logo>\n <p class=\"text-muted-foreground max-w-xs text-sm leading-relaxed\">\n {description}\n </p>\n {\n socials && socials.length > 0 && (\n <div class=\"flex items-center gap-3\">\n {socials.map((social) => (\n <a\n href={social.href}\n class=\"text-muted-foreground hover:text-foreground transition-colors\"\n aria-label={social.label}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n <Icon\n name={social.icon}\n href={social.href}\n class=\"size-4\"\n />\n </a>\n ))}\n </div>\n )\n }\n </div>\n <div class=\"grid gap-8 sm:grid-cols-3\">\n {\n columns.map((column) => (\n <div class=\"flex flex-col gap-3\">\n <p class=\"text-sm font-medium\">{column.title}</p>\n <ul class=\"flex flex-col gap-2.5\">\n {column.links.map((link) => (\n <li>\n <a\n href={link.href}\n class=\"text-muted-foreground hover:text-foreground text-sm transition-colors\"\n >\n {link.label}\n </a>\n </li>\n ))}\n </ul>\n </div>\n ))\n }\n </div>\n </div>\n <Separator />\n <div\n class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\"\n >\n <p class=\"text-muted-foreground text-sm\">{copyright}</p>\n {\n bottomLinks && bottomLinks.length > 0 && (\n <nav\n aria-label={navigationLabel}\n class=\"flex flex-wrap items-center gap-x-5 gap-y-2\"\n >\n {bottomLinks.map((link) => (\n <a\n href={link.href}\n class=\"text-muted-foreground hover:text-foreground text-sm transition-colors\"\n >\n {link.label}\n </a>\n ))}\n </nav>\n )\n }\n </div>\n </SectionContainer>\n </Section>\n</footer>\n",
|
|
18
16
|
"type": "registry:block"
|
|
19
17
|
}
|
|
20
18
|
],
|
package/public/r/icon.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/ui/icon/icon.astro",
|
|
13
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = Omit<HTMLAttributes<\"svg\">, \"name\" | \"href\"> & {\n href?: HTMLAttributes<\"a\">[\"href\"]\n name?: string | number\n}\n\nconst { name, href, ...props } = Astro.props\n\nconst hrefMap = {\n \"x.com\": \"x\",\n twitter: \"twitter\",\n facebook: \"facebook\",\n instagram: \"instagram\",\n pinterest: \"pinterest\",\n youtube: \"youtube\",\n tiktok: \"tiktok\",\n snapchat: \"snapchat\",\n reddit: \"reddit\",\n tumblr: \"tumblr\",\n \"wa.me\": \"whatsapp\",\n telegram: \"telegram\",\n discord: \"discord\",\n vimeo: \"vimeo\",\n flickr: \"flickr\",\n yelp: \"yelp\",\n spotify: \"spotify\",\n behance: \"behance\",\n dribbble: \"dribbble\",\n soundcloud: \"soundcloud\",\n github: \"github\",\n twitch: \"twitch\",\n \"tel:\": \"phone\",\n \"mailto:\": \"mail\",\n \"maps.app.goo.gl\": \"map-pin\",\n linkedin: \"linkedin\",\n} as const\n\ntype Source = \"lucide\" | \"simple\"\n\nconst icons: Record<Source, Record<string, () => Promise<unknown>>> = {\n lucide: import.meta.glob(\"/node_modules/lucide-static/icons/*.svg\"),\n simple: import.meta.glob(\"/node_modules/simple-icons/icons/*.svg\"),\n}\n\nconst pathFor = (source: Source, icon: string) =>\n source === \"lucide\"\n ? `/node_modules/lucide-static/icons/${icon}.svg`\n : `/node_modules/simple-icons/icons/${icon}.svg`\n\n// Resolve an icon by explicit name, or derive one from a link href.\n// Names may be prefixed with `lucide:` or `simple:` to pick a set when both\n// sets contain the same name (for example `github` or `figma`).\nconst resolve = () => {\n let key =
|
|
13
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = Omit<HTMLAttributes<\"svg\">, \"name\" | \"href\"> & {\n href?: HTMLAttributes<\"a\">[\"href\"]\n name?: string | number\n}\n\nconst { name, href, ...props } = Astro.props\n\nconst hrefMap = {\n \"x.com\": \"x\",\n twitter: \"twitter\",\n facebook: \"facebook\",\n instagram: \"instagram\",\n pinterest: \"pinterest\",\n youtube: \"youtube\",\n tiktok: \"tiktok\",\n snapchat: \"snapchat\",\n reddit: \"reddit\",\n tumblr: \"tumblr\",\n \"wa.me\": \"whatsapp\",\n telegram: \"telegram\",\n discord: \"discord\",\n vimeo: \"vimeo\",\n flickr: \"flickr\",\n yelp: \"yelp\",\n spotify: \"spotify\",\n behance: \"behance\",\n dribbble: \"dribbble\",\n soundcloud: \"soundcloud\",\n github: \"github\",\n twitch: \"twitch\",\n \"tel:\": \"phone\",\n \"mailto:\": \"mail\",\n \"maps.app.goo.gl\": \"map-pin\",\n linkedin: \"linkedin\",\n} as const\n\ntype Source = \"lucide\" | \"simple\"\n\nconst icons: Record<Source, Record<string, () => Promise<unknown>>> = {\n lucide: import.meta.glob(\"/node_modules/lucide-static/icons/*.svg\"),\n simple: import.meta.glob(\"/node_modules/simple-icons/icons/*.svg\"),\n}\n\nconst pathFor = (source: Source, icon: string) =>\n source === \"lucide\"\n ? `/node_modules/lucide-static/icons/${icon}.svg`\n : `/node_modules/simple-icons/icons/${icon}.svg`\n\n// Resolve an icon by explicit name, or derive one from a link href.\n// Names may be prefixed with `lucide:` or `simple:` to pick a set when both\n// sets contain the same name (for example `github` or `figma`).\nconst hasName = name != null && name !== \"\"\n\nconst resolve = () => {\n let key = hasName ? String(name) : undefined\n let order: Source[] = [\"lucide\", \"simple\"]\n\n if (!key && href) {\n const hrefKey = Object.keys(hrefMap).find((candidate) =>\n href.toString().includes(candidate)\n )\n if (hrefKey) {\n key = hrefMap[hrefKey as keyof typeof hrefMap]\n order = [\"simple\", \"lucide\"]\n }\n }\n\n const linkIcon = {\n source: \"lucide\" as const,\n path: pathFor(\"lucide\", \"link\"),\n }\n\n if (!key) return href ? linkIcon : undefined\n if (key === \"x.com\") key = \"simple:x\"\n\n const [prefix, icon] = key.includes(\":\") ? key.split(\":\") : [undefined, key]\n if (prefix === \"lucide\" || prefix === \"simple\") order = [prefix]\n\n for (const source of order) {\n const path = pathFor(source, icon)\n if (path in icons[source]) return { source, path }\n }\n\n // A link always gets an icon, even when its brand has no logo in either set\n // (Simple Icons removed LinkedIn, for example).\n if (!hasName && href) return linkIcon\n\n return undefined\n}\n\nconst resolved = resolve()\nconst module = resolved\n ? ((await icons[resolved.source][resolved.path]()) as { default?: any })\n : undefined\nconst Comp = module?.default\n\nconst isLabelled =\n \"aria-label\" in props || \"aria-labelledby\" in props || \"role\" in props\n---\n\n{\n Comp && resolved && (\n <Comp\n height={24}\n width={24}\n fill={resolved.source === \"simple\" ? \"currentColor\" : \"none\"}\n class=\"size-[1em] text-base\"\n aria-hidden={isLabelled ? undefined : \"true\"}\n {...props}\n />\n )\n}\n",
|
|
14
14
|
"type": "registry:ui"
|
|
15
15
|
},
|
|
16
16
|
{
|
package/public/r/init.json
CHANGED
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
"description": "Shared setup: class helper, Tailwind token layer, and dependencies.",
|
|
6
6
|
"dependencies": [
|
|
7
7
|
"class-variance-authority",
|
|
8
|
-
"
|
|
8
|
+
"cn",
|
|
9
9
|
"shadcn",
|
|
10
|
-
"tailwind-merge",
|
|
11
10
|
"tw-animate-css"
|
|
12
11
|
],
|
|
13
12
|
"files": [
|
|
14
13
|
{
|
|
15
14
|
"path": "src/lib/utils.ts",
|
|
16
|
-
"content": "
|
|
15
|
+
"content": "export { cn } from \"cn\"\n",
|
|
17
16
|
"type": "registry:lib"
|
|
18
17
|
},
|
|
19
18
|
{
|
package/public/r/layout.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"path": "src/components/ui/layout/layout-head.astro",
|
|
17
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport {
|
|
17
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { getImage } from \"astro:assets\"\nimport { trailingSlash } from \"astro:config/server\"\nimport { AstroSeo } from \"@lexingtonthemes/seo\"\n\ntype Props = {\n name?: string\n title?: string\n description?: string\n image?: {\n src?: ImageMetadata | string\n alt?: string\n }\n noindex?: boolean\n nofollow?: boolean\n canonical?: string\n}\n\nconst baseUrl = Astro.site?.origin || Astro.url.origin\nconst pathnameWithSlash = Astro.url.pathname.endsWith(\"/\")\n ? Astro.url.pathname\n : `${Astro.url.pathname}/`\nconst pagePathname =\n trailingSlash === \"never\" && pathnameWithSlash !== \"/\"\n ? pathnameWithSlash.slice(0, -1)\n : pathnameWithSlash\n\nconst {\n name,\n title,\n description,\n image,\n noindex,\n nofollow,\n canonical,\n ...props\n} = Astro.props\n\nconst resolvedCanonical = new URL(canonical || pagePathname, baseUrl).toString()\n\nconst toImageMimeType = (format?: string) => {\n if (!format) return undefined\n if (format.includes(\"/\")) return format\n if (format === \"jpg\") return \"image/jpeg\"\n if (format === \"svg\") return \"image/svg+xml\"\n return `image/${format}`\n}\n\nconst transformedImage =\n image?.src && typeof image.src !== \"string\"\n ? await getImage({\n src: image.src,\n format: \"png\",\n width: 1200,\n height: 630,\n quality: \"medium\",\n })\n : undefined\n\nconst openGraphImage =\n image?.src && typeof image.src === \"string\"\n ? {\n url: new URL(image.src, baseUrl).toString(),\n alt: image.alt,\n }\n : transformedImage\n ? {\n url: new URL(transformedImage.src, baseUrl).toString(),\n alt: image?.alt,\n width: transformedImage.attributes.width,\n height: transformedImage.attributes.height,\n type: toImageMimeType(transformedImage.options.format),\n }\n : undefined\n---\n\n<head data-slot=\"layout-head\" {...props}>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"generator\" content={Astro.generator} />\n <meta charset=\"utf-8\" />\n <AstroSeo\n title={title}\n description={description}\n canonical={resolvedCanonical}\n noindex={noindex}\n nofollow={nofollow}\n openGraph={{\n url: resolvedCanonical,\n type: \"website\",\n ...(name && { site_name: name }),\n ...(openGraphImage && {\n images: [\n {\n ...openGraphImage,\n ...(openGraphImage.url.startsWith(\"https://\") && {\n secureUrl: openGraphImage.url,\n }),\n },\n ],\n }),\n }}\n twitter={{\n cardType: openGraphImage ? \"summary_large_image\" : \"summary\",\n }}\n />\n <slot />\n</head>\n",
|
|
18
18
|
"type": "registry:ui"
|
|
19
19
|
},
|
|
20
20
|
{
|
package/public/r/registry.json
CHANGED
|
@@ -3365,10 +3365,8 @@
|
|
|
3365
3365
|
"footer"
|
|
3366
3366
|
],
|
|
3367
3367
|
"docs": "https://ui.full.dev/blocks/footer/",
|
|
3368
|
-
"dependencies": [
|
|
3369
|
-
"simple-icons"
|
|
3370
|
-
],
|
|
3371
3368
|
"registryDependencies": [
|
|
3369
|
+
"@fulldev/icon",
|
|
3372
3370
|
"@fulldev/logo",
|
|
3373
3371
|
"@fulldev/section",
|
|
3374
3372
|
"@fulldev/separator"
|
|
@@ -3389,10 +3387,8 @@
|
|
|
3389
3387
|
"footer"
|
|
3390
3388
|
],
|
|
3391
3389
|
"docs": "https://ui.full.dev/blocks/footer/",
|
|
3392
|
-
"dependencies": [
|
|
3393
|
-
"simple-icons"
|
|
3394
|
-
],
|
|
3395
3390
|
"registryDependencies": [
|
|
3391
|
+
"@fulldev/icon",
|
|
3396
3392
|
"@fulldev/logo",
|
|
3397
3393
|
"@fulldev/section",
|
|
3398
3394
|
"@fulldev/separator"
|
|
@@ -3413,10 +3409,8 @@
|
|
|
3413
3409
|
"footer"
|
|
3414
3410
|
],
|
|
3415
3411
|
"docs": "https://ui.full.dev/blocks/footer/",
|
|
3416
|
-
"dependencies": [
|
|
3417
|
-
"simple-icons"
|
|
3418
|
-
],
|
|
3419
3412
|
"registryDependencies": [
|
|
3413
|
+
"@fulldev/icon",
|
|
3420
3414
|
"@fulldev/logo",
|
|
3421
3415
|
"@fulldev/section",
|
|
3422
3416
|
"@fulldev/separator"
|
|
@@ -4497,9 +4491,8 @@
|
|
|
4497
4491
|
"docs": "https://ui.full.dev/docs/installation/",
|
|
4498
4492
|
"dependencies": [
|
|
4499
4493
|
"class-variance-authority",
|
|
4500
|
-
"
|
|
4494
|
+
"cn",
|
|
4501
4495
|
"shadcn",
|
|
4502
|
-
"tailwind-merge",
|
|
4503
4496
|
"tw-animate-css"
|
|
4504
4497
|
],
|
|
4505
4498
|
"files": [
|
package/registry.json
CHANGED
|
@@ -3004,8 +3004,8 @@
|
|
|
3004
3004
|
"description": "Footer layouts for utility navigation, brand presence, and last-mile calls to action.",
|
|
3005
3005
|
"categories": ["footer"],
|
|
3006
3006
|
"docs": "https://ui.full.dev/blocks/footer/",
|
|
3007
|
-
"dependencies": ["simple-icons"],
|
|
3008
3007
|
"registryDependencies": [
|
|
3008
|
+
"@fulldev/icon",
|
|
3009
3009
|
"@fulldev/logo",
|
|
3010
3010
|
"@fulldev/section",
|
|
3011
3011
|
"@fulldev/separator"
|
|
@@ -3024,8 +3024,8 @@
|
|
|
3024
3024
|
"description": "Footer layouts for utility navigation, brand presence, and last-mile calls to action.",
|
|
3025
3025
|
"categories": ["footer"],
|
|
3026
3026
|
"docs": "https://ui.full.dev/blocks/footer/",
|
|
3027
|
-
"dependencies": ["simple-icons"],
|
|
3028
3027
|
"registryDependencies": [
|
|
3028
|
+
"@fulldev/icon",
|
|
3029
3029
|
"@fulldev/logo",
|
|
3030
3030
|
"@fulldev/section",
|
|
3031
3031
|
"@fulldev/separator"
|
|
@@ -3044,8 +3044,8 @@
|
|
|
3044
3044
|
"description": "Footer layouts for utility navigation, brand presence, and last-mile calls to action.",
|
|
3045
3045
|
"categories": ["footer"],
|
|
3046
3046
|
"docs": "https://ui.full.dev/blocks/footer/",
|
|
3047
|
-
"dependencies": ["simple-icons"],
|
|
3048
3047
|
"registryDependencies": [
|
|
3048
|
+
"@fulldev/icon",
|
|
3049
3049
|
"@fulldev/logo",
|
|
3050
3050
|
"@fulldev/section",
|
|
3051
3051
|
"@fulldev/separator"
|
|
@@ -3976,9 +3976,8 @@
|
|
|
3976
3976
|
"docs": "https://ui.full.dev/docs/installation/",
|
|
3977
3977
|
"dependencies": [
|
|
3978
3978
|
"class-variance-authority",
|
|
3979
|
-
"
|
|
3979
|
+
"cn",
|
|
3980
3980
|
"shadcn",
|
|
3981
|
-
"tailwind-merge",
|
|
3982
3981
|
"tw-animate-css"
|
|
3983
3982
|
],
|
|
3984
3983
|
"files": [
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
-
import Discord from "simple-icons/icons/discord.svg"
|
|
4
|
-
import Github from "simple-icons/icons/github.svg"
|
|
5
|
-
import X from "simple-icons/icons/x.svg"
|
|
6
3
|
|
|
7
4
|
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Icon } from "@/components/ui/icon"
|
|
8
6
|
import { Logo, LogoText } from "@/components/ui/logo"
|
|
9
7
|
import { Section, SectionContainer } from "@/components/ui/section"
|
|
10
8
|
import { Separator } from "@/components/ui/separator"
|
|
@@ -16,7 +14,7 @@ type Props = HTMLAttributes<"footer"> & {
|
|
|
16
14
|
socials?: {
|
|
17
15
|
label: string
|
|
18
16
|
href: string
|
|
19
|
-
icon
|
|
17
|
+
icon?: string
|
|
20
18
|
}[]
|
|
21
19
|
columns: {
|
|
22
20
|
title: string
|
|
@@ -38,12 +36,6 @@ const {
|
|
|
38
36
|
copyright,
|
|
39
37
|
...props
|
|
40
38
|
} = Astro.props
|
|
41
|
-
|
|
42
|
-
const iconMap: Record<string, any> = {
|
|
43
|
-
github: Github,
|
|
44
|
-
discord: Discord,
|
|
45
|
-
x: X,
|
|
46
|
-
}
|
|
47
39
|
---
|
|
48
40
|
|
|
49
41
|
<footer class={cn("", className)} {...props}>
|
|
@@ -60,26 +52,21 @@ const iconMap: Record<string, any> = {
|
|
|
60
52
|
{
|
|
61
53
|
socials && socials.length > 0 && (
|
|
62
54
|
<div class="flex items-center gap-3">
|
|
63
|
-
{socials.map((social) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
{socials.map((social) => (
|
|
56
|
+
<a
|
|
57
|
+
href={social.href}
|
|
58
|
+
class="text-muted-foreground hover:text-foreground transition-colors"
|
|
59
|
+
aria-label={social.label}
|
|
60
|
+
target="_blank"
|
|
61
|
+
rel="noreferrer"
|
|
62
|
+
>
|
|
63
|
+
<Icon
|
|
64
|
+
name={social.icon}
|
|
67
65
|
href={social.href}
|
|
68
|
-
class="
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
>
|
|
73
|
-
{IconComp && (
|
|
74
|
-
<IconComp
|
|
75
|
-
class="size-4"
|
|
76
|
-
fill="currentColor"
|
|
77
|
-
aria-hidden="true"
|
|
78
|
-
/>
|
|
79
|
-
)}
|
|
80
|
-
</a>
|
|
81
|
-
)
|
|
82
|
-
})}
|
|
66
|
+
class="size-4"
|
|
67
|
+
/>
|
|
68
|
+
</a>
|
|
69
|
+
))}
|
|
83
70
|
</div>
|
|
84
71
|
)
|
|
85
72
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
-
import Discord from "simple-icons/icons/discord.svg"
|
|
4
|
-
import Github from "simple-icons/icons/github.svg"
|
|
5
|
-
import X from "simple-icons/icons/x.svg"
|
|
6
3
|
|
|
7
4
|
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Icon } from "@/components/ui/icon"
|
|
8
6
|
import { Logo, LogoText } from "@/components/ui/logo"
|
|
9
7
|
import { Section, SectionContainer } from "@/components/ui/section"
|
|
10
8
|
import { Separator } from "@/components/ui/separator"
|
|
@@ -20,7 +18,7 @@ type Props = HTMLAttributes<"footer"> & {
|
|
|
20
18
|
socials?: {
|
|
21
19
|
label: string
|
|
22
20
|
href: string
|
|
23
|
-
icon
|
|
21
|
+
icon?: string
|
|
24
22
|
}[]
|
|
25
23
|
copyright: string
|
|
26
24
|
navigationLabel?: string
|
|
@@ -37,12 +35,6 @@ const {
|
|
|
37
35
|
navigationLabel = "Footer navigation",
|
|
38
36
|
...props
|
|
39
37
|
} = Astro.props
|
|
40
|
-
|
|
41
|
-
const iconMap: Record<string, any> = {
|
|
42
|
-
github: Github,
|
|
43
|
-
discord: Discord,
|
|
44
|
-
x: X,
|
|
45
|
-
}
|
|
46
38
|
---
|
|
47
39
|
|
|
48
40
|
<footer class={cn("", className)} {...props}>
|
|
@@ -74,26 +66,17 @@ const iconMap: Record<string, any> = {
|
|
|
74
66
|
{
|
|
75
67
|
socials && socials.length > 0 && (
|
|
76
68
|
<div class="flex items-center justify-center gap-3">
|
|
77
|
-
{socials.map((social) =>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<IconComp
|
|
89
|
-
class="size-4"
|
|
90
|
-
fill="currentColor"
|
|
91
|
-
aria-hidden="true"
|
|
92
|
-
/>
|
|
93
|
-
)}
|
|
94
|
-
</a>
|
|
95
|
-
)
|
|
96
|
-
})}
|
|
69
|
+
{socials.map((social) => (
|
|
70
|
+
<a
|
|
71
|
+
href={social.href}
|
|
72
|
+
class="text-muted-foreground hover:text-foreground transition-colors"
|
|
73
|
+
aria-label={social.label}
|
|
74
|
+
target="_blank"
|
|
75
|
+
rel="noreferrer"
|
|
76
|
+
>
|
|
77
|
+
<Icon name={social.icon} href={social.href} class="size-4" />
|
|
78
|
+
</a>
|
|
79
|
+
))}
|
|
97
80
|
</div>
|
|
98
81
|
)
|
|
99
82
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
-
import Discord from "simple-icons/icons/discord.svg"
|
|
4
|
-
import Github from "simple-icons/icons/github.svg"
|
|
5
|
-
import X from "simple-icons/icons/x.svg"
|
|
6
3
|
|
|
7
4
|
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Icon } from "@/components/ui/icon"
|
|
8
6
|
import { Logo, LogoText } from "@/components/ui/logo"
|
|
9
7
|
import { Section, SectionContainer } from "@/components/ui/section"
|
|
10
8
|
import { Separator } from "@/components/ui/separator"
|
|
@@ -16,7 +14,7 @@ type Props = HTMLAttributes<"footer"> & {
|
|
|
16
14
|
socials?: {
|
|
17
15
|
label: string
|
|
18
16
|
href: string
|
|
19
|
-
icon
|
|
17
|
+
icon?: string
|
|
20
18
|
}[]
|
|
21
19
|
columns: {
|
|
22
20
|
title: string
|
|
@@ -45,12 +43,6 @@ const {
|
|
|
45
43
|
navigationLabel = "Footer navigation",
|
|
46
44
|
...props
|
|
47
45
|
} = Astro.props
|
|
48
|
-
|
|
49
|
-
const iconMap: Record<string, any> = {
|
|
50
|
-
github: Github,
|
|
51
|
-
discord: Discord,
|
|
52
|
-
x: X,
|
|
53
|
-
}
|
|
54
46
|
---
|
|
55
47
|
|
|
56
48
|
<footer class={cn("", className)} {...props}>
|
|
@@ -67,26 +59,21 @@ const iconMap: Record<string, any> = {
|
|
|
67
59
|
{
|
|
68
60
|
socials && socials.length > 0 && (
|
|
69
61
|
<div class="flex items-center gap-3">
|
|
70
|
-
{socials.map((social) =>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
{socials.map((social) => (
|
|
63
|
+
<a
|
|
64
|
+
href={social.href}
|
|
65
|
+
class="text-muted-foreground hover:text-foreground transition-colors"
|
|
66
|
+
aria-label={social.label}
|
|
67
|
+
target="_blank"
|
|
68
|
+
rel="noreferrer"
|
|
69
|
+
>
|
|
70
|
+
<Icon
|
|
71
|
+
name={social.icon}
|
|
74
72
|
href={social.href}
|
|
75
|
-
class="
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
>
|
|
80
|
-
{IconComp && (
|
|
81
|
-
<IconComp
|
|
82
|
-
class="size-4"
|
|
83
|
-
fill="currentColor"
|
|
84
|
-
aria-hidden="true"
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
</a>
|
|
88
|
-
)
|
|
89
|
-
})}
|
|
73
|
+
class="size-4"
|
|
74
|
+
/>
|
|
75
|
+
</a>
|
|
76
|
+
))}
|
|
90
77
|
</div>
|
|
91
78
|
)
|
|
92
79
|
}
|
|
@@ -52,8 +52,10 @@ const pathFor = (source: Source, icon: string) =>
|
|
|
52
52
|
// Resolve an icon by explicit name, or derive one from a link href.
|
|
53
53
|
// Names may be prefixed with `lucide:` or `simple:` to pick a set when both
|
|
54
54
|
// sets contain the same name (for example `github` or `figma`).
|
|
55
|
+
const hasName = name != null && name !== ""
|
|
56
|
+
|
|
55
57
|
const resolve = () => {
|
|
56
|
-
let key =
|
|
58
|
+
let key = hasName ? String(name) : undefined
|
|
57
59
|
let order: Source[] = ["lucide", "simple"]
|
|
58
60
|
|
|
59
61
|
if (!key && href) {
|
|
@@ -66,7 +68,12 @@ const resolve = () => {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
const linkIcon = {
|
|
72
|
+
source: "lucide" as const,
|
|
73
|
+
path: pathFor("lucide", "link"),
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (!key) return href ? linkIcon : undefined
|
|
70
77
|
if (key === "x.com") key = "simple:x"
|
|
71
78
|
|
|
72
79
|
const [prefix, icon] = key.includes(":") ? key.split(":") : [undefined, key]
|
|
@@ -77,6 +84,10 @@ const resolve = () => {
|
|
|
77
84
|
if (path in icons[source]) return { source, path }
|
|
78
85
|
}
|
|
79
86
|
|
|
87
|
+
// A link always gets an icon, even when its brand has no logo in either set
|
|
88
|
+
// (Simple Icons removed LinkedIn, for example).
|
|
89
|
+
if (!hasName && href) return linkIcon
|
|
90
|
+
|
|
80
91
|
return undefined
|
|
81
92
|
}
|
|
82
93
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ImageMetadata } from "astro"
|
|
3
|
-
import {
|
|
3
|
+
import { getImage } from "astro:assets"
|
|
4
4
|
import { trailingSlash } from "astro:config/server"
|
|
5
5
|
import { AstroSeo } from "@lexingtonthemes/seo"
|
|
6
6
|
|
|
@@ -79,8 +79,6 @@ const openGraphImage =
|
|
|
79
79
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
80
80
|
<meta name="generator" content={Astro.generator} />
|
|
81
81
|
<meta charset="utf-8" />
|
|
82
|
-
<Font cssVariable="--font-sans" />
|
|
83
|
-
<Font cssVariable="--font-mono" />
|
|
84
82
|
<AstroSeo
|
|
85
83
|
title={title}
|
|
86
84
|
description={description}
|