Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

style: website header

Brad Barbin709c196d7410
diff --git a/apps/www/app/root.tsx b/apps/www/app/root.tsx
index baffaf182d..f9eb52e08d 100644
--- a/apps/www/app/root.tsx
+++ b/apps/www/app/root.tsx
@@ -1,6 +1,5 @@
-import { error, getBrowserEnv } from "@carbon/auth";
+import { getBrowserEnv } from "@carbon/auth";
import { getSessionFlash } from "@carbon/auth/session.server";
-import { validator } from "@carbon/form";
import { Button, Heading, toast } from "@carbon/react";
import {
Links,
@@ -13,24 +12,20 @@ import {
useRouteError,
} from "@remix-run/react";
import { Analytics } from "@vercel/analytics/react";
-import type {
- ActionFunctionArgs,
- LoaderFunctionArgs,
- MetaFunction,
-} from "@vercel/remix";
+import type { LoaderFunctionArgs, MetaFunction } from "@vercel/remix";
import { json } from "@vercel/remix";
import React, { useEffect } from "react";
-import { getMode, setMode } from "~/services/mode.server";
+import { getMode } from "~/services/mode.server";
import Tailwind from "~/styles/tailwind.css?url";
-import { modeValidator } from "~/types/validators";
-import { useMode } from "./hooks/useMode";
-
// export const config = { runtime: "edge" };
export function links() {
- return [{ rel: "stylesheet", href: Tailwind }];
+ return [
+ { rel: "stylesheet", href: Tailwind },
+ { rel: "stylesheet", href: "/assets/theme.css" },
+ ];
}
export const meta: MetaFunction = () => {
@@ -68,27 +63,6 @@ export async function loader({ request }: LoaderFunctionArgs) {
);
}
-export async function action({ request }: ActionFunctionArgs) {
- const validation = await validator(modeValidator).validate(
- await request.formData()
- );
-
- if (validation.error) {
- return json(error(validation.error, "Invalid mode"), {
- status: 400,
- });
- }
-
- return json(
- {
- mode: validation.data.mode,
- },
- {
- headers: { "Set-Cookie": setMode(validation.data.mode) },
- }
- );
-}
-
function Document({
children,
title = "CarbonOS",
@@ -132,11 +106,8 @@ export default function App() {
}
}, [result]);
- /* Dark/Light Mode */
- const mode = useMode();
-
return (
- <Document mode={mode}>
+ <Document mode="dark">
<Outlet />
<script
dangerouslySetInnerHTML={{
diff --git a/apps/www/app/routes/_index.tsx b/apps/www/app/routes/_index.tsx
index 51ff496685..5a7651f234 100644
--- a/apps/www/app/routes/_index.tsx
+++ b/apps/www/app/routes/_index.tsx
@@ -1,5 +1,7 @@
+import { Button, Heading } from "@carbon/react";
import { BsHexagonFill } from "react-icons/bs";
import { FaPlay } from "react-icons/fa6";
+import { LuMoveUpRight } from "react-icons/lu";
export default function Route() {
return (
@@ -15,16 +17,19 @@ export default function Route() {
</div>
</header>
- <div className="relative flex h-full w-full overflow-hidden bg-background">
+ <div className="relative flex h-full w-full items-start justify-center overflow-hidden bg-background">
<a
id="announcement"
href="https://google.com"
- className="fixed top-10 left-1/2 -translate-x-1/2 group items-center gap-2 border border-input rounded-full px-4 py-1.5 flex mb-4.5 text-xs hover:bg-alpha-gray-2 dark:hover:bg-gray-900 transition-theme"
+ className="fixed top-10 left-1/2 -translate-x-1/2 group items-center border border-input rounded-full px-4 py-1.5 flex mb-4.5 text-xs hover:bg-alpha-gray-2 dark:hover:bg-gray-900 transition-theme"
target="_blank"
rel="noreferrer"
>
- <FaPlay />
- Introducing CarbonOS: The operating system for manufacturing
+ <FaPlay className="mr-2" />
+ CarbonOS
+ <span className="hidden md:inline-flex">
+ : The operating system for manufacturing
+ </span>
<span className="absolute -top-px left-[2.5rem] h-px w-[calc(100%-5rem)] bg-gradient-to-r from-emerald-600/0 via-emerald-600/80 to-emerald-600/0 opacity-0 group-hover:opacity-100 transition-opacity transition-theme"></span>
<span className="absolute -top-px left-1/2 -translate-x-1/2 h-px w-[60px] bg-gradient-to-r from-emerald-300/0 via-emerald-300/50 to-emerald-300/0 mix-blend-overlay opacity-0 group-hover:opacity-100 transition-opacity transition-theme"></span>
</a>
@@ -36,6 +41,22 @@ export default function Route() {
<div className="light-ray ray-four"></div>
<div className="light-ray ray-five"></div>
</div>
+
+ <div id="intro" className="flex flex-col pt-[32vh] mx-auto w-container">
+ <Heading size="display" className="text-center">
+ Let's build something great
+ </Heading>
+ <p className="mb-6 text-center text-muted-foreground">
+ Realtime, collaborative, and powerful manufacturing software.
+ </p>
+ <Button
+ className="rounded-full w-fit mx-auto"
+ size="lg"
+ rightIcon={<LuMoveUpRight />}
+ >
+ Get Started
+ </Button>
+ </div>
</div>
</>
);
diff --git a/apps/www/app/routes/assets+/theme[.]css.ts b/apps/www/app/routes/assets+/theme[.]css.ts
new file mode 100644
index 0000000000..886b0cef9f
--- /dev/null
+++ b/apps/www/app/routes/assets+/theme[.]css.ts
@@ -0,0 +1,26 @@
+import { getThemeCode, themes } from "@carbon/utils";
+import type { LoaderFunctionArgs } from "@vercel/remix";
+
+// export const config = { runtime: "nodejs" };
+
+export async function loader({ request }: LoaderFunctionArgs) {
+ const selectedTheme = themes.find((t) => t.name === "zinc");
+
+ if (!selectedTheme) {
+ return new Response("", {
+ headers: {
+ "Content-Type": "text/css",
+ "Cache-Control": "public, max-age=31536000, immutable",
+ },
+ });
+ }
+
+ const css = getThemeCode(selectedTheme);
+
+ return new Response(css, {
+ headers: {
+ "Content-Type": "text/css",
+ "Cache-Control": "public, max-age=31536000, immutable",
+ },
+ });
+}
diff --git a/packages/react/src/Heading.tsx b/packages/react/src/Heading.tsx
index 587c2b6b3e..2942c70db7 100644
--- a/packages/react/src/Heading.tsx
+++ b/packages/react/src/Heading.tsx
@@ -10,7 +10,7 @@ const headingVariants = cva(
{
variants: {
size: {
- display: "md:text-4xl text-3xl",
+ display: "md:text-[44px] text-[36px]",
h1: "md:text-3xl text-2xl",
h2: "md:text-2xl text-xl",
h3: "md:text-xl text-base",