untitled-421README.md7 matches
8- 🧩 **Component-based HTML building** for programmatic generation
9- 📱 **Responsive design** with TailwindCSS integration
10- ⚛️ **React app export** support
11- 📦 **Minification** for optimized output
12- 💾 **Direct download** functionality
18- `/` - Main dashboard with export options
19- `/export/simple` - Download a simple HTML page
20- `/export/react` - Download a React application
21- `/export/custom` - Form to create custom HTML exports
2239title: "My App",
40content: "<div>Content here</div>",
41includeReact: true,
42customCSS: "body { background: #f0f0f0; }"
43});
105Downloads a simple HTML page with current timestamp.
106107### GET `/export/react`
108Downloads a React counter application as a standalone HTML file.
109110### GET `/export/custom`
1581. **Use templates** for consistent layouts
1592. **Minify HTML** for production exports
1603. **Pin React versions** when including React
1614. **Validate user input** in custom exports
1625. **Use semantic HTML** for accessibility
166167- **Template not found**: Ensure template files exist in `/templates/`
168- **React not loading**: Check that versions are pinned to 18.2.0
169- **Styles not applying**: Verify TailwindCSS script is included
170- **Download not working**: Check Content-Disposition headers
untitled-421html.ts5 matches
37title: string;
38content: string;
39includeReact?: boolean;
40customCSS?: string;
41customJS?: string;
42}): Promise<string> {
43const { title, content, includeReact = false, customCSS = "", customJS = "" } = options;
44
45let head = customCSS ? `<style>${customCSS}</style>` : "";
46let scripts = customJS ? `<script>${customJS}</script>` : "";
47
48if (includeReact) {
49head += `
50<script type="importmap">
51{
52"imports": {
53"react": "https://esm.sh/react@18.2.0",
54"react-dom": "https://esm.sh/react-dom@18.2.0"
55}
56}
Townie2ValTownLogo.tsx1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
23export function ValTownLogo () {
Townie2useUser.tsx1 match
1import { useState, useEffect } from "react";
23const USER_ENDPOINT = "/api/user";
Townie2useUsageStats.ts1 match
1import { useEffect } from "react";
23export function useUsageStats(messages: any[], usages: any[]) {
Townie2useScrollToBottom.tsx1 match
1import { useEffect, useRef } from 'https://esm.sh/react@18.2.0?dev';
23
Townie2useProject.tsx1 match
1import { useState, useEffect } from "react";
23const PROJECT_ENDPOINT = "/api/project";
Townie2useProjects.tsx1 match
1import { useState, useEffect } from "react";
23const ENDPOINT = "/api/projects-loader";
Townie2useLoadingFavicon.ts1 match
1import { useEffect } from "react";
23function setLoadingFavicon() {
Townie2useCreateProject.tsx1 match
1import { useState, useEffect } from "react";
23const ENDPOINT = "/api/create-project";