feat(frontend): add dedicated /cli page, nav links, and CTA buttons; remove CLI modals for leaner UX

- New CLI page at /cli with detailed usage and improved Quick Start card header
- Add CLI link to navbars and small ‘Try the CLI’ CTAs on Home & Templates
- Remove CLI modals and unused showCliModal() handler (keep_small_simple)
- Self-host Bootstrap and Font Awesome; add OSI logo and GPL notice in footers
- Dockerfile: verify vendor assets exist at build time
- Minor a11y/contrast and heading-order cleanups (100 a11y)
This commit is contained in:
William Valentin
2025-09-15 00:47:31 -07:00
parent 9caf95bb7a
commit a0ae5f869e
16 changed files with 589 additions and 48 deletions

View File

@@ -11,6 +11,7 @@ from typing import Any, Dict, List, Optional
from fastapi import FastAPI, File, HTTPException, Request, UploadFile # type: ignore
from fastapi.middleware.cors import CORSMiddleware # type: ignore
from fastapi.middleware.gzip import GZipMiddleware # type: ignore
from fastapi.responses import FileResponse, HTMLResponse # type: ignore
from fastapi.staticfiles import StaticFiles # type: ignore
from fastapi.templating import Jinja2Templates # type: ignore
@@ -38,6 +39,9 @@ app.add_middleware(
allow_headers=["*"],
)
# Add GZip compression
app.add_middleware(GZipMiddleware, minimum_size=500)
# Setup templates and static files
BASE_DIR = Path(__file__).resolve().parent.parent.parent
TEMPLATES_DIR = BASE_DIR / settings.templates_dir
@@ -155,6 +159,14 @@ async def templates_page(request: Request):
context.update(settings.get_template_context())
return templates.TemplateResponse("templates.html", context)
# CLI Info Page
@app.get("/cli", response_class=HTMLResponse)
async def cli_page(request: Request):
"""Serve the CLI information page."""
context = {"request": request}
context.update(settings.get_template_context())
return templates.TemplateResponse("cli.html", context)
# API Routes
@app.post("/api/validate", response_model=ValidationResult)