feat: rebuild website with full learning funnel

Website rebuilt from scratch based on analysis of 11 beloved language
websites (Elm, Zig, Gleam, Swift, Kotlin, Haskell, OCaml, Crystal, Roc,
Rust, Go).

New website structure:
- Homepage with hero, playground, three pillars, install guide
- Language Tour with interactive lessons (hello world, types, effects)
- Examples cookbook with categorized sidebar
- API documentation index
- Installation guide (Nix and source)
- Sleek/noble design (black/gold, serif typography)

Also includes:
- New stdlib/json.lux module for JSON serialization
- Enhanced stdlib/http.lux with middleware and routing
- New string functions (charAt, indexOf, lastIndexOf, repeat)
- LSP improvements (rename, signature help, formatting)
- Package manager transitive dependency resolution
- Updated documentation for effects and stdlib
- New showcase example (task_manager.lux)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 23:05:35 -05:00
parent 5a853702d1
commit 7e76acab18
44 changed files with 12468 additions and 3354 deletions

769
website/static/style.css Normal file
View File

@@ -0,0 +1,769 @@
/* Lux Website - Sleek and Noble */
:root {
/* Backgrounds */
--bg-primary: #0a0a0a;
--bg-secondary: #111111;
--bg-tertiary: #1a1a1a;
--bg-glass: rgba(255, 255, 255, 0.03);
--bg-glass-hover: rgba(255, 255, 255, 0.06);
/* Text */
--text-primary: #ffffff;
--text-secondary: rgba(255, 255, 255, 0.7);
--text-muted: rgba(255, 255, 255, 0.5);
/* Gold accents */
--gold: #d4af37;
--gold-light: #f4d03f;
--gold-dark: #b8860b;
--gold-glow: rgba(212, 175, 55, 0.3);
/* Code colors */
--code-bg: rgba(212, 175, 55, 0.05);
--code-border: rgba(212, 175, 55, 0.15);
/* Status */
--success: #4ade80;
--error: #f87171;
/* Borders */
--border-subtle: rgba(255, 255, 255, 0.1);
--border-gold: rgba(212, 175, 55, 0.3);
/* Typography */
--font-heading: "Playfair Display", Georgia, serif;
--font-body: "Source Serif 4", Georgia, serif;
--font-code: "JetBrains Mono", "Fira Code", monospace;
/* Spacing */
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 2rem;
--space-xl: 4rem;
--space-2xl: 6rem;
}
/* Reset */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* Base */
html {
scroll-behavior: smooth;
}
body {
font-family: var(--font-body);
font-size: 18px;
line-height: 1.7;
color: var(--text-primary);
background: var(--bg-primary);
-webkit-font-smoothing: antialiased;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading);
font-weight: 600;
line-height: 1.3;
color: var(--gold-light);
letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p {
color: var(--text-secondary);
}
a {
color: var(--gold);
text-decoration: none;
transition: color 0.2s ease;
}
a:hover {
color: var(--gold-light);
}
/* Navigation */
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--space-md) var(--space-lg);
max-width: 1200px;
margin: 0 auto;
position: sticky;
top: 0;
background: rgba(10, 10, 10, 0.95);
backdrop-filter: blur(10px);
z-index: 100;
border-bottom: 1px solid var(--border-subtle);
}
.logo {
font-family: var(--font-heading);
font-size: 1.5rem;
font-weight: 700;
color: var(--gold);
letter-spacing: 0.05em;
}
.nav-links {
display: flex;
gap: var(--space-lg);
list-style: none;
}
.nav-links a {
color: var(--text-secondary);
font-size: 0.95rem;
font-weight: 500;
transition: color 0.2s ease;
}
.nav-links a:hover {
color: var(--gold);
}
.nav-source {
padding: 0.4rem 0.8rem;
border: 1px solid var(--border-gold);
border-radius: 4px;
}
.mobile-menu-btn {
display: none;
background: none;
border: none;
color: var(--text-primary);
font-size: 1.5rem;
cursor: pointer;
}
/* Hero Section */
.hero {
text-align: center;
padding: var(--space-2xl) var(--space-lg);
max-width: 900px;
margin: 0 auto;
min-height: 80vh;
display: flex;
flex-direction: column;
justify-content: center;
background: radial-gradient(ellipse at top, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
}
.hero h1 {
margin-bottom: var(--space-md);
}
.tagline {
font-size: 1.25rem;
color: var(--text-secondary);
margin-bottom: var(--space-lg);
}
.hero-cta {
display: flex;
gap: var(--space-md);
justify-content: center;
margin-bottom: var(--space-xl);
flex-wrap: wrap;
}
.hero-code {
background: var(--code-bg);
border: 1px solid var(--code-border);
border-radius: 8px;
padding: var(--space-lg);
text-align: left;
max-width: 700px;
margin: 0 auto var(--space-lg);
overflow-x: auto;
}
.hero-code pre {
font-family: var(--font-code);
font-size: 0.9rem;
line-height: 1.6;
margin: 0;
}
.badges {
display: flex;
gap: var(--space-md);
justify-content: center;
flex-wrap: wrap;
}
.badge {
background: var(--bg-glass);
color: var(--text-muted);
padding: 0.4rem 0.8rem;
border-radius: 20px;
font-size: 0.85rem;
border: 1px solid var(--border-subtle);
}
/* Buttons */
.btn {
font-family: var(--font-heading);
font-size: 1rem;
font-weight: 600;
padding: 0.875rem 2rem;
border-radius: 4px;
text-decoration: none;
transition: all 0.3s ease;
display: inline-block;
cursor: pointer;
border: none;
}
.btn-primary {
background: linear-gradient(135deg, var(--gold-dark), var(--gold));
color: var(--bg-primary);
}
.btn-primary:hover {
background: linear-gradient(135deg, var(--gold), var(--gold-light));
transform: translateY(-2px);
box-shadow: 0 4px 20px var(--gold-glow);
color: var(--bg-primary);
}
.btn-secondary {
background: transparent;
color: var(--gold);
border: 1px solid var(--gold);
}
.btn-secondary:hover {
background: rgba(212, 175, 55, 0.1);
color: var(--gold-light);
}
.btn-tertiary {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--border-subtle);
}
.btn-tertiary:hover {
color: var(--text-primary);
border-color: var(--text-muted);
}
.btn-run {
background: var(--gold);
color: var(--bg-primary);
font-family: var(--font-code);
padding: 0.5rem 1.5rem;
}
.btn-run:hover {
background: var(--gold-light);
}
/* Sections */
section {
padding: var(--space-2xl) var(--space-lg);
max-width: 1200px;
margin: 0 auto;
}
.section-subtitle {
text-align: center;
color: var(--text-secondary);
margin-bottom: var(--space-xl);
max-width: 600px;
margin-left: auto;
margin-right: auto;
font-size: 1.1rem;
}
section h2 {
text-align: center;
margin-bottom: var(--space-md);
}
/* Problem/Solution Section */
.problem-section {
border-top: 1px solid var(--border-subtle);
}
.comparison {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-lg);
max-width: 900px;
margin: 0 auto;
}
.comparison-card {
background: var(--bg-glass);
border: 1px solid var(--border-subtle);
border-radius: 8px;
padding: var(--space-lg);
}
.comparison-card.bad {
border-left: 3px solid var(--error);
}
.comparison-card.good {
border-left: 3px solid var(--success);
}
.comparison-card h3 {
color: var(--text-primary);
font-size: 1rem;
margin-bottom: var(--space-md);
}
.comparison-code pre {
font-family: var(--font-code);
font-size: 0.85rem;
line-height: 1.6;
margin: 0;
}
/* Pillars Section */
.pillars-section {
border-top: 1px solid var(--border-subtle);
}
.pillars {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--space-lg);
}
.pillar {
background: var(--bg-glass);
border: 1px solid var(--border-subtle);
border-radius: 8px;
padding: var(--space-lg);
transition: border-color 0.3s ease, transform 0.3s ease;
}
.pillar:hover {
border-color: var(--border-gold);
transform: translateY(-4px);
}
.pillar h3 {
color: var(--gold);
margin-bottom: var(--space-sm);
}
.pillar p {
margin-bottom: var(--space-md);
font-size: 0.95rem;
}
.pillar-code {
background: var(--code-bg);
border: 1px solid var(--code-border);
border-radius: 6px;
padding: var(--space-md);
overflow-x: auto;
}
.pillar-code pre {
font-family: var(--font-code);
font-size: 0.8rem;
line-height: 1.5;
margin: 0;
}
/* Playground Section */
.playground-section {
border-top: 1px solid var(--border-subtle);
background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.playground {
max-width: 1000px;
margin: 0 auto;
background: var(--bg-tertiary);
border: 1px solid var(--border-subtle);
border-radius: 8px;
overflow: hidden;
}
.playground-tabs {
display: flex;
background: var(--bg-secondary);
padding: var(--space-sm);
gap: var(--space-xs);
overflow-x: auto;
}
.playground-tab {
padding: 0.5rem 1rem;
background: transparent;
border: none;
color: var(--text-muted);
cursor: pointer;
border-radius: 4px;
font-family: var(--font-body);
font-size: 0.9rem;
transition: all 0.2s ease;
white-space: nowrap;
}
.playground-tab:hover {
color: var(--text-secondary);
background: var(--bg-glass);
}
.playground-tab.active {
color: var(--bg-primary);
background: var(--gold);
}
.playground-content {
display: grid;
grid-template-columns: 1fr 1fr;
min-height: 300px;
}
.playground-editor {
padding: var(--space-md);
border-right: 1px solid var(--border-subtle);
}
.playground-editor textarea {
width: 100%;
height: 100%;
min-height: 250px;
background: transparent;
border: none;
color: var(--text-primary);
font-family: var(--font-code);
font-size: 0.9rem;
line-height: 1.6;
resize: none;
outline: none;
}
.playground-output {
background: var(--bg-primary);
display: flex;
flex-direction: column;
}
.output-header {
padding: var(--space-sm) var(--space-md);
color: var(--text-muted);
font-size: 0.85rem;
border-bottom: 1px solid var(--border-subtle);
}
.playground-output pre {
padding: var(--space-md);
font-family: var(--font-code);
font-size: 0.9rem;
line-height: 1.6;
margin: 0;
flex: 1;
overflow: auto;
color: var(--success);
}
.playground-output pre.error {
color: var(--error);
}
.playground-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--space-sm) var(--space-md);
background: var(--bg-secondary);
border-top: 1px solid var(--border-subtle);
}
.version {
color: var(--text-muted);
font-size: 0.85rem;
}
/* Install Section */
.install-section {
border-top: 1px solid var(--border-subtle);
}
.install-options {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-lg);
max-width: 900px;
margin: 0 auto var(--space-xl);
}
.install-option {
background: var(--bg-glass);
border: 1px solid var(--border-subtle);
border-radius: 8px;
padding: var(--space-lg);
}
.install-option h3 {
color: var(--text-primary);
font-size: 1rem;
margin-bottom: var(--space-md);
}
.install-code {
display: flex;
gap: 0;
margin-bottom: var(--space-sm);
}
.install-code pre {
flex: 1;
background: var(--code-bg);
border: 1px solid var(--code-border);
border-right: none;
border-radius: 6px 0 0 6px;
padding: var(--space-md);
font-family: var(--font-code);
font-size: 0.85rem;
line-height: 1.5;
margin: 0;
overflow-x: auto;
}
.copy-btn {
background: var(--gold);
color: var(--bg-primary);
border: none;
padding: 0 var(--space-md);
border-radius: 0 6px 6px 0;
cursor: pointer;
font-family: var(--font-code);
font-size: 0.85rem;
font-weight: 600;
transition: background 0.2s ease;
}
.copy-btn:hover {
background: var(--gold-light);
}
.copy-btn.copied {
background: var(--success);
}
.install-note {
font-size: 0.9rem;
color: var(--text-muted);
}
.next-steps {
text-align: center;
}
.next-steps h4 {
color: var(--text-muted);
margin-bottom: var(--space-md);
}
.next-steps-grid {
display: flex;
gap: var(--space-md);
justify-content: center;
flex-wrap: wrap;
}
.next-step {
display: flex;
align-items: center;
gap: var(--space-sm);
padding: var(--space-md) var(--space-lg);
background: var(--bg-glass);
border: 1px solid var(--border-subtle);
border-radius: 8px;
color: var(--text-secondary);
transition: all 0.2s ease;
}
.next-step:hover {
border-color: var(--border-gold);
color: var(--gold);
}
.next-step-icon {
font-size: 1.25rem;
}
/* Footer */
footer {
border-top: 1px solid var(--border-subtle);
padding: var(--space-xl) var(--space-lg);
background: var(--bg-secondary);
}
.footer-content {
display: grid;
grid-template-columns: 2fr 1fr 1fr;
gap: var(--space-xl);
max-width: 1200px;
margin: 0 auto var(--space-xl);
}
.footer-section h4 {
color: var(--gold);
font-size: 1rem;
margin-bottom: var(--space-md);
}
.footer-section p {
font-size: 0.95rem;
}
.footer-section ul {
list-style: none;
}
.footer-section li {
margin-bottom: var(--space-sm);
}
.footer-section a {
color: var(--text-secondary);
font-size: 0.95rem;
}
.footer-section a:hover {
color: var(--gold);
}
.footer-bottom {
text-align: center;
padding-top: var(--space-lg);
border-top: 1px solid var(--border-subtle);
max-width: 1200px;
margin: 0 auto;
}
.footer-bottom p {
font-size: 0.9rem;
color: var(--text-muted);
}
/* Syntax Highlighting */
code .kw { color: var(--gold); }
code .ty { color: #82aaff; }
code .fn { color: #89ddff; }
code .ef { color: var(--gold-light); font-weight: 600; }
code .st { color: #c3e88d; }
code .cm { color: var(--text-muted); font-style: italic; }
code .hl { color: var(--success); font-weight: 600; }
/* Responsive */
@media (max-width: 900px) {
.pillars {
grid-template-columns: 1fr;
}
.comparison {
grid-template-columns: 1fr;
}
.install-options {
grid-template-columns: 1fr;
}
.footer-content {
grid-template-columns: 1fr;
gap: var(--space-lg);
}
}
@media (max-width: 768px) {
nav {
padding: var(--space-md);
}
.mobile-menu-btn {
display: block;
}
.nav-links {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
background: var(--bg-primary);
flex-direction: column;
padding: var(--space-md);
gap: 0;
border-bottom: 1px solid var(--border-subtle);
}
.nav-links.open {
display: flex;
}
.nav-links li {
padding: var(--space-sm) 0;
}
.hero {
padding: var(--space-xl) var(--space-md);
min-height: auto;
}
.hero-cta {
flex-direction: column;
align-items: center;
}
.playground-content {
grid-template-columns: 1fr;
}
.playground-editor {
border-right: none;
border-bottom: 1px solid var(--border-subtle);
}
.badges {
gap: var(--space-sm);
}
.badge {
font-size: 0.75rem;
}
section {
padding: var(--space-xl) var(--space-md);
}
.install-code {
flex-direction: column;
}
.install-code pre {
border-right: 1px solid var(--code-border);
border-radius: 6px 6px 0 0;
}
.copy-btn {
border-radius: 0 0 6px 6px;
padding: var(--space-sm);
}
}