Skip to content

Commit 71236bb

Browse files
author
Dan Costello
committed
Update home page build dirs
1 parent 1f7bb73 commit 71236bb

File tree

8 files changed

+211
-135
lines changed

8 files changed

+211
-135
lines changed

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NEXT_PUBLIC_ASSET_PREFIX=""
2+
NEXT_PUBLIC_BASE_PATH=""

app/(home)/page.tsx

Lines changed: 59 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
import Link from 'next/link';
2-
import Image from 'next/image';
1+
import Link from "next/link";
2+
import Image from "next/image";
3+
import { BASE_PATH } from "@/app/utils/constants";
34

45
export default function HomePage() {
56
return (
67
<main className="flex flex-1 flex-col items-center justify-center py-20 text-center px-4">
78
<div className="mb-10 flex flex-col items-center gap-y-6">
8-
<Image
9-
src="/logo.png"
10-
alt="UserClouds Logo"
11-
width={240}
12-
height={33}
9+
<Image
10+
src={`${BASE_PATH}/logo.png`}
11+
alt="UserClouds Logo"
12+
width={240}
13+
height={33}
1314
className="dark:saturate-200"
1415
priority
1516
/>
1617

1718
<p className="text-xl text-fd-muted-foreground max-w-3xl">
18-
An open-source identity management platform that simplifies authentication, authorization,
19-
and user data handling for modern applications.
19+
An open-source identity management platform that simplifies
20+
authentication, authorization, and user data handling for modern
21+
applications.
2022
</p>
2123
</div>
2224

@@ -54,31 +56,71 @@ export default function HomePage() {
5456

5557
<div className="mt-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 max-w-6xl">
5658
<div className="flex flex-col items-center p-6 bg-fd-card rounded-lg border border-fd-border">
57-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="mb-4 text-fd-primary">
59+
<svg
60+
xmlns="http://www.w3.org/2000/svg"
61+
width="24"
62+
height="24"
63+
viewBox="0 0 24 24"
64+
fill="none"
65+
stroke="currentColor"
66+
strokeWidth="2"
67+
strokeLinecap="round"
68+
strokeLinejoin="round"
69+
className="mb-4 text-fd-primary"
70+
>
5871
<rect width="18" height="11" x="3" y="11" rx="2" ry="2" />
5972
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
6073
</svg>
6174
<h3 className="text-lg font-semibold mb-2">Authentication</h3>
62-
<p className="text-fd-muted-foreground text-center">Secure, flexible user authentication system with multiple identity providers</p>
75+
<p className="text-fd-muted-foreground text-center">
76+
Secure, flexible user authentication system with multiple identity
77+
providers
78+
</p>
6379
</div>
64-
80+
6581
<div className="flex flex-col items-center p-6 bg-fd-card rounded-lg border border-fd-border">
66-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="mb-4 text-fd-primary">
82+
<svg
83+
xmlns="http://www.w3.org/2000/svg"
84+
width="24"
85+
height="24"
86+
viewBox="0 0 24 24"
87+
fill="none"
88+
stroke="currentColor"
89+
strokeWidth="2"
90+
strokeLinecap="round"
91+
strokeLinejoin="round"
92+
className="mb-4 text-fd-primary"
93+
>
6794
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10" />
6895
</svg>
6996
<h3 className="text-lg font-semibold mb-2">Authorization</h3>
70-
<p className="text-fd-muted-foreground text-center">Fine-grained access control with easy-to-implement permission models</p>
97+
<p className="text-fd-muted-foreground text-center">
98+
Fine-grained access control with easy-to-implement permission models
99+
</p>
71100
</div>
72-
101+
73102
<div className="flex flex-col items-center p-6 bg-fd-card rounded-lg border border-fd-border">
74-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="mb-4 text-fd-primary">
103+
<svg
104+
xmlns="http://www.w3.org/2000/svg"
105+
width="24"
106+
height="24"
107+
viewBox="0 0 24 24"
108+
fill="none"
109+
stroke="currentColor"
110+
strokeWidth="2"
111+
strokeLinecap="round"
112+
strokeLinejoin="round"
113+
className="mb-4 text-fd-primary"
114+
>
75115
<path d="M21 5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2" />
76116
<path d="M16 2v4" />
77117
<path d="M8 2v4" />
78118
<path d="M2 10h20" />
79119
</svg>
80120
<h3 className="text-lg font-semibold mb-2">User Data Management</h3>
81-
<p className="text-fd-muted-foreground text-center">Centralized user data storage with privacy-preserving tokenization</p>
121+
<p className="text-fd-muted-foreground text-center">
122+
Centralized user data storage with privacy-preserving tokenization
123+
</p>
82124
</div>
83125
</div>
84126
</main>

app/global.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import 'tailwindcss';
2-
@import 'fumadocs-ui/css/neutral.css';
3-
@import 'fumadocs-ui/css/preset.css';
1+
@import "tailwindcss";
2+
@import "fumadocs-ui/css/neutral.css";
3+
@import "fumadocs-ui/css/preset.css";
44

55
@theme {
66
--fd-sidebar-width: 0px;
@@ -39,7 +39,7 @@
3939
--color-fd-card: hsla(220, 56%, 15%, 0.4);
4040
--color-fd-card-foreground: hsl(220, 60%, 94%);
4141
--color-fd-border: hsla(220, 50%, 50%, 0.2);
42-
--color-fd-primary: hsl(205, 100%, 85%);
42+
--color-fd-primary: hsl(203, 100%, 50%);
4343
--color-fd-primary-foreground: hsl(0, 0%, 20%);
4444
--color-fd-secondary: hsl(220, 50%, 20%);
4545
--color-fd-secondary-foreground: hsl(220, 80%, 90%);
@@ -57,4 +57,4 @@
5757
background-repeat: no-repeat;
5858
}
5959

60-
@import 'fumadocs-openapi/css/preset.css';
60+
@import "fumadocs-openapi/css/preset.css";

app/layout.config.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
2-
import Image from 'next/image';
1+
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
2+
import Image from "next/image";
3+
import { BASE_PATH } from "@/app/utils/constants";
34

45
/**
56
* Shared layout configurations
@@ -9,12 +10,18 @@ import Image from 'next/image';
910
* Docs Layout: app/docs/layout.tsx
1011
*/
1112
export const baseOptions: BaseLayoutProps = {
12-
githubUrl: 'https://github.com/userclouds/userclouds-oss',
13+
githubUrl: "https://github.com/userclouds/userclouds-oss",
1314
nav: {
1415
title: (
1516
<>
16-
<Image src="/logo.png" width={160} height={22} alt="UserClouds logo" className="dark:saturate-200"/>
17+
<Image
18+
src={`${BASE_PATH}/logo.png`}
19+
width={160}
20+
height={22}
21+
alt="UserClouds logo"
22+
className="dark:saturate-200"
23+
/>
1724
</>
1825
),
19-
}
26+
},
2027
};

app/utils/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const isProd = process.env.NODE_ENV === "production";
2+
3+
export const BASE_PATH = isProd
4+
? (process.env.NEXT_PUBLIC_BASE_URL ?? `${process.env.PWD}/out` ?? "")
5+
: "";

next.config.mjs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import { createMDX } from "fumadocs-mdx/next";
2-
32
const withMDX = createMDX();
43

5-
const isDev = process.env.NODE_ENV === "development";
6-
4+
const isProd = process.env.NODE_ENV === "production";
75
/** @type {import('next').NextConfig} */
86
const config = {
97
reactStrictMode: true,
108
output: "export",
9+
assetPrefix: isProd ? (process.env.NEXT_PUBLIC_ASSET_PREFIX ?? "./") : "",
10+
basePath: isProd
11+
? (process.env.NEXT_PUBLIC_BASE_PATH ?? `${process.env.PWD}/out` ?? "")
12+
: "",
13+
trailingSlash: true,
1114
images: {
12-
unoptimized: isDev,
15+
unoptimized: true,
1316
},
1417
};
1518

0 commit comments

Comments
 (0)