diff --git a/.gitignore b/.gitignore index 137f3bc..ee9e552 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,16 @@ dist-ssr/ # Rust / Tauri src-tauri/target/ -src-tauri/gen/schemas/ +src-tauri/gen/ + +# Local dev scripts (machine-specific paths) +run.sh + +# Template assets (not used) +public/tauri.svg +public/vite.svg +src/assets/react.svg +src/App.css # Logs logs/ diff --git a/index.html b/index.html index 9dbe31e..9bd070b 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@
- +
diff --git a/src/index.css b/src/index.css
index 05872ea..93f69d7 100644
--- a/src/index.css
+++ b/src/index.css
@@ -32,10 +32,30 @@
padding: 0;
}
-html, body, #root {
+html, body {
height: 100%;
- width: 100%;
overflow: hidden;
+ overscroll-behavior: none;
+ margin: 0;
+ padding: 0;
+}
+
+html::-webkit-scrollbar,
+body::-webkit-scrollbar {
+ display: none;
+ width: 0;
+ height: 0;
+}
+
+html, body {
+ scrollbar-width: none;
+}
+
+#root {
+ position: fixed;
+ inset: 0;
+ overflow: hidden;
+ overscroll-behavior: none;
font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
diff --git a/src/main.tsx b/src/main.tsx
index 2be325e..831cee0 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -2,6 +2,21 @@ import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
+// Block all document-level scrolling
+document.addEventListener("wheel", (e) => {
+ let el = e.target as HTMLElement | null;
+ while (el && el !== document.documentElement) {
+ const { overflowY } = window.getComputedStyle(el);
+ if (overflowY === "scroll" || overflowY === "auto") return;
+ el = el.parentElement;
+ }
+ e.preventDefault();
+}, { passive: false });
+
+document.addEventListener("scroll", () => {
+ window.scrollTo(0, 0);
+}, { passive: true });
+
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(