feat(page): initial landing page with dev tooling
Pre-launch landing page for The Lofty Project — a 501(c)(4) connecting creative talent with leftist organizing. Includes hero with blur-in line-by-line animation, three-pillar section (Talent/Media/Infrastructure), interest signup buttons, and responsive design with fluid typography. Tooling: Astro 5, Biome linting/formatting, Lefthook git hooks, Commitizen with conventional commits, and project documentation.
This commit is contained in:
47
.cz.json
Normal file
47
.cz.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"path": "cz-git",
|
||||
"useEmoji": false,
|
||||
"types": [
|
||||
{ "value": "feat", "name": "feat: A new feature" },
|
||||
{ "value": "fix", "name": "fix: A bug fix" },
|
||||
{ "value": "docs", "name": "docs: Documentation only changes" },
|
||||
{
|
||||
"value": "style",
|
||||
"name": "style: Code style changes (formatting, semicolons, etc.)"
|
||||
},
|
||||
{
|
||||
"value": "refactor",
|
||||
"name": "refactor: Code refactoring (no feature or bug fix)"
|
||||
},
|
||||
{ "value": "perf", "name": "perf: Performance improvements" },
|
||||
{ "value": "test", "name": "test: Adding or updating tests" },
|
||||
{
|
||||
"value": "build",
|
||||
"name": "build: Build system or external dependencies"
|
||||
},
|
||||
{ "value": "ci", "name": "ci: CI/CD configuration changes" },
|
||||
{
|
||||
"value": "chore",
|
||||
"name": "chore: Other changes (don't modify src/test)"
|
||||
},
|
||||
{ "value": "revert", "name": "revert: Revert a previous commit" }
|
||||
],
|
||||
"scopes": [
|
||||
{ "value": "page", "name": "page: Page content/layout" },
|
||||
{ "value": "style", "name": "style: Styling/CSS changes" },
|
||||
{ "value": "config", "name": "config: Configuration changes" },
|
||||
{ "value": "deps", "name": "deps: Dependency updates" }
|
||||
],
|
||||
"allowCustomScopes": true,
|
||||
"allowEmptyScopes": false,
|
||||
"customScopesAlign": "bottom",
|
||||
"upperCaseSubject": false,
|
||||
"markBreakingChangeMode": false,
|
||||
"allowBreakingChanges": ["feat", "fix"],
|
||||
"breaklineNumber": 100,
|
||||
"breaklineChar": "|",
|
||||
"confirmColorize": true,
|
||||
"maxHeaderLength": 100,
|
||||
"maxSubjectLength": 100,
|
||||
"minSubjectLength": 3
|
||||
}
|
||||
2
.env.example
Normal file
2
.env.example
Normal file
@@ -0,0 +1,2 @@
|
||||
# Signup form endpoint (defaults to /api/signup if not set)
|
||||
PUBLIC_SIGNUP_ENDPOINT=
|
||||
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
# jetbrains setting folder
|
||||
.idea/
|
||||
|
||||
# local tool configs
|
||||
.mcp.json
|
||||
.opencode.json
|
||||
.vscode/
|
||||
81
CLAUDE.md
Normal file
81
CLAUDE.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# CLAUDE.md
|
||||
|
||||
## Project Overview
|
||||
|
||||
Lofty is a 501(c)(4) social welfare organization connecting creative professionals with the progressive movement. This repo is the **pre-launch landing page** — a single-page static site to collect email signups.
|
||||
|
||||
**Stack:** Astro 5 (static output), TypeScript, Bun 1.3+
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
src/
|
||||
layouts/Layout.astro # HTML shell, meta tags, Typekit fonts, design tokens, CSS reset
|
||||
pages/index.astro # All page sections (hero, pillars, signup form, footer), scoped CSS, client JS
|
||||
public/
|
||||
favicon.svg # Stylized "L" mark
|
||||
astro.config.mjs # Static output, site URL, dev toolbar disabled
|
||||
```
|
||||
|
||||
Two-file architecture: `Layout.astro` (global concerns) + `index.astro` (all content). No component files — single page with no reuse opportunity.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
bun run dev # Start dev server (localhost:4321)
|
||||
bun run build # Static build to dist/
|
||||
bun run preview # Preview production build
|
||||
```
|
||||
|
||||
## Linting & Formatting
|
||||
|
||||
Uses **Biome** for both linting and formatting.
|
||||
|
||||
```bash
|
||||
bun run lint # Check for lint + format issues
|
||||
bun run lint:fix # Auto-fix lint + format issues
|
||||
bun run format # Format all files
|
||||
```
|
||||
|
||||
**Biome config:** 4-space indent, 100 char line width, double quotes, trailing commas, semicolons. Astro files have `noUnusedImports`/`noUnusedVariables` disabled (Biome can't parse Astro template references).
|
||||
|
||||
## Commit Standards
|
||||
|
||||
This project uses **conventional commits** enforced by commitlint + lefthook.
|
||||
|
||||
Format: `type(scope): subject`
|
||||
|
||||
**Types:** feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
|
||||
|
||||
**Scopes:** page, style, config, deps (custom scopes allowed)
|
||||
|
||||
```bash
|
||||
bun run commit # Guided commit via commitizen (cz-git)
|
||||
```
|
||||
|
||||
Do not include co-author lines or "Generated by" attributions in commit messages.
|
||||
|
||||
## Git Hooks (Lefthook)
|
||||
|
||||
- **pre-commit:** Biome check on staged files
|
||||
- **commit-msg:** Commitlint validation
|
||||
- **pre-push:** Full build
|
||||
|
||||
## Design Tokens
|
||||
|
||||
Colors, typography, and spacing are defined as CSS custom properties in `Layout.astro`:
|
||||
|
||||
- **Colors:** cream (#F5F0EB), dusty-rose (#C48B8B), slate-blue (#8A9BB5), navy (#1A1F2E)
|
||||
- **Fonts:** `neue-haas-grotesk-display` (body, weight 500), `meno-text` (display/headings) via Typekit
|
||||
- **Spacing/type:** Fluid scales using `clamp()`
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `PUBLIC_SIGNUP_ENDPOINT` — Form submission endpoint (defaults to `/api/signup`). See `.env.example`.
|
||||
|
||||
## Key Patterns
|
||||
|
||||
- All scroll animations use `.reveal` class + IntersectionObserver (threshold 0.1, -40px root margin)
|
||||
- Hero animations are CSS-only with staggered delays via `--i` custom property
|
||||
- `prefers-reduced-motion` is detected via inline script and disables all animations via `.reduce-motion` class
|
||||
- Form handler uses progressive enhancement — works as standard POST without JS
|
||||
43
README.md
Normal file
43
README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Astro Starter Kit: Minimal
|
||||
|
||||
```sh
|
||||
bun create astro@latest -- --template minimal
|
||||
```
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
|
||||
## 🚀 Project Structure
|
||||
|
||||
Inside of your Astro project, you'll see the following folders and files:
|
||||
|
||||
```text
|
||||
/
|
||||
├── public/
|
||||
├── src/
|
||||
│ └── pages/
|
||||
│ └── index.astro
|
||||
└── package.json
|
||||
```
|
||||
|
||||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
|
||||
|
||||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
|
||||
|
||||
Any static assets, like images, can be placed in the `public/` directory.
|
||||
|
||||
## 🧞 Commands
|
||||
|
||||
All commands are run from the root of the project, from a terminal:
|
||||
|
||||
| Command | Action |
|
||||
| :------------------------ | :----------------------------------------------- |
|
||||
| `bun install` | Installs dependencies |
|
||||
| `bun dev` | Starts local dev server at `localhost:4321` |
|
||||
| `bun build` | Build your production site to `./dist/` |
|
||||
| `bun preview` | Preview your build locally, before deploying |
|
||||
| `bun astro ...` | Run CLI commands like `astro add`, `astro check` |
|
||||
| `bun astro -- --help` | Get help using the Astro CLI |
|
||||
|
||||
## 👀 Want to learn more?
|
||||
|
||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
||||
9
astro.config.mjs
Normal file
9
astro.config.mjs
Normal file
@@ -0,0 +1,9 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from "astro/config";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
output: "static",
|
||||
site: "https://lofty.org",
|
||||
devToolbar: { enabled: false },
|
||||
});
|
||||
55
biome.json
Normal file
55
biome.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.3.14/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
"useIgnoreFile": true
|
||||
},
|
||||
"files": {
|
||||
"includes": ["**", "!**/node_modules", "!**/dist", "!**/.astro", "!**/bun.lock"]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 4,
|
||||
"lineWidth": 100
|
||||
},
|
||||
"assist": { "actions": { "source": { "organizeImports": "on" } } },
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"correctness": {
|
||||
"noUnusedImports": "warn",
|
||||
"noUnusedVariables": "warn"
|
||||
},
|
||||
"style": {
|
||||
"noNonNullAssertion": "warn"
|
||||
},
|
||||
"suspicious": {
|
||||
"noExplicitAny": "warn",
|
||||
"noUnknownAtRules": "off"
|
||||
}
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double",
|
||||
"trailingCommas": "all",
|
||||
"semicolons": "always"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"includes": ["**/*.astro"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"correctness": {
|
||||
"noUnusedImports": "off",
|
||||
"noUnusedVariables": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
30
commitlint.config.js
Normal file
30
commitlint.config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/** @type {import('@commitlint/types').UserConfig} */
|
||||
export default {
|
||||
extends: ["@commitlint/config-conventional"],
|
||||
rules: {
|
||||
"type-enum": [
|
||||
2,
|
||||
"always",
|
||||
[
|
||||
"feat",
|
||||
"fix",
|
||||
"docs",
|
||||
"style",
|
||||
"refactor",
|
||||
"perf",
|
||||
"test",
|
||||
"build",
|
||||
"ci",
|
||||
"chore",
|
||||
"revert",
|
||||
],
|
||||
],
|
||||
"scope-enum": [1, "always", ["page", "style", "config", "deps"]],
|
||||
"scope-empty": [1, "never"],
|
||||
"subject-case": [2, "always", "lower-case"],
|
||||
"subject-empty": [2, "never"],
|
||||
"subject-full-stop": [2, "never", "."],
|
||||
"body-leading-blank": [2, "always"],
|
||||
"footer-leading-blank": [2, "always"],
|
||||
},
|
||||
};
|
||||
19
lefthook.yml
Normal file
19
lefthook.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
# Lefthook configuration
|
||||
# https://github.com/evilmartians/lefthook
|
||||
|
||||
commit-msg:
|
||||
commands:
|
||||
commitlint:
|
||||
run: bunx commitlint --edit {1}
|
||||
|
||||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
biome:
|
||||
glob: "*.{ts,tsx,js,jsx,json,astro}"
|
||||
run: bunx @biomejs/biome check --no-errors-on-unmatched {staged_files}
|
||||
|
||||
pre-push:
|
||||
commands:
|
||||
build:
|
||||
run: bun run build
|
||||
28
package.json
Normal file
28
package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "landing",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"lint": "biome check .",
|
||||
"lint:fix": "biome check --write .",
|
||||
"format": "biome format --write .",
|
||||
"format:check": "biome format .",
|
||||
"commit": "cz",
|
||||
"prepare": "lefthook install"
|
||||
},
|
||||
"dependencies": {
|
||||
"astro": "^5.17.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.3.10",
|
||||
"@commitlint/cli": "^20.2.0",
|
||||
"@commitlint/config-conventional": "^20.2.0",
|
||||
"commitizen": "^4.3.1",
|
||||
"cz-git": "^1.12.0",
|
||||
"lefthook": "^2.0.12"
|
||||
}
|
||||
}
|
||||
6
public/favicon.svg
Normal file
6
public/favicon.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
|
||||
<rect x="6" y="4" width="6" height="24" rx="1.5" fill="#1A1F2E"/>
|
||||
<rect x="6" y="22" width="18" height="6" rx="1.5" fill="#1A1F2E"/>
|
||||
<rect x="6" y="4" width="6" height="24" rx="1.5" stroke="#C48B8B" stroke-width="1.2" fill="none"/>
|
||||
<rect x="6" y="22" width="18" height="6" rx="1.5" stroke="#C48B8B" stroke-width="1.2" fill="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 420 B |
BIN
public/hero-bg.jpg
Normal file
BIN
public/hero-bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 344 KiB |
BIN
public/hero-bg.webp
Normal file
BIN
public/hero-bg.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
169
src/layouts/Layout.astro
Normal file
169
src/layouts/Layout.astro
Normal file
@@ -0,0 +1,169 @@
|
||||
---
|
||||
interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
const {
|
||||
title = "Lofty — Creative power for the progressive movement",
|
||||
description = "Lofty connects creative professionals with progressive campaigns, produces original political media, and builds digital infrastructure for progressive organizing.",
|
||||
} = Astro.props;
|
||||
|
||||
const ogImage = "/og.png";
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={ogImage} />
|
||||
<meta property="og:site_name" content="Lofty" />
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={ogImage} />
|
||||
|
||||
<!-- Typekit Fonts -->
|
||||
<link rel="preconnect" href="https://use.typekit.net" crossorigin />
|
||||
<link rel="stylesheet" href="https://use.typekit.net/mdp0hnk.css" />
|
||||
|
||||
<!-- Reduced motion detection -->
|
||||
<script is:inline>
|
||||
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
||||
document.documentElement.classList.add('reduce-motion');
|
||||
}
|
||||
window.matchMedia('(prefers-reduced-motion: reduce)').addEventListener('change', (e) => {
|
||||
document.documentElement.classList.toggle('reduce-motion', e.matches);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style is:global>
|
||||
/* ——— Design Tokens ——— */
|
||||
:root {
|
||||
/* Colors */
|
||||
--color-cream: #F5F0EB;
|
||||
--color-cream-dark: #EDE6DF;
|
||||
--color-dusty-rose: #C48B8B;
|
||||
--color-rose-dark: #A86F6F;
|
||||
--color-slate-blue: #8A9BB5;
|
||||
--color-slate-light: #A3B1C7;
|
||||
--color-navy: #1A1F2E;
|
||||
--color-navy-light: #2D3548;
|
||||
--color-white: #FDFCFA;
|
||||
|
||||
/* Typography */
|
||||
--font-body: 'neue-haas-grotesk-display', sans-serif;
|
||||
--font-display: 'meno-text', serif;
|
||||
|
||||
--text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
|
||||
--text-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
|
||||
--text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
|
||||
--text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.3125rem);
|
||||
--text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
|
||||
--text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
|
||||
--text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
|
||||
--text-4xl: clamp(2.75rem, 1.85rem + 4.5vw, 5rem);
|
||||
|
||||
/* Spacing */
|
||||
--space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
|
||||
--space-sm: clamp(0.75rem, 0.65rem + 0.5vw, 1rem);
|
||||
--space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
|
||||
--space-lg: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
|
||||
--space-xl: clamp(2rem, 1.4rem + 3vw, 4rem);
|
||||
--space-2xl: clamp(3rem, 2rem + 5vw, 6rem);
|
||||
--space-3xl: clamp(4rem, 2.5rem + 7.5vw, 8rem);
|
||||
|
||||
/* Transitions */
|
||||
--ease-out: cubic-bezier(0.25, 1, 0.5, 1);
|
||||
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
--ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
|
||||
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
--duration-fast: 250ms;
|
||||
--duration-base: 500ms;
|
||||
--duration-slow: 900ms;
|
||||
--duration-slower: 1400ms;
|
||||
|
||||
/* Borders */
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 16px;
|
||||
--radius-full: 9999px;
|
||||
}
|
||||
|
||||
/* ——— CSS Reset ——— */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: optimizeLegibility;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
img, picture, video, canvas, svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* ——— Global Typography ——— */
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 500;
|
||||
line-height: 1.6;
|
||||
color: var(--color-navy);
|
||||
background-color: var(--color-cream);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--font-display);
|
||||
font-weight: 400;
|
||||
line-height: 1.1;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-dusty-rose);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ——— Reduced motion ——— */
|
||||
.reduce-motion *,
|
||||
.reduce-motion *::before,
|
||||
.reduce-motion *::after {
|
||||
animation-duration: 0.001ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.001ms !important;
|
||||
}
|
||||
</style>
|
||||
689
src/pages/index.astro
Normal file
689
src/pages/index.astro
Normal file
@@ -0,0 +1,689 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
|
||||
// const signupEndpoint = import.meta.env.PUBLIC_SIGNUP_ENDPOINT || "/api/signup";
|
||||
|
||||
const heroLines = ["Talent, media, and tech", "for collective power"];
|
||||
|
||||
const pillars = [
|
||||
{
|
||||
icon: "talent",
|
||||
title: "Talent",
|
||||
description:
|
||||
"Connecting talented designers, filmmakers, photographers, and strategists to help progressive campaigns tell stories that win.",
|
||||
},
|
||||
{
|
||||
icon: "media",
|
||||
title: "Media",
|
||||
description:
|
||||
"Producing original leftist content, from rapid-response videos to long-form storytelling that moves people to organize and act.",
|
||||
},
|
||||
{
|
||||
icon: "infra",
|
||||
title: "Infrastructure",
|
||||
description:
|
||||
"Building digital tools and platforms independent from big tech that help leftist organizers mobilize, communicate, and win.",
|
||||
},
|
||||
];
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<!-- Hero -->
|
||||
<section class="hero">
|
||||
<div class="hero-bg">
|
||||
<picture>
|
||||
<source srcset="/hero-bg.webp" type="image/webp" />
|
||||
<img src="/hero-bg.jpg" alt="" aria-hidden="true" width="1920" height="1536" />
|
||||
</picture>
|
||||
</div>
|
||||
<header class="hero-header">
|
||||
<div class="container">
|
||||
<div class="hero-logo">Lofty</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container hero-inner">
|
||||
<h1 class="hero-headline">
|
||||
{heroLines.map((line, i) => (
|
||||
<span class="line-reveal" style={`--i: ${i}`}>{line}</span>
|
||||
))}
|
||||
</h1>
|
||||
<p class="hero-sub">
|
||||
The Lofty Project aims to bridge talented creatives<br class="hide-mobile" /> with leftist movements and progressive campaigns.
|
||||
</p>
|
||||
<div class="hero-cta-wrap">
|
||||
<a href="#signup" class="hero-cta">
|
||||
<span>Get involved</span>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- What We Build -->
|
||||
<section class="what-we-do">
|
||||
<div class="container">
|
||||
<p class="section-eyebrow reveal">Our work</p>
|
||||
<h2 class="section-heading reveal" style="--stagger: 1">What we're building</h2>
|
||||
<div class="pillars">
|
||||
{pillars.map((pillar, i) => (
|
||||
<div class="pillar reveal" style={`--stagger: ${i + 2}`}>
|
||||
<div class={`pillar-icon pillar-icon--${pillar.icon}`} aria-hidden="true">
|
||||
{pillar.icon === 'talent' && (
|
||||
<svg viewBox="0 0 32 32" fill="none"><circle cx="16" cy="12" r="5" stroke="currentColor" stroke-width="1.5"/><path d="M6 28c0-5.523 4.477-10 10-10s10 4.477 10 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
||||
)}
|
||||
{pillar.icon === 'media' && (
|
||||
<svg viewBox="0 0 32 32" fill="none"><rect x="4" y="6" width="24" height="16" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M13 11l7 4-7 4V11z" fill="currentColor" opacity="0.6"/><path d="M10 26h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
||||
)}
|
||||
{pillar.icon === 'infra' && (
|
||||
<svg viewBox="0 0 32 32" fill="none"><rect x="8" y="4" width="16" height="8" rx="2" stroke="currentColor" stroke-width="1.5"/><rect x="8" y="20" width="16" height="8" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M16 12v8M12 12v2l-4 4v2M20 12v2l4 4v2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
||||
)}
|
||||
</div>
|
||||
<h3 class="pillar-title">{pillar.title}</h3>
|
||||
<p class="pillar-desc">{pillar.description}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Email Signup -->
|
||||
<section class="signup" id="signup">
|
||||
<div class="container signup-inner">
|
||||
<p class="section-eyebrow reveal">Get involved</p>
|
||||
<h2 class="section-heading reveal" style="--stagger: 1">Lend your skills</h2>
|
||||
<p class="signup-desc reveal" style="--stagger: 2">
|
||||
We're looking for creatives, organizers, and anyone ready to put their talent toward building a better country for all.
|
||||
</p>
|
||||
<!-- TODO: Restore email signup form
|
||||
<form
|
||||
class="signup-form reveal"
|
||||
style="--stagger: 3"
|
||||
action={signupEndpoint}
|
||||
method="POST"
|
||||
data-endpoint={signupEndpoint}
|
||||
>
|
||||
<label for="email" class="sr-only">Email address</label>
|
||||
<div class="input-wrap">
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="you@example.com"
|
||||
required
|
||||
autocomplete="email"
|
||||
class="signup-input"
|
||||
/>
|
||||
</div>
|
||||
<button type="submit" class="signup-btn">
|
||||
<span class="btn-text">Count me in</span>
|
||||
<svg class="btn-arrow" width="18" height="18" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
-->
|
||||
<div class="interest-buttons reveal" style="--stagger: 3">
|
||||
<a href="https://lofty.to/creative-interest" class="interest-btn" target="_blank" rel="noopener">
|
||||
<span>Creatives</span>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="https://lofty.to/volunteer-interest" class="interest-btn interest-btn--outline" target="_blank" rel="noopener">
|
||||
<span>Operations</span>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="site-footer">
|
||||
<div class="container footer-inner">
|
||||
<p class="footer-text">© {new Date().getFullYear()} The Lofty Project.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</Layout>
|
||||
|
||||
<style>
|
||||
/* ——— Utilities ——— */
|
||||
.container {
|
||||
max-width: 68rem;
|
||||
margin-inline: auto;
|
||||
padding-inline: var(--space-md);
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/* ——— Hero ——— */
|
||||
.hero {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--color-cream);
|
||||
}
|
||||
|
||||
.hero-bg {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.hero-bg img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center center;
|
||||
filter: blur(2px) saturate(0.15) brightness(1.2);
|
||||
transform: scale(1.03);
|
||||
opacity: 0.3;
|
||||
mix-blend-mode: multiply;
|
||||
}
|
||||
|
||||
.hero-bg::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(245, 240, 235, 0.4) 0%,
|
||||
rgba(237, 230, 223, 0.6) 50%,
|
||||
rgba(245, 240, 235, 0.85) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.hero-inner {
|
||||
max-width: 56rem;
|
||||
padding-block: var(--space-3xl);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.hero-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
padding-block: var(--space-lg);
|
||||
}
|
||||
|
||||
.hero-logo {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--color-navy);
|
||||
letter-spacing: -0.02em;
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
animation: fade-in-up 1s var(--ease-out-quart) 0.1s forwards;
|
||||
}
|
||||
|
||||
.hide-mobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.hide-mobile {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-headline {
|
||||
font-size: var(--text-4xl);
|
||||
color: var(--color-navy);
|
||||
margin-bottom: var(--space-md);
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.line-reveal {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
filter: blur(10px);
|
||||
transform: translateY(0.4em);
|
||||
animation: line-clip 1.4s var(--ease-out-quart) forwards;
|
||||
animation-delay: calc(0.3s + var(--i) * 0.35s);
|
||||
}
|
||||
|
||||
@keyframes line-clip {
|
||||
to {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.hero-sub {
|
||||
font-size: var(--text-lg);
|
||||
color: var(--color-navy-light);
|
||||
max-width: 34rem;
|
||||
margin-inline: auto;
|
||||
margin-top: var(--space-lg);
|
||||
line-height: 1.6;
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
transform: translateY(1rem);
|
||||
animation: fade-in-up 1.2s var(--ease-out-quart) 1s forwards;
|
||||
}
|
||||
|
||||
.hero-cta-wrap {
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
transform: translateY(1rem);
|
||||
animation: fade-in-up 1.2s var(--ease-out-quart) 1.3s forwards;
|
||||
margin-top: var(--space-xl);
|
||||
}
|
||||
|
||||
.hero-cta {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 1.75rem;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--color-white);
|
||||
background: var(--color-navy);
|
||||
border-radius: var(--radius-full);
|
||||
text-decoration: none;
|
||||
transition: transform var(--duration-base) var(--ease-out-quart),
|
||||
background-color var(--duration-base) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
.hero-cta:hover {
|
||||
text-decoration: none;
|
||||
background: var(--color-navy-light);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.hero-cta:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
@keyframes fade-in-up {
|
||||
to {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ——— What We Do ——— */
|
||||
.what-we-do {
|
||||
padding-block: var(--space-3xl) var(--space-2xl);
|
||||
}
|
||||
|
||||
.section-eyebrow {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--color-dusty-rose);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-xs);
|
||||
}
|
||||
|
||||
.section-heading {
|
||||
font-size: var(--text-3xl);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-xl);
|
||||
color: var(--color-navy);
|
||||
}
|
||||
|
||||
.pillars {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.pillars {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--space-md);
|
||||
}
|
||||
}
|
||||
|
||||
.pillar {
|
||||
text-align: center;
|
||||
padding: var(--space-xl) var(--space-lg);
|
||||
border-radius: var(--radius-lg);
|
||||
background: rgba(253, 252, 250, 0.5);
|
||||
border: 1px solid rgba(163, 177, 199, 0.15);
|
||||
box-shadow: 0 2px 8px rgba(26, 31, 46, 0);
|
||||
transition: transform var(--duration-slow) var(--ease-out-quart),
|
||||
box-shadow var(--duration-slow) var(--ease-out-quart),
|
||||
border-color var(--duration-slow) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
.pillar:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 16px 48px rgba(26, 31, 46, 0.08), 0 4px 12px rgba(26, 31, 46, 0.04);
|
||||
border-color: rgba(196, 139, 139, 0.25);
|
||||
}
|
||||
|
||||
.pillar-icon {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
margin-inline: auto;
|
||||
margin-bottom: var(--space-md);
|
||||
border-radius: var(--radius-lg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pillar-icon svg {
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pillar-icon--talent {
|
||||
background: linear-gradient(135deg, rgba(196, 139, 139, 0.15), rgba(196, 139, 139, 0.05));
|
||||
color: var(--color-dusty-rose);
|
||||
}
|
||||
|
||||
.pillar-icon--media {
|
||||
background: linear-gradient(135deg, rgba(138, 155, 181, 0.15), rgba(138, 155, 181, 0.05));
|
||||
color: var(--color-slate-blue);
|
||||
}
|
||||
|
||||
.pillar-icon--infra {
|
||||
background: linear-gradient(135deg, rgba(45, 53, 72, 0.12), rgba(45, 53, 72, 0.04));
|
||||
color: var(--color-navy-light);
|
||||
}
|
||||
|
||||
.pillar-title {
|
||||
font-size: var(--text-xl);
|
||||
margin-bottom: var(--space-xs);
|
||||
color: var(--color-navy);
|
||||
}
|
||||
|
||||
.pillar-desc {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--color-navy-light);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* ——— Signup ——— */
|
||||
.signup {
|
||||
padding-block: var(--space-2xl) var(--space-3xl);
|
||||
background-color: var(--color-cream-dark);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.signup-inner {
|
||||
max-width: 36rem;
|
||||
text-align: center;
|
||||
padding-top: var(--space-xl);
|
||||
}
|
||||
|
||||
.signup-desc {
|
||||
font-size: var(--text-lg);
|
||||
color: var(--color-navy-light);
|
||||
margin-bottom: var(--space-xl);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.interest-buttons {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.interest-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 1.75rem;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--color-white);
|
||||
background: var(--color-navy);
|
||||
border-radius: var(--radius-full);
|
||||
text-decoration: none;
|
||||
transition: transform var(--duration-base) var(--ease-out-quart),
|
||||
background-color var(--duration-base) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
.interest-btn:hover {
|
||||
background: var(--color-navy-light);
|
||||
transform: scale(1.05);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.interest-btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.interest-btn--outline {
|
||||
background: transparent;
|
||||
color: var(--color-navy);
|
||||
border: 1px solid rgba(26, 31, 46, 0.2);
|
||||
}
|
||||
|
||||
.interest-btn--outline:hover {
|
||||
background: rgba(26, 31, 46, 0.06);
|
||||
border-color: rgba(26, 31, 46, 0.35);
|
||||
color: var(--color-navy);
|
||||
}
|
||||
|
||||
.signup-form {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
justify-content: center;
|
||||
max-width: 26rem;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.signup-input {
|
||||
width: 100%;
|
||||
height: 2.5rem;
|
||||
padding: 0 0.75rem;
|
||||
border: 1px solid rgba(163, 177, 199, 0.35);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-white);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--color-navy);
|
||||
transition: border-color var(--duration-fast) ease,
|
||||
box-shadow var(--duration-fast) ease;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.signup-input::placeholder {
|
||||
color: var(--color-slate-light);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.signup-input:focus {
|
||||
border-color: var(--color-navy-light);
|
||||
box-shadow: 0 0 0 3px rgba(26, 31, 46, 0.06);
|
||||
}
|
||||
|
||||
.signup-input.has-error {
|
||||
border-color: var(--color-dusty-rose);
|
||||
animation: shake 0.35s var(--ease-out);
|
||||
}
|
||||
|
||||
@keyframes shake {
|
||||
0%, 100% { transform: translateX(0); }
|
||||
25% { transform: translateX(-4px); }
|
||||
50% { transform: translateX(4px); }
|
||||
75% { transform: translateX(-2px); }
|
||||
}
|
||||
|
||||
.signup-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
height: 2.5rem;
|
||||
padding: 0 1rem;
|
||||
background: var(--color-navy);
|
||||
color: var(--color-white);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.01em;
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: background-color var(--duration-fast) ease,
|
||||
opacity var(--duration-fast) ease;
|
||||
}
|
||||
|
||||
.btn-arrow {
|
||||
transition: transform var(--duration-fast) ease;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.signup-btn:hover {
|
||||
background-color: var(--color-navy-light);
|
||||
}
|
||||
|
||||
.signup-btn:hover .btn-arrow {
|
||||
transform: translateX(2px);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.signup-btn:active {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.signup-form.is-success .signup-btn {
|
||||
background-color: var(--color-slate-blue);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.signup-form.is-success .signup-input {
|
||||
opacity: 0.4;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ——— Scroll animations ——— */
|
||||
.reveal {
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
transform: translateY(2.5rem);
|
||||
transition: opacity var(--duration-slower) var(--ease-in-out),
|
||||
filter var(--duration-slower) var(--ease-in-out),
|
||||
transform var(--duration-slower) var(--ease-in-out);
|
||||
transition-delay: calc(var(--stagger, 0) * 120ms);
|
||||
}
|
||||
|
||||
.reveal.is-visible {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
transition: opacity var(--duration-slower) var(--ease-in-out),
|
||||
filter var(--duration-slower) var(--ease-in-out),
|
||||
transform var(--duration-slower) var(--ease-in-out),
|
||||
box-shadow var(--duration-slow) var(--ease-out-quart),
|
||||
border-color var(--duration-slow) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
/* ——— Footer ——— */
|
||||
.site-footer {
|
||||
padding-block: var(--space-xl);
|
||||
background: var(--color-cream);
|
||||
}
|
||||
|
||||
.footer-inner {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-text {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--color-navy-light);
|
||||
opacity: 0.45;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
// Intersection Observer for scroll-triggered animations
|
||||
const revealEls = document.querySelectorAll('.reveal');
|
||||
|
||||
if (revealEls.length > 0) {
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('is-visible');
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
},
|
||||
{ threshold: 0.1, rootMargin: '-40px 0px' }
|
||||
);
|
||||
|
||||
revealEls.forEach((el) => observer.observe(el));
|
||||
}
|
||||
|
||||
// Form handler
|
||||
const form = document.querySelector<HTMLFormElement>('.signup-form');
|
||||
const input = document.querySelector<HTMLInputElement>('.signup-input');
|
||||
const btnText = document.querySelector<HTMLSpanElement>('.btn-text');
|
||||
|
||||
if (form && input && btnText) {
|
||||
const endpoint = form.dataset.endpoint || '/api/signup';
|
||||
let originalPlaceholder = input.placeholder;
|
||||
|
||||
form.addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const email = input.value.trim();
|
||||
if (!email) return;
|
||||
|
||||
try {
|
||||
const res = await fetch(endpoint, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ email }),
|
||||
});
|
||||
|
||||
if (!res.ok) throw new Error('Signup failed');
|
||||
|
||||
// Success state
|
||||
form.classList.add('is-success');
|
||||
btnText.textContent = "You're in";
|
||||
input.value = '';
|
||||
} catch {
|
||||
// Error state
|
||||
input.classList.add('has-error');
|
||||
input.value = '';
|
||||
input.placeholder = 'Something went wrong — try again';
|
||||
|
||||
setTimeout(() => {
|
||||
input.classList.remove('has-error');
|
||||
input.placeholder = originalPlaceholder;
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
5
tsconfig.json
Normal file
5
tsconfig.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"exclude": ["dist"]
|
||||
}
|
||||
Reference in New Issue
Block a user