DVampire commited on
Commit
a1a8349
Β·
1 Parent(s): 310e884
Files changed (3) hide show
  1. app.py +13 -0
  2. frontend/index.html +6 -2
  3. frontend/paper.html +5 -1
app.py CHANGED
@@ -695,6 +695,19 @@ async def refresh_cache(date_str: str) -> Dict[str, Any]:
695
  raise HTTPException(status_code=500, detail=f"Failed to refresh cache: {str(e)}")
696
 
697
 
 
 
 
 
 
 
 
 
 
 
 
 
 
698
  @app.get("/styles.css")
699
  async def get_styles():
700
  """Serve CSS with no-cache headers to prevent caching issues during development"""
 
695
  raise HTTPException(status_code=500, detail=f"Failed to refresh cache: {str(e)}")
696
 
697
 
698
+ @app.get("/favicon.ico")
699
+ async def get_favicon():
700
+ """Serve favicon to prevent 404 errors"""
701
+ # Return a simple SVG favicon as text
702
+ favicon_svg = '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
703
+ <rect width="100" height="100" fill="#3b82f6"/>
704
+ <text x="50" y="65" font-family="Arial, sans-serif" font-size="50" text-anchor="middle" fill="white">πŸ“„</text>
705
+ </svg>'''
706
+
707
+ from fastapi.responses import Response
708
+ return Response(content=favicon_svg, media_type="image/svg+xml")
709
+
710
+
711
  @app.get("/styles.css")
712
  async def get_styles():
713
  """Serve CSS with no-cache headers to prevent caching issues during development"""
frontend/index.html CHANGED
@@ -3,8 +3,12 @@
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>AIR Index β€” Daily Papers</title>
7
- <link rel="stylesheet" href="/styles.css?v=9" />
 
 
 
 
8
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
9
  </head>
10
  <body>
 
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Paper Index - Daily AI Papers</title>
7
+
8
+ <!-- Favicon -->
9
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>πŸ“„</text></svg>">
10
+
11
+ <link rel="stylesheet" href="/styles.css?v=10" />
12
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
13
  </head>
14
  <body>
frontend/paper.html CHANGED
@@ -4,7 +4,11 @@
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
  <title>Paper Evaluation</title>
7
- <link rel="stylesheet" href="/styles.css?v=9" />
 
 
 
 
8
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
9
  </head>
10
  <body>
 
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
  <title>Paper Evaluation</title>
7
+
8
+ <!-- Favicon -->
9
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>πŸ“Š</text></svg>">
10
+
11
+ <link rel="stylesheet" href="/styles.css?v=10" />
12
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
13
  </head>
14
  <body>