Skip to content

Commit

Permalink
refactor(www): Improving Folder structure, and updated site urls config
Browse files Browse the repository at this point in the history
  • Loading branch information
alifarooq9 committed May 14, 2024
1 parent 3af2b3f commit 404ccad
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import Balancer from "react-wrap-balancer";
import { Background } from "@/components/background";

export default async function HomePage() {
8;
const repoStars = await getRepoStars();

return (
<>
<section className="container flex flex-col items-center justify-center gap-4 py-20">
<Link
href={siteUrls.twitter}
href={siteUrls.socials.twitter}
className="flex items-center space-x-2 rounded-md bg-secondary px-3 py-2 text-sm hover:bg-secondary/80"
>
<span>🎉</span>
Expand All @@ -43,15 +44,15 @@ export default async function HomePage() {
</Balance>
<div className="flex items-center gap-4">
<Link
href={siteUrls.earlyAccess}
href={siteUrls.marketing.earlyAccess}
className={buttonVariants({
className: "flex items-center gap-2",
})}
>
Early Access
</Link>
<Link
href={siteUrls.github}
href={siteUrls.socials.github}
className={buttonVariants({
className: "flex items-center",
variant: "outline",
Expand Down
5 changes: 4 additions & 1 deletion apps/www/src/app/(app)/_components/mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export function MobileNav() {
</SheetTrigger>
<SheetContent side="left" className="pr-0">
<div className="mb-8">
<Link href={siteUrls.home} className="left-4 z-10">
<Link
href={siteUrls.marketing.base}
className="left-4 z-10"
>
<Icons.logo
iconProps={{
className:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function SaasStarterkitHighlight() {
<p className="gap-2 text-center text-sm sm:text-left">
For more information, Visit the{" "}
<Link
href={siteUrls.saasStarterkit}
href={siteUrls.saasStarterkit.base}
className={badgeVariants({
variant: "secondary",
className: "ml-1 mt-1 gap-0.5 sm:mt-0",
Expand All @@ -70,7 +70,7 @@ export function SaasStarterkitHighlight() {
))}

<Link
href={siteUrls.saasStarterkit}
href={siteUrls.saasStarterkit.base}
className={buttonVariants({
variant: "ghost",
size: "sm",
Expand Down
9 changes: 6 additions & 3 deletions apps/www/src/app/(app)/_components/side-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export function SiteHeader() {
<div className="flex items-center gap-5">
<MobileNav />

<Link href={siteUrls.home} className="left-4 z-10">
<Link
href={siteUrls.marketing.base}
className="left-4 z-10"
>
<Icons.logo
classNameText="hidden sm:block"
iconProps={{
Expand All @@ -29,7 +32,7 @@ export function SiteHeader() {

<nav className="flex items-center gap-2">
<Link
href={siteUrls.twitter}
href={siteUrls.socials.twitter}
target="_blank"
className={buttonVariants({
variant: "outline",
Expand All @@ -39,7 +42,7 @@ export function SiteHeader() {
<Icons.twitter className="h-4 w-4 fill-foreground" />
</Link>
<Link
href={siteUrls.github}
href={siteUrls.socials.github}
target="_blank"
className={buttonVariants({
variant: "outline",
Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/app/(app)/_components/site-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function SiteFooter() {
<p className="text-balance text-center text-sm leading-loose text-muted-foreground md:text-left">
Built by{" "}
<a
href={siteUrls.twitter}
href={siteUrls.socials.twitter}
target="_blank"
rel="noreferrer"
className="font-medium underline underline-offset-4"
Expand All @@ -16,7 +16,7 @@ export function SiteFooter() {
</a>
. The source code is available on{" "}
<a
href={siteUrls.github}
href={siteUrls.socials.github}
target="_blank"
rel="noreferrer"
className="font-medium underline underline-offset-4"
Expand Down
27 changes: 19 additions & 8 deletions apps/www/src/config/urls.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
export const siteUrls = {
home: "/",
saasStarterkit: "/saas-starterkit",
components: "/components",
blog: "/blog",
docs: "/docs",
twitter: "https://twitter.com/AliFarooqDev",
github: "/gh",
earlyAccess: "/#early-access",
marketing: {
base: "/",
pricing: "/pricing",
blog: "/blog",
earlyAccess: "/#early-access",
},
saasStarterkit: {
base: "/saas-starterkit",
},
docs: {
base: "/docs",
},
blocks: {
base: "/blocks",
},
socials: {
twitter: "https://twitter.com/AliFarooqDev",
github: "/gh",
},
} as const;

0 comments on commit 404ccad

Please sign in to comment.