feat: Product landing page at / with responsive design
- landing.html: Full product website (hero, features, how-it-works, platform coverage, pricing, FAQ, CTA, footer) - main.py: Route / to landing.html (overrides StaticFiles default index.html) - Workspace dashboard remains at /index.html - Responsive: desktop nav, hamburger mobile menu, single-column on small screens - No Vue/Element Plus dependency; standalone HTML+CSS+JS (~30KB) Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -115,9 +115,20 @@ if AUTOMATION_IMAGES_DIR.exists():
|
||||
|
||||
# 挂载前端
|
||||
FRONTEND_DIR = Path(__file__).parent.parent.parent / "frontend"
|
||||
if FRONTEND_DIR.exists() and (FRONTEND_DIR / "index.html").exists():
|
||||
if FRONTEND_DIR.exists() and (FRONTEND_DIR / "landing.html").exists():
|
||||
|
||||
# Landing page at / (overrides StaticFiles default index.html)
|
||||
@app.get("/")
|
||||
async def landing_page():
|
||||
return FileResponse(str(FRONTEND_DIR / "landing.html"), media_type="text/html")
|
||||
|
||||
@app.get("/landing.html")
|
||||
async def landing_direct():
|
||||
return FileResponse(str(FRONTEND_DIR / "landing.html"), media_type="text/html")
|
||||
|
||||
# Workspace dashboard at /index.html (existing management UI)
|
||||
app.mount("/", StaticFiles(directory=str(FRONTEND_DIR), html=True), name="frontend")
|
||||
logger.info(f"Frontend mounted at / from {FRONTEND_DIR}")
|
||||
logger.info(f"Frontend mounted at / from {FRONTEND_DIR} (landing at /)")
|
||||
|
||||
# SW 特殊处理
|
||||
sw_path = FRONTEND_DIR / "sw.js"
|
||||
|
||||
Reference in New Issue
Block a user