home page
parent
176f2f7b07
commit
aafb97b2ac
|
|
@ -1,5 +1,6 @@
|
|||
import { useEffect } from 'react';
|
||||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
||||
import { LandingPage } from './pages/LandingPage';
|
||||
import { EditorPage } from './pages/EditorPage';
|
||||
import { ExamplesPage } from './pages/ExamplesPage';
|
||||
import { LoginPage } from './pages/LoginPage';
|
||||
|
|
@ -19,7 +20,8 @@ function App() {
|
|||
return (
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="/" element={<EditorPage />} />
|
||||
<Route path="/" element={<LandingPage />} />
|
||||
<Route path="/editor" element={<EditorPage />} />
|
||||
<Route path="/examples" element={<ExamplesPage />} />
|
||||
<Route path="/login" element={<LoginPage />} />
|
||||
<Route path="/register" element={<RegisterPage />} />
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ export const ExamplesGallery: React.FC<ExamplesGalleryProps> = ({ onLoadExample
|
|||
return (
|
||||
<div className="examples-gallery">
|
||||
<div className="examples-nav">
|
||||
<Link to="/" className="back-link">
|
||||
<Link to="/editor" className="back-link">
|
||||
← Back to Editor
|
||||
</Link>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export const AppHeader: React.FC<AppHeaderProps> = () => {
|
|||
<path d="M9 1v4M15 1v4M9 19v4M15 19v4M1 9h4M1 15h4M19 9h4M19 15h4" />
|
||||
</svg>
|
||||
<Link to="/" style={{ textDecoration: 'none', color: 'inherit' }}>
|
||||
<span className="header-title">Arduino Emulator</span>
|
||||
<span className="header-title">Velxio</span>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export const ExamplesPage: React.FC = () => {
|
|||
setWires(wiresWithPositions);
|
||||
|
||||
// Navigate to the editor
|
||||
navigate('/');
|
||||
navigate('/editor');
|
||||
};
|
||||
|
||||
return <ExamplesGallery onLoadExample={handleLoadExample} />;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,577 @@
|
|||
/* ── Base ──────────────────────────────────────────────── */
|
||||
:root {
|
||||
--accent: #007acc;
|
||||
--accent-glow: rgba(0, 122, 204, 0.35);
|
||||
--accent2: #00c896;
|
||||
--bg: #0d0d0f;
|
||||
--bg-card: #131318;
|
||||
--bg-alt: #0a0a0d;
|
||||
--border: #1e1e2a;
|
||||
--text: #e2e2e8;
|
||||
--text-muted: #7a7a8c;
|
||||
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
--mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
|
||||
}
|
||||
|
||||
.landing {
|
||||
min-height: 100vh;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* ── Nav ──────────────────────────────────────────────── */
|
||||
.landing-nav {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 40px;
|
||||
height: 56px;
|
||||
background: rgba(13, 13, 15, 0.88);
|
||||
backdrop-filter: blur(12px);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.landing-nav-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.landing-nav-brand svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.landing-nav-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 5px 12px;
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 13.5px;
|
||||
border-radius: 6px;
|
||||
transition: color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.nav-link svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: var(--text);
|
||||
background: rgba(255,255,255,0.06);
|
||||
}
|
||||
|
||||
.nav-btn-primary {
|
||||
padding: 6px 16px;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-size: 13.5px;
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
transition: background 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
|
||||
.nav-btn-primary:hover {
|
||||
background: #0990e0;
|
||||
box-shadow: 0 0 12px var(--accent-glow);
|
||||
}
|
||||
|
||||
/* ── Hero ─────────────────────────────────────────────── */
|
||||
.landing-hero {
|
||||
position: relative;
|
||||
min-height: 88vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 80px 40px 60px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero-glow {
|
||||
position: absolute;
|
||||
top: -120px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 700px;
|
||||
height: 700px;
|
||||
background: radial-gradient(ellipse, rgba(0,122,204,0.14) 0%, transparent 70%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
max-width: 720px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero-badge {
|
||||
display: inline-block;
|
||||
margin-bottom: 24px;
|
||||
padding: 4px 14px;
|
||||
background: rgba(0, 122, 204, 0.12);
|
||||
border: 1px solid rgba(0, 122, 204, 0.3);
|
||||
border-radius: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
margin: 0 0 20px;
|
||||
font-size: clamp(36px, 6vw, 64px);
|
||||
font-weight: 800;
|
||||
line-height: 1.1;
|
||||
letter-spacing: -1.5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hero-accent {
|
||||
background: linear-gradient(90deg, var(--accent), var(--accent2));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.hero-subtitle {
|
||||
margin: 0 0 40px;
|
||||
font-size: 17px;
|
||||
line-height: 1.7;
|
||||
color: var(--text-muted);
|
||||
max-width: 560px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.hero-ctas {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.cta-primary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 13px 28px;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
border-radius: 8px;
|
||||
transition: background 0.15s, box-shadow 0.2s, transform 0.15s;
|
||||
}
|
||||
|
||||
.cta-primary svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.cta-primary:hover {
|
||||
background: #0990e0;
|
||||
box-shadow: 0 0 24px var(--accent-glow);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.cta-secondary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 13px 28px;
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
border-radius: 8px;
|
||||
transition: background 0.15s, border-color 0.15s, transform 0.15s;
|
||||
}
|
||||
|
||||
.cta-secondary svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.cta-secondary:hover {
|
||||
background: rgba(255,255,255,0.09);
|
||||
border-color: #444;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* ── Hero decoration (floating chips) ─────────────────── */
|
||||
.hero-decoration {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.deco-chip {
|
||||
position: absolute;
|
||||
opacity: 0.04;
|
||||
animation: floatChip 8s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.deco-chip:nth-child(1) { top: 8%; left: 5%; width: 64px; }
|
||||
.deco-chip:nth-child(2) { top: 15%; left: 85%; width: 40px; }
|
||||
.deco-chip:nth-child(3) { top: 55%; left: 4%; width: 48px; }
|
||||
.deco-chip:nth-child(4) { top: 70%; left: 88%; width: 56px; }
|
||||
.deco-chip:nth-child(5) { top: 35%; left: 92%; width: 36px; }
|
||||
.deco-chip:nth-child(6) { top: 80%; left: 10%; width: 44px; }
|
||||
.deco-chip:nth-child(7) { top: 25%; left: 2%; width: 32px; }
|
||||
.deco-chip:nth-child(8) { top: 90%; left: 75%; width: 38px; }
|
||||
.deco-chip:nth-child(9) { top: 5%; left: 50%; width: 30px; }
|
||||
.deco-chip:nth-child(10) { top: 60%; left: 95%; width: 42px; }
|
||||
.deco-chip:nth-child(11) { top: 88%; left: 40%; width: 36px; }
|
||||
.deco-chip:nth-child(12) { top: 45%; left: 0%; width: 50px; }
|
||||
|
||||
@keyframes floatChip {
|
||||
0%, 100% { transform: translateY(0) rotate(0deg); }
|
||||
50% { transform: translateY(-14px) rotate(8deg); }
|
||||
}
|
||||
|
||||
/* ── Sections ─────────────────────────────────────────── */
|
||||
.landing-section {
|
||||
padding: 80px 40px;
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.landing-section-alt {
|
||||
max-width: 100%;
|
||||
background: var(--bg-alt);
|
||||
border-top: 1px solid var(--border);
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding: 80px 0;
|
||||
}
|
||||
|
||||
.landing-section-alt > * {
|
||||
max-width: 1100px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 40px;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin: 0 0 10px;
|
||||
font-size: clamp(24px, 4vw, 36px);
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.8px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.section-sub {
|
||||
margin: 0 0 48px;
|
||||
font-size: 16px;
|
||||
color: var(--text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ── Boards grid ──────────────────────────────────────── */
|
||||
.boards-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.board-card {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
padding: 28px 20px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
|
||||
}
|
||||
|
||||
.board-card:hover {
|
||||
border-color: rgba(0, 122, 204, 0.4);
|
||||
box-shadow: 0 4px 24px rgba(0, 122, 204, 0.1);
|
||||
transform: translateY(-3px);
|
||||
}
|
||||
|
||||
.board-svg {
|
||||
width: 100%;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
|
||||
}
|
||||
|
||||
.board-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.board-name {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.board-chip {
|
||||
font-size: 12px;
|
||||
font-family: var(--mono);
|
||||
color: var(--text-muted);
|
||||
background: rgba(255,255,255,0.05);
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* ── Features grid ────────────────────────────────────── */
|
||||
.features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
padding: 28px 24px;
|
||||
transition: border-color 0.2s, transform 0.2s;
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
border-color: rgba(0, 122, 204, 0.35);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
background: rgba(0, 122, 204, 0.1);
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 16px;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.feature-icon svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.feature-title {
|
||||
margin: 0 0 8px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.feature-desc {
|
||||
margin: 0;
|
||||
font-size: 13.5px;
|
||||
line-height: 1.65;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* ── Support ──────────────────────────────────────────── */
|
||||
.landing-support {
|
||||
background: linear-gradient(135deg, #0d0d0f 0%, #0a1520 100%);
|
||||
border-top: 1px solid var(--border);
|
||||
text-align: center;
|
||||
padding: 80px 40px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.support-content {
|
||||
max-width: 560px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.support-icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
color: #e85d75;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.support-icon svg {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
filter: drop-shadow(0 0 12px rgba(232, 93, 117, 0.5));
|
||||
}
|
||||
|
||||
.support-btns {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.support-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 24px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
|
||||
.support-btn:hover {
|
||||
opacity: 0.88;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.support-btn-gh {
|
||||
background: #24292e;
|
||||
color: #fff;
|
||||
border: 1px solid #444;
|
||||
}
|
||||
|
||||
.support-btn-gh:hover {
|
||||
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.support-btn-pp {
|
||||
background: #0070ba;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.support-btn-pp:hover {
|
||||
box-shadow: 0 4px 16px rgba(0, 112, 186, 0.4);
|
||||
}
|
||||
|
||||
.support-btn svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Footer ───────────────────────────────────────────── */
|
||||
.landing-footer {
|
||||
padding: 32px 40px;
|
||||
border-top: 1px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.footer-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.footer-brand svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.footer-links a {
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.footer-links a:hover {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.footer-copy {
|
||||
font-size: 12px;
|
||||
color: #444;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-copy a {
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.footer-copy a:hover {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* ── Responsive ───────────────────────────────────────── */
|
||||
@media (max-width: 768px) {
|
||||
.landing-nav {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.landing-nav-links .nav-link:not(:last-child) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.landing-hero {
|
||||
padding: 60px 20px 40px;
|
||||
min-height: 70vh;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.hero-subtitle {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.landing-section,
|
||||
.landing-support {
|
||||
padding: 60px 20px;
|
||||
}
|
||||
|
||||
.landing-footer {
|
||||
padding: 24px 20px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,332 @@
|
|||
import { Link } from 'react-router-dom';
|
||||
import { useAuthStore } from '../store/useAuthStore';
|
||||
import './LandingPage.css';
|
||||
|
||||
const GITHUB_URL = 'https://github.com/davidmonterocrespo24/velxio';
|
||||
const PAYPAL_URL = 'https://paypal.me/odoonext';
|
||||
const GITHUB_SPONSORS_URL = 'https://github.com/sponsors/davidmonterocrespo24';
|
||||
|
||||
/* ── Inline SVG icons ─────────────────────────────────── */
|
||||
const IcoChip = () => (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<rect x="5" y="5" width="14" height="14" rx="2" />
|
||||
<rect x="9" y="9" width="6" height="6" />
|
||||
<path d="M9 1v4M15 1v4M9 19v4M15 19v4M1 9h4M1 15h4M19 9h4M19 15h4" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoCpu = () => (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<rect x="4" y="4" width="16" height="16" rx="2" />
|
||||
<rect x="8" y="8" width="8" height="8" />
|
||||
<path d="M10 2v2M14 2v2M10 20v2M14 20v2M2 10h2M2 14h2M20 10h2M20 14h2" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoCode = () => (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polyline points="16 18 22 12 16 6" />
|
||||
<polyline points="8 6 2 12 8 18" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoZap = () => (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoLayers = () => (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polygon points="12 2 2 7 12 12 22 7 12 2" />
|
||||
<polyline points="2 17 12 22 22 17" />
|
||||
<polyline points="2 12 12 17 22 12" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoMonitor = () => (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<rect x="2" y="3" width="20" height="14" rx="2" />
|
||||
<line x1="8" y1="21" x2="16" y2="21" />
|
||||
<line x1="12" y1="17" x2="12" y2="21" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoBook = () => (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />
|
||||
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoGitHub = () => (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12c0-6.63-5.37-12-12-12z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const IcoHeart = () => (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
/* ── Arduino board SVGs ───────────────────────────────── */
|
||||
const BoardUno = () => (
|
||||
<svg viewBox="0 0 120 80" className="board-svg">
|
||||
{/* PCB */}
|
||||
<rect x="2" y="2" width="116" height="76" rx="4" fill="#006633" stroke="#004d26" strokeWidth="1.5"/>
|
||||
{/* MCU */}
|
||||
<rect x="42" y="22" width="36" height="36" rx="2" fill="#1a1a1a" stroke="#333" strokeWidth="1"/>
|
||||
{/* USB */}
|
||||
<rect x="0" y="28" width="14" height="24" rx="2" fill="#555" stroke="#444" strokeWidth="1"/>
|
||||
{/* Power jack */}
|
||||
<circle cx="108" cy="20" r="7" fill="#333" stroke="#222" strokeWidth="1"/>
|
||||
{/* Header pins top */}
|
||||
{[0,1,2,3,4,5,6,7,8,9,11,12,13].map((i) => (
|
||||
<rect key={i} x={20 + i * 6.5} y="4" width="3" height="6" rx="0.5" fill="#d4a017" />
|
||||
))}
|
||||
{/* Header pins bottom */}
|
||||
{[0,1,2,3,4,5].map((i) => (
|
||||
<rect key={i} x={40 + i * 8} y="70" width="3" height="6" rx="0.5" fill="#d4a017" />
|
||||
))}
|
||||
{/* LED */}
|
||||
<circle cx="90" cy="12" r="2.5" fill="#00ff88" opacity="0.9"/>
|
||||
{/* Label */}
|
||||
<text x="60" y="77" textAnchor="middle" fill="#00aa55" fontSize="5" fontFamily="monospace">Arduino Uno</text>
|
||||
</svg>
|
||||
);
|
||||
|
||||
const BoardNano = () => (
|
||||
<svg viewBox="0 0 120 50" className="board-svg">
|
||||
{/* PCB */}
|
||||
<rect x="2" y="2" width="116" height="46" rx="3" fill="#003399" stroke="#002277" strokeWidth="1.5"/>
|
||||
{/* MCU */}
|
||||
<rect x="44" y="12" width="24" height="24" rx="1.5" fill="#1a1a1a" stroke="#333" strokeWidth="1"/>
|
||||
{/* USB mini */}
|
||||
<rect x="50" y="0" width="20" height="8" rx="2" fill="#555" stroke="#444" strokeWidth="1"/>
|
||||
{/* Header left */}
|
||||
{[0,1,2,3,4,5,6,7].map((i) => (
|
||||
<rect key={i} x="4" y={8 + i * 4.5} width="6" height="3" rx="0.5" fill="#d4a017" />
|
||||
))}
|
||||
{/* Header right */}
|
||||
{[0,1,2,3,4,5,6,7].map((i) => (
|
||||
<rect key={i} x="110" y={8 + i * 4.5} width="6" height="3" rx="0.5" fill="#d4a017" />
|
||||
))}
|
||||
{/* LED */}
|
||||
<circle cx="28" cy="10" r="2" fill="#00ff88" opacity="0.9"/>
|
||||
<text x="60" y="44" textAnchor="middle" fill="#6699ff" fontSize="5" fontFamily="monospace">Arduino Nano</text>
|
||||
</svg>
|
||||
);
|
||||
|
||||
const BoardPico = () => (
|
||||
<svg viewBox="0 0 120 60" className="board-svg">
|
||||
{/* PCB */}
|
||||
<rect x="2" y="2" width="116" height="56" rx="3" fill="#f0f0f0" stroke="#ccc" strokeWidth="1.5"/>
|
||||
{/* RP2040 chip */}
|
||||
<rect x="40" y="14" width="32" height="32" rx="2" fill="#1a1a1a" stroke="#333" strokeWidth="1"/>
|
||||
<rect x="44" y="18" width="24" height="24" rx="1" fill="#222" stroke="#444" strokeWidth="0.5"/>
|
||||
{/* USB micro */}
|
||||
<rect x="50" y="0" width="20" height="8" rx="2" fill="#888" stroke="#666" strokeWidth="1"/>
|
||||
{/* Header left */}
|
||||
{[0,1,2,3,4,5,6].map((i) => (
|
||||
<rect key={i} x="4" y={10 + i * 6} width="6" height="4" rx="0.5" fill="#888" />
|
||||
))}
|
||||
{/* Header right */}
|
||||
{[0,1,2,3,4,5,6].map((i) => (
|
||||
<rect key={i} x="110" y={10 + i * 6} width="6" height="4" rx="0.5" fill="#888" />
|
||||
))}
|
||||
{/* LED */}
|
||||
<circle cx="88" cy="10" r="2.5" fill="#00ccff" opacity="0.9"/>
|
||||
<text x="60" y="57" textAnchor="middle" fill="#555" fontSize="5" fontFamily="monospace">Raspberry Pi Pico</text>
|
||||
</svg>
|
||||
);
|
||||
|
||||
const BoardMega = () => (
|
||||
<svg viewBox="0 0 160 80" className="board-svg">
|
||||
{/* PCB */}
|
||||
<rect x="2" y="2" width="156" height="76" rx="4" fill="#006633" stroke="#004d26" strokeWidth="1.5"/>
|
||||
{/* MCU - ATmega2560 */}
|
||||
<rect x="55" y="20" width="50" height="40" rx="2" fill="#1a1a1a" stroke="#333" strokeWidth="1"/>
|
||||
{/* USB */}
|
||||
<rect x="0" y="28" width="14" height="24" rx="2" fill="#555" stroke="#444" strokeWidth="1"/>
|
||||
{/* Power jack */}
|
||||
<circle cx="148" cy="20" r="7" fill="#333" stroke="#222" strokeWidth="1"/>
|
||||
{/* Top headers */}
|
||||
{Array.from({length: 18}).map((_, i) => (
|
||||
<rect key={i} x={18 + i * 7} y="4" width="3" height="6" rx="0.5" fill="#d4a017" />
|
||||
))}
|
||||
{/* Bottom headers */}
|
||||
{Array.from({length: 18}).map((_, i) => (
|
||||
<rect key={i} x={18 + i * 7} y="70" width="3" height="6" rx="0.5" fill="#d4a017" />
|
||||
))}
|
||||
{/* LEDs */}
|
||||
<circle cx="130" cy="12" r="2.5" fill="#00ff88" opacity="0.9"/>
|
||||
<circle cx="138" cy="12" r="2.5" fill="#ff6600" opacity="0.9"/>
|
||||
<text x="80" y="77" textAnchor="middle" fill="#00aa55" fontSize="5" fontFamily="monospace">Arduino Mega 2560</text>
|
||||
</svg>
|
||||
);
|
||||
|
||||
/* ── Features data ────────────────────────────────────── */
|
||||
const features = [
|
||||
{ icon: <IcoCpu />, title: 'Real AVR8 Emulation', desc: 'Full ATmega328p at 16 MHz — timers, USART, ADC, SPI, I2C, PWM all wired.' },
|
||||
{ icon: <IcoLayers />, title: '48+ Components', desc: 'LEDs, LCDs, TFT displays, servos, buzzers, sensors and more from wokwi-elements.' },
|
||||
{ icon: <IcoCode />, title: 'Monaco Editor', desc: 'VS Code-grade C++ editor with syntax highlighting, autocomplete, and minimap.' },
|
||||
{ icon: <IcoZap />, title: 'arduino-cli Backend', desc: 'Compile sketches locally in seconds. No cloud. No latency. No limits.' },
|
||||
{ icon: <IcoMonitor />, title: 'Serial Monitor', desc: 'Live TX/RX with auto baud-rate detection, send data, and autoscroll.' },
|
||||
{ icon: <IcoBook />, title: 'Library Manager', desc: 'Browse and install the full Arduino library index directly from the UI.' },
|
||||
];
|
||||
|
||||
/* ── Component ────────────────────────────────────────── */
|
||||
export const LandingPage: React.FC = () => {
|
||||
const user = useAuthStore((s) => s.user);
|
||||
|
||||
return (
|
||||
<div className="landing">
|
||||
{/* Nav */}
|
||||
<nav className="landing-nav">
|
||||
<div className="landing-nav-brand">
|
||||
<IcoChip />
|
||||
<span>Velxio</span>
|
||||
</div>
|
||||
<div className="landing-nav-links">
|
||||
<a href={GITHUB_URL} target="_blank" rel="noopener noreferrer" className="nav-link">
|
||||
<IcoGitHub /> GitHub
|
||||
</a>
|
||||
<Link to="/examples" className="nav-link">Examples</Link>
|
||||
{user ? (
|
||||
<Link to="/editor" className="nav-btn-primary">Open Editor</Link>
|
||||
) : (
|
||||
<>
|
||||
<Link to="/login" className="nav-link">Sign in</Link>
|
||||
<Link to="/editor" className="nav-btn-primary">Launch Editor</Link>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{/* Hero */}
|
||||
<section className="landing-hero">
|
||||
<div className="hero-glow" />
|
||||
<div className="hero-content">
|
||||
<div className="hero-badge">Open Source · Free · Local</div>
|
||||
<h1 className="hero-title">
|
||||
Arduino Emulator<br />
|
||||
<span className="hero-accent">in your browser</span>
|
||||
</h1>
|
||||
<p className="hero-subtitle">
|
||||
Write, compile, and simulate Arduino projects — no hardware required.<br />
|
||||
Real AVR8 emulation. 48+ electronic components. Runs entirely on your machine.
|
||||
</p>
|
||||
<div className="hero-ctas">
|
||||
<Link to="/editor" className="cta-primary">
|
||||
<IcoZap />
|
||||
Launch Editor
|
||||
</Link>
|
||||
<a href={GITHUB_URL} target="_blank" rel="noopener noreferrer" className="cta-secondary">
|
||||
<IcoGitHub />
|
||||
View on GitHub
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{/* Floating chip grid decoration */}
|
||||
<div className="hero-decoration" aria-hidden>
|
||||
{Array.from({ length: 12 }).map((_, i) => (
|
||||
<div key={i} className="deco-chip" style={{ animationDelay: `${i * 0.4}s` }}>
|
||||
<IcoChip />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Boards */}
|
||||
<section className="landing-section">
|
||||
<h2 className="section-title">Supported Boards</h2>
|
||||
<p className="section-sub">Pick your hardware. The emulator adapts.</p>
|
||||
<div className="boards-grid">
|
||||
<div className="board-card">
|
||||
<BoardUno />
|
||||
<div className="board-info">
|
||||
<span className="board-name">Arduino Uno</span>
|
||||
<span className="board-chip">ATmega328p · AVR8</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="board-card">
|
||||
<BoardNano />
|
||||
<div className="board-info">
|
||||
<span className="board-name">Arduino Nano</span>
|
||||
<span className="board-chip">ATmega328p · AVR8</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="board-card">
|
||||
<BoardMega />
|
||||
<div className="board-info">
|
||||
<span className="board-name">Arduino Mega</span>
|
||||
<span className="board-chip">ATmega2560 · AVR8</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="board-card">
|
||||
<BoardPico />
|
||||
<div className="board-info">
|
||||
<span className="board-name">Raspberry Pi Pico</span>
|
||||
<span className="board-chip">RP2040 · Dual-core ARM</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Features */}
|
||||
<section className="landing-section landing-section-alt">
|
||||
<h2 className="section-title">Everything you need</h2>
|
||||
<p className="section-sub">A complete IDE and simulator, running locally.</p>
|
||||
<div className="features-grid">
|
||||
{features.map((f) => (
|
||||
<div key={f.title} className="feature-card">
|
||||
<div className="feature-icon">{f.icon}</div>
|
||||
<h3 className="feature-title">{f.title}</h3>
|
||||
<p className="feature-desc">{f.desc}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Support */}
|
||||
<section className="landing-section landing-support">
|
||||
<div className="support-content">
|
||||
<div className="support-icon"><IcoHeart /></div>
|
||||
<h2 className="section-title">Support the project</h2>
|
||||
<p className="section-sub">
|
||||
Velxio is free and open source. If it saves you time, consider supporting its development.
|
||||
</p>
|
||||
<div className="support-btns">
|
||||
<a href={GITHUB_SPONSORS_URL} target="_blank" rel="noopener noreferrer" className="support-btn support-btn-gh">
|
||||
<IcoGitHub /> GitHub Sponsors
|
||||
</a>
|
||||
<a href={PAYPAL_URL} target="_blank" rel="noopener noreferrer" className="support-btn support-btn-pp">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" width="18" height="18">
|
||||
<path d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z"/>
|
||||
</svg>
|
||||
Donate via PayPal
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Footer */}
|
||||
<footer className="landing-footer">
|
||||
<div className="footer-brand">
|
||||
<IcoChip />
|
||||
<span>Velxio</span>
|
||||
</div>
|
||||
<div className="footer-links">
|
||||
<a href={GITHUB_URL} target="_blank" rel="noopener noreferrer">GitHub</a>
|
||||
<Link to="/examples">Examples</Link>
|
||||
<Link to="/editor">Editor</Link>
|
||||
</div>
|
||||
<p className="footer-copy">
|
||||
MIT License · Powered by <a href="https://github.com/wokwi/avr8js" target="_blank" rel="noopener noreferrer">avr8js</a> & <a href="https://github.com/wokwi/wokwi-elements" target="_blank" rel="noopener noreferrer">wokwi-elements</a>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
@ -49,7 +49,7 @@ export const ProjectPage: React.FC = () => {
|
|||
<div style={{ color: '#f44747', fontSize: 16, textAlign: 'center' }}>
|
||||
<p>{error}</p>
|
||||
<button onClick={() => navigate('/')} style={{ marginTop: 12, background: '#0e639c', border: 'none', color: '#fff', padding: '8px 16px', borderRadius: 4, cursor: 'pointer' }}>
|
||||
Go home
|
||||
Go to home
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const RegisterPage: React.FC = () => {
|
|||
try {
|
||||
const user = await register(username.toLowerCase(), email, password);
|
||||
setUser(user);
|
||||
navigate('/');
|
||||
navigate('/editor');
|
||||
} catch (err: any) {
|
||||
setError(err?.response?.data?.detail || 'Registration failed.');
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const UserProfilePage: React.FC = () => {
|
|||
<div style={styles.header}>
|
||||
<h1 style={styles.title}>{username}</h1>
|
||||
{isOwn && (
|
||||
<Link to="/" style={styles.newBtn}>+ New project</Link>
|
||||
<Link to="/editor" style={styles.newBtn}>+ New project</Link>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue