Sfoglia il codice sorgente

Fix misc Lighthouse complaints

Zed 4 anni fa
parent
commit
df41405251
3 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. BIN
      public/android-chrome-512x512.png
  2. 6 0
      public/site.webmanifest
  3. 2 1
      src/views/general.nim

BIN
public/android-chrome-512x512.png


+ 6 - 0
public/site.webmanifest

@@ -1,4 +1,5 @@
 {
+    "start_url": "/",
     "name": "Nitter",
     "short_name": "Nitter",
     "icons": [
@@ -11,6 +12,11 @@
             "src": "/android-chrome-384x384.png",
             "sizes": "384x384",
             "type": "image/png"
+        },
+        {
+            "src": "/android-chrome-512x512.png",
+            "sizes": "512x512",
+            "type": "image/png"
         }
     ],
     "theme_color": "#333333",

+ 2 - 1
src/views/general.nim

@@ -20,7 +20,7 @@ proc renderNavbar*(title, rss: string; req: Request): VNode =
       tdiv(class="nav-item"):
         a(class="site-name", href="/"): text title
 
-      a(href="/"): img(class="site-logo", src="/logo.png")
+      a(href="/"): img(class="site-logo", src="/logo.png", alt="Logo")
 
       tdiv(class="nav-item right"):
         icon "search", title="Search", href="/search"
@@ -74,6 +74,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; titleText=""; desc=""; video="";
         text cfg.title
 
     meta(name="viewport", content="width=device-width, initial-scale=1.0")
+    meta(name="theme-color", content="#1F1F1F")
     meta(property="og:type", content=ogType)
     meta(property="og:title", content=(if ogTitle.len > 0: ogTitle else: titleText))
     meta(property="og:description", content=stripHtml(desc))