🌑自部署文件添加暗色背景图片路由

This commit is contained in:
柳神 2024-09-28 23:44:06 +08:00
parent df1d4a6e70
commit 6cfadfca7b

View File

@ -31,6 +31,11 @@ async def favicon():
async def bg_light():
return FileResponse('static/bg-light.webp')
# 返回背景图片
@app.get("/bg-dark.webp", response_class=HTMLResponse)
async def bg_dark():
return FileResponse('static/bg-dark.webp')
@app.get("/", response_class=HTMLResponse)
async def root():
return FileResponse('./static/index.html')