Add favicon to the app
Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/d5386c25-5b4f-4f21-8537-ae2d0fc06c04 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
+6
-1
@@ -5,7 +5,7 @@ from datetime import datetime
|
||||
|
||||
from fastapi import Depends, FastAPI, Request
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.responses import HTMLResponse
|
||||
from fastapi.responses import FileResponse, HTMLResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.templating import Jinja2Templates
|
||||
|
||||
@@ -369,6 +369,11 @@ async def index(request: Request):
|
||||
return templates.TemplateResponse(request, "index.html")
|
||||
|
||||
|
||||
@app.get("/favicon.ico", include_in_schema=False)
|
||||
async def favicon():
|
||||
return FileResponse(os.path.join(os.path.dirname(__file__), "static", "img", "favicon.ico"))
|
||||
|
||||
|
||||
# Individual page routes
|
||||
@app.get("/dashboard", response_class=HTMLResponse)
|
||||
async def dashboard(request: Request):
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 499 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -4,7 +4,13 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}DMARQ - DMARC Monitoring{% endblock %}</title>
|
||||
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/x-icon" href="/static/img/favicon.ico">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/static/img/favicon-16x16.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/static/img/apple-touch-icon.png">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@400;500;600&display=swap" rel="stylesheet">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user