From ca4dcc7df844cbb01cb4117bbd0c5fef6a1da0df Mon Sep 17 00:00:00 2001 From: devaraj3 Date: Fri, 7 Aug 2026 12:27:21 +0530 Subject: [PATCH] feat: enhance accessibility and styling across the application with semantic HTML and improved button colors --- public/llms.txt | 4 ++-- src/main.tsx | 30 ++++++++++++++++++++++++-- src/pages/Landing.tsx | 10 ++++----- src/pages/guides/SplitStepAssembly.tsx | 4 ++-- src/ui/App.css | 4 ++-- 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/public/llms.txt b/public/llms.txt index 14ef8f6..6474302 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -21,7 +21,7 @@ CAD Viewer is an open-source, in-browser CAD file viewer built on the OpenCascad Free to use, no subscription required. ## Guides -- How to Split a STEP Assembly Into Separate Part Files (Free, Online): https://cadviewer.xyz/guides/split-step-assembly +- [How to Split a STEP Assembly Into Separate Part Files (Free, Online)](https://cadviewer.xyz/guides/split-step-assembly) ## Live app -https://cadviewer.xyz/ +[CAD Viewer](https://cadviewer.xyz/) diff --git a/src/main.tsx b/src/main.tsx index 9c5d7f1..b0128cd 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,9 +1,29 @@ +import { lazy, Suspense } from "react"; import { ClientOnly, Head, ViteReactSSG } from "vite-react-ssg"; import type { RouteRecord } from "vite-react-ssg"; -import App from "./ui/App"; import Landing from "./pages/Landing"; import SplitStepAssembly from "./pages/guides/SplitStepAssembly"; +const App = lazy(() => import("./ui/App")); + +function ViewerLoading() { + return ( +
+ Loading viewer… +
+ ); +} + function NotFound() { return (
CAD Viewer — 3D Viewer - {() => } + + {() => ( + }> + + + )} + ), }, diff --git a/src/pages/Landing.tsx b/src/pages/Landing.tsx index cc1c49f..a72840b 100644 --- a/src/pages/Landing.tsx +++ b/src/pages/Landing.tsx @@ -102,7 +102,7 @@ export default function Landing() { /> {/* LAYER 2: hero content — must be above canvas and fog */} -
fileInputRef.current?.click()} style={{ - background: "#3b82f6", + background: "#2563eb", color: "#ffffff", border: "none", borderRadius: "8px", @@ -156,13 +156,13 @@ export default function Landing() { }} onMouseEnter={(e) => { (e.currentTarget as HTMLButtonElement).style.background = - "#2563eb"; + "#1d4ed8"; (e.currentTarget as HTMLButtonElement).style.transform = "translateY(-1px)"; }} onMouseLeave={(e) => { (e.currentTarget as HTMLButtonElement).style.background = - "#3b82f6"; + "#2563eb"; (e.currentTarget as HTMLButtonElement).style.transform = "translateY(0)"; }} @@ -182,7 +182,7 @@ export default function Landing() { Supported: STEP · IGES · STL · OBJ · 3MF · BREP · GLB · DXF

-
+
); diff --git a/src/pages/guides/SplitStepAssembly.tsx b/src/pages/guides/SplitStepAssembly.tsx index b60d4aa..dc7fce6 100644 --- a/src/pages/guides/SplitStepAssembly.tsx +++ b/src/pages/guides/SplitStepAssembly.tsx @@ -163,7 +163,7 @@ export default function SplitStepAssembly() { {JSON.stringify(FAQ_JSON_LD)} -
+
@@ -303,7 +303,7 @@ export default function SplitStepAssembly() {
- + ); } diff --git a/src/ui/App.css b/src/ui/App.css index 163da69..5e7da46 100644 --- a/src/ui/App.css +++ b/src/ui/App.css @@ -448,12 +448,12 @@ a { font-weight: 600; color: #ffffff; border: none; - background: #3b82f6; + background: #2563eb; cursor: pointer; } .cad-app__upload-btn:hover { - background: #2563eb; + background: #1d4ed8; } .cad-app__upload-btn input {