diff --git a/.gitignore b/.gitignore index a547bf3..adc90cd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ node_modules dist dist-ssr *.local +yarn.lock # Editor directories and files .vscode/* diff --git a/package.json b/package.json index 045fa38..477366c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "bootstrap-icons": "^1.11.3", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -19,9 +20,12 @@ "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "@vitejs/plugin-react": "^4.2.1", + "autoprefixer": "^10.4.18", "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1", "typescript": "^5.2.2", "vite": "^5.1.4" } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..2e7af2b --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/src/App.css b/src/App.css deleted file mode 100644 index b9d355d..0000000 --- a/src/App.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/App.tsx b/src/App.tsx index afe48ac..a64584f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,35 +1,9 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' +import MainPage from "./pages/MainPage"; -function App() { - const [count, setCount] = useState(0) - - return ( - <> -
- - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

- - ) +function App () { + return ( + + ) } -export default App +export default App; \ No newline at end of file diff --git a/src/assets/img/background.png b/src/assets/img/background.png new file mode 100644 index 0000000..69d8cbb Binary files /dev/null and b/src/assets/img/background.png differ diff --git a/src/assets/img/ocs/lunar-oc.png b/src/assets/img/ocs/lunar-oc.png new file mode 100644 index 0000000..069a752 Binary files /dev/null and b/src/assets/img/ocs/lunar-oc.png differ diff --git a/src/assets/img/ocs/nola_3.png b/src/assets/img/ocs/nola_3.png new file mode 100644 index 0000000..8cdbea1 Binary files /dev/null and b/src/assets/img/ocs/nola_3.png differ diff --git a/src/components/MainBody.tsx b/src/components/MainBody.tsx new file mode 100644 index 0000000..dc6a802 --- /dev/null +++ b/src/components/MainBody.tsx @@ -0,0 +1,15 @@ +import React, { ReactNode } from "react"; +import BackroundImg from "../assets/img/background.png"; + +export default function MainBody({ children }: { children?: ReactNode }) { + return ( +
+ {children} +
+ ) +} \ No newline at end of file diff --git a/src/components/forms/Button.tsx b/src/components/forms/Button.tsx new file mode 100644 index 0000000..b3a8e9a --- /dev/null +++ b/src/components/forms/Button.tsx @@ -0,0 +1,23 @@ +import { CSSProperties, MouseEventHandler, ReactNode } from "react"; + +interface InButton { + className?: string; + style?: CSSProperties, + onClick?: MouseEventHandler + children?: ReactNode +} + +export default function Button ({ + className, + style, + onClick, + children +}: InButton) { + return ( + + ) +} \ No newline at end of file diff --git a/src/components/landing/Hero.tsx b/src/components/landing/Hero.tsx new file mode 100644 index 0000000..81a4c1e --- /dev/null +++ b/src/components/landing/Hero.tsx @@ -0,0 +1,51 @@ +import Button from "../forms/Button"; +import NolaImg from "../../assets/img/ocs/nola_3.png"; + +type ShortNav = { + name: string, + target: string +} + +interface InHero { + img: string; + shortNav: ShortNav[] +} + +export default function Hero ({ img, shortNav }: InHero) { + return ( +
+
+
+

+ Lunar Vein: Arduino Client +

+

+ Open-source API Based serial communication, it helps you testing the arduino board and some components without any code. + i don't even know anything about electronics and some IoT stuff lol +

+
+ {shortNav.map(({ name }, i) => ( + + ))} +
+
+ Made By + + Norman Andrians +
+
+
+
+ + Lunar + +
+
+
+ ) +} \ No newline at end of file diff --git a/src/css/index.css b/src/css/index.css new file mode 100644 index 0000000..40d2ebc --- /dev/null +++ b/src/css/index.css @@ -0,0 +1,10 @@ +@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap'); + +@tailwind base; +@tailwind components; +@tailwind utilities; + + +.container { + @apply w-[1280px] mx-auto; +} \ No newline at end of file diff --git a/src/data/control-navigation.json b/src/data/control-navigation.json new file mode 100644 index 0000000..4c55872 --- /dev/null +++ b/src/data/control-navigation.json @@ -0,0 +1,30 @@ +[ + { + "name": "Serial Monitor", + "target": "#serial-monitor" + }, + { + "name": "LED", + "target": "#led" + }, + { + "name": "RGB LED", + "target": "#rgb-led" + }, + { + "name": "Piezo", + "target": "#piezo" + }, + { + "name": "Moto Servo", + "target": "#moto-servo" + }, + { + "name": "Photoresistor", + "target": "#photoresistor" + }, + { + "name": "Ultrasonic sensor", + "target": "#ultrasonic-sensor" + } +] \ No newline at end of file diff --git a/src/index.css b/src/index.css deleted file mode 100644 index 6119ad9..0000000 --- a/src/index.css +++ /dev/null @@ -1,68 +0,0 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/src/main.tsx b/src/main.tsx index 3d7150d..6c414d5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.tsx' -import './index.css' +import './css/index.css' ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx new file mode 100644 index 0000000..59a0c28 --- /dev/null +++ b/src/pages/MainPage.tsx @@ -0,0 +1,19 @@ +import MainBody from "../components/MainBody"; +import Hero from "../components/landing/Hero"; + +import LunarImg from "../assets/img/ocs/lunar-oc.png"; + +import ControlNav from "../data/control-navigation.json"; + +function MainPage () { + return (<> + + + + ) +} + +export default MainPage; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..467db1a --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,26 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: [ + "./index.html", + "./src/**/*.{ts,tsx,js,jsx}" + ], + theme: { + extend: { + colors: { + 'primary': '#3A3AFF', + 'secondary': '#0B0B1D66', + 'finn': '#00000066', + 'danger': '#FF016C', + 'disabled': '#7373B0', + 'border': '#FFFFFF66', + 'background': '#06060C' + }, + fontFamily: { + 'poppins': '"Poppins", sans-serif', + 'roboto-mono': '"Roboto Mono", monospace', + } + }, + }, + plugins: [], +} +