Przeglądaj źródła

Add liberapay logo

Zed 6 lat temu
rodzic
commit
38d4ba6298
3 zmienionych plików z 20 dodań i 1 usunięć
  1. 6 0
      public/lp.svg
  2. 10 0
      src/sass/navbar.scss
  3. 4 1
      src/views/general.nim

+ 6 - 0
public/lp.svg

@@ -0,0 +1,6 @@
+<svg class="lp" viewBox="0 0 40.6 52.3">
+  <g transform="matrix(0.83,0,0,0.83,-158,-261)">
+    <path d="m202.5,366c-3.1 0-5.5-0.4-7.3-1.2-1.8-0.8-3-1.9-3.8-3.3-0.8-1.4-1.1-3-1.1-4.8 0-1.8 0.3-3.7 0.8-5.8l8.3-34.8 10.2-1.6-9.1 37.8c-0.2 0.8-0.3 1.5-0.3 2.2 0 0.7 0.1 1.2 0.4 1.7 0.3 0.5 0.7 0.9 1.3 1.2 0.6 0.3 1.5 0.5 2.7 0.6l-2 8.1"/>
+    <path d="m239.2 344.3c0 3.2-0.5 6.1-1.6 8.8-1 2.6-2.5 4.9-4.4 6.9-1.9 1.9-4.1 3.4-6.7 4.5-2.6 1.1-5.4 1.6-8.5 1.6-1.5 0-3-0.1-4.5-0.4l-3 11.9h-9.7l10.9-45.4c1.7-0.5 3.7-1 6-1.4 2.3-0.4 4.7-0.6 7.3-0.6 2.4 0 4.6 0.4 6.3 1.1 1.8 0.7 3.2 1.8 4.4 3 1.1 1.3 2 2.8 2.5 4.5 0.5 1.7 0.8 3.6 0.8 5.5m-23.8 13.4c0.7 0.2 1.7 0.3 2.8 0.3 1.7 0 3.3-0.3 4.7-1 1.4-0.6 2.6-1.5 3.6-2.7 1-1.1 1.7-2.5 2.3-4.1 0.5-1.6 0.8-3.4 0.8-5.3 0-1.9-0.4-3.5-1.2-4.8-0.8-1.3-2.3-2-4.3-2-1.4 0-2.7 0.1-3.9 0.4l-4.6 19.1"/>
+  </g>
+</svg>

+ 10 - 0
src/sass/navbar.scss

@@ -65,3 +65,13 @@ nav {
         }
     }
 }
+
+.lp {
+    height: 13px;
+    display: block;
+    fill: var(--fg_nav);
+
+    &:hover {
+        fill: var(--accent_light);
+    }
+}

+ 4 - 1
src/views/general.nim

@@ -6,7 +6,9 @@ import ../utils, ../types, ../prefs, ../formatters
 
 import jester
 
-const doctype = "<!DOCTYPE html>\n"
+const
+  doctype = "<!DOCTYPE html>\n"
+  lp = readFile("public/lp.svg")
 
 proc renderNavbar*(title, rss: string; req: Request): VNode =
   let twitterPath = getTwitterLink(req.path, req.params)
@@ -25,6 +27,7 @@ proc renderNavbar*(title, rss: string; req: Request): VNode =
         if rss.len > 0:
           icon "rss-feed", title="RSS Feed", href=rss
         icon "bird", title="Open in Twitter", href=twitterPath
+        a(href="https://liberapay.com/zedeus"): verbatim lp
         icon "info-circled", title="About", href="/about"
         iconReferer "cog", "/settings", path, title="Preferences"