Skip to content

Commit 49ca473

Browse files
author
Dan Costello
committed
Update home page build dirs
WIP
1 parent 1f7bb73 commit 49ca473

File tree

7 files changed

+216
-134
lines changed

7 files changed

+216
-134
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: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
import Link from 'next/link';
2-
import Image from 'next/image';
1+
import Link from "next/link";
2+
import Image from "next/image";
33

44
export default function HomePage() {
55
return (
66
<main className="flex flex-1 flex-col items-center justify-center py-20 text-center px-4">
77
<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}
8+
<Image
9+
src={`${process.env.assetPrefix}/logo.png`}
10+
alt="UserClouds Logo"
11+
width={240}
12+
height={33}
1313
className="dark:saturate-200"
1414
priority
1515
/>
1616

1717
<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.
18+
An open-source identity management platform that simplifies
19+
authentication, authorization, and user data handling for modern
20+
applications.
2021
</p>
2122
</div>
2223

@@ -54,31 +55,71 @@ export default function HomePage() {
5455

5556
<div className="mt-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 max-w-6xl">
5657
<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">
58+
<svg
59+
xmlns="http://www.w3.org/2000/svg"
60+
width="24"
61+
height="24"
62+
viewBox="0 0 24 24"
63+
fill="none"
64+
stroke="currentColor"
65+
strokeWidth="2"
66+
strokeLinecap="round"
67+
strokeLinejoin="round"
68+
className="mb-4 text-fd-primary"
69+
>
5870
<rect width="18" height="11" x="3" y="11" rx="2" ry="2" />
5971
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
6072
</svg>
6173
<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>
74+
<p className="text-fd-muted-foreground text-center">
75+
Secure, flexible user authentication system with multiple identity
76+
providers
77+
</p>
6378
</div>
64-
79+
6580
<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">
81+
<svg
82+
xmlns="http://www.w3.org/2000/svg"
83+
width="24"
84+
height="24"
85+
viewBox="0 0 24 24"
86+
fill="none"
87+
stroke="currentColor"
88+
strokeWidth="2"
89+
strokeLinecap="round"
90+
strokeLinejoin="round"
91+
className="mb-4 text-fd-primary"
92+
>
6793
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10" />
6894
</svg>
6995
<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>
96+
<p className="text-fd-muted-foreground text-center">
97+
Fine-grained access control with easy-to-implement permission models
98+
</p>
7199
</div>
72-
100+
73101
<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">
102+
<svg
103+
xmlns="http://www.w3.org/2000/svg"
104+
width="24"
105+
height="24"
106+
viewBox="0 0 24 24"
107+
fill="none"
108+
stroke="currentColor"
109+
strokeWidth="2"
110+
strokeLinecap="round"
111+
strokeLinejoin="round"
112+
className="mb-4 text-fd-primary"
113+
>
75114
<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" />
76115
<path d="M16 2v4" />
77116
<path d="M8 2v4" />
78117
<path d="M2 10h20" />
79118
</svg>
80119
<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>
120+
<p className="text-fd-muted-foreground text-center">
121+
Centralized user data storage with privacy-preserving tokenization
122+
</p>
82123
</div>
83124
</div>
84125
</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: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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";
33

44
/**
55
* Shared layout configurations
@@ -9,12 +9,18 @@ import Image from 'next/image';
99
* Docs Layout: app/docs/layout.tsx
1010
*/
1111
export const baseOptions: BaseLayoutProps = {
12-
githubUrl: 'https://github.com/userclouds/userclouds-oss',
12+
githubUrl: "https://github.com/userclouds/userclouds-oss",
1313
nav: {
1414
title: (
1515
<>
16-
<Image src="/logo.png" width={160} height={22} alt="UserClouds logo" className="dark:saturate-200"/>
16+
<Image
17+
src={`${process.env.assetPrefix}/logo.png`}
18+
width={160}
19+
height={22}
20+
alt="UserClouds logo"
21+
className="dark:saturate-200"
22+
/>
1723
</>
1824
),
19-
}
25+
},
2026
};

next.config.mjs

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

5-
const isDev = process.env.NODE_ENV === "development";
4+
const isGithubActions = process.env.GITHUB_ACTIONS || false;
5+
6+
let assetPrefix = "./";
7+
let basePath = "";
8+
9+
if (isGithubActions) {
10+
const repo = process.env.GITHUB_REPOSITORY.replace(/.*?\//, "");
11+
12+
assetPrefix = `/${repo}/`;
13+
basePath = `/${repo}`;
14+
}
615

716
/** @type {import('next').NextConfig} */
817
const config = {
918
reactStrictMode: true,
1019
output: "export",
20+
assetPrefix,
21+
basePath,
22+
env: {
23+
assetPrefix,
24+
basePath,
25+
},
26+
trailingSlash: true,
1127
images: {
12-
unoptimized: isDev,
28+
unoptimized: true,
1329
},
1430
};
1531

0 commit comments

Comments
 (0)