create-lacspace-app 1.2.0 → 1.3.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/dist/index.js +64 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -566,6 +566,67 @@ function homePage(ctx) {
|
|
|
566
566
|
</section>
|
|
567
567
|
${FOOTER(n)}`);
|
|
568
568
|
}
|
|
569
|
+
var glyph = (ctx) => (ctx.template.siteName.trim()[0] ?? "A").toUpperCase();
|
|
570
|
+
var iconTsx = (ctx) => `import { ImageResponse } from "next/og";
|
|
571
|
+
|
|
572
|
+
// \u2728 Auto-generated favicon \u2014 a branded icon from your accent, no design file.
|
|
573
|
+
export const size = { width: 64, height: 64 };
|
|
574
|
+
export const contentType = "image/png";
|
|
575
|
+
|
|
576
|
+
export default function Icon() {
|
|
577
|
+
return new ImageResponse(
|
|
578
|
+
(
|
|
579
|
+
<div style={{ width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center", background: "linear-gradient(135deg, ${ctx.template.accent[0]}, ${ctx.template.accent[1]})", color: "white", fontSize: 40, fontWeight: 800, fontFamily: "sans-serif", borderRadius: 14 }}>
|
|
580
|
+
${glyph(ctx)}
|
|
581
|
+
</div>
|
|
582
|
+
),
|
|
583
|
+
{ ...size },
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
`;
|
|
587
|
+
var appleIconTsx = (ctx) => `import { ImageResponse } from "next/og";
|
|
588
|
+
|
|
589
|
+
// \u2728 Auto-generated Apple touch icon.
|
|
590
|
+
export const size = { width: 180, height: 180 };
|
|
591
|
+
export const contentType = "image/png";
|
|
592
|
+
|
|
593
|
+
export default function AppleIcon() {
|
|
594
|
+
return new ImageResponse(
|
|
595
|
+
(
|
|
596
|
+
<div style={{ width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center", background: "linear-gradient(135deg, ${ctx.template.accent[0]}, ${ctx.template.accent[1]})", color: "white", fontSize: 104, fontWeight: 800, fontFamily: "sans-serif" }}>
|
|
597
|
+
${glyph(ctx)}
|
|
598
|
+
</div>
|
|
599
|
+
),
|
|
600
|
+
{ ...size },
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
`;
|
|
604
|
+
var aboutPage = (ctx) => `import type { Metadata } from "next";
|
|
605
|
+
import Link from "next/link";
|
|
606
|
+
import { site } from "@/lib/site";
|
|
607
|
+
|
|
608
|
+
// \u2728 Per-page SEO, auto-generated: title template, canonical, Open Graph,
|
|
609
|
+
// Twitter card and its OWN dynamic OG image \u2014 all from one line.
|
|
610
|
+
export const metadata: Metadata = site.meta({
|
|
611
|
+
title: "About",
|
|
612
|
+
path: "/about",
|
|
613
|
+
description: "Learn more about ${ctx.template.siteName}.",
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
export default function AboutPage() {
|
|
617
|
+
return (
|
|
618
|
+
<main className="mx-auto max-w-3xl px-6 py-28">
|
|
619
|
+
<Link href="/" className="text-sm text-white/50 hover:text-white">\u2190 Back home</Link>
|
|
620
|
+
<h1 className="mt-6 text-4xl font-black sm:text-5xl gradient-text">About</h1>
|
|
621
|
+
<p className="mt-6 text-lg leading-relaxed text-white/60">
|
|
622
|
+
This page already has its own SEO \u2014 a unique title, canonical URL, Open Graph tags and a
|
|
623
|
+
generated social image \u2014 from a single <code>site.meta()</code> call. Duplicate this file for
|
|
624
|
+
any new route and it just works.
|
|
625
|
+
</p>
|
|
626
|
+
</main>
|
|
627
|
+
);
|
|
628
|
+
}
|
|
629
|
+
`;
|
|
569
630
|
function buildFiles(ctx) {
|
|
570
631
|
return {
|
|
571
632
|
"package.json": pkgJson(ctx),
|
|
@@ -578,8 +639,11 @@ function buildFiles(ctx) {
|
|
|
578
639
|
"app/layout.tsx": layout(ctx),
|
|
579
640
|
"app/globals.css": globalsCss(ctx),
|
|
580
641
|
"app/page.tsx": homePage(ctx),
|
|
642
|
+
"app/about/page.tsx": aboutPage(ctx),
|
|
581
643
|
"app/not-found.tsx": notFound(),
|
|
582
644
|
"app/og/route.tsx": ogRoute(ctx),
|
|
645
|
+
"app/icon.tsx": iconTsx(ctx),
|
|
646
|
+
"app/apple-icon.tsx": appleIconTsx(ctx),
|
|
583
647
|
"app/manifest.ts": manifestTs(ctx),
|
|
584
648
|
"app/robots.txt/route.ts": robotsTs(),
|
|
585
649
|
"app/sitemap.xml/route.ts": sitemapTs(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-lacspace-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Scaffold a beautiful, production-ready Next.js app from a Lacspace template — portfolio, business, e-commerce, SaaS, blog, docs, dashboard or restaurant — pre-wired with SEO, security headers, sitemap and robots. Like create-next-app, but you start gorgeous.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|