From 1a3ba05bc09f7ed5f96a0e329f74d25b0aa9eeba Mon Sep 17 00:00:00 2001
From: Zed <zedeus@pm.me>
Date: Mon, 12 Aug 2019 22:57:43 +0200
Subject: [PATCH] New navigation bar

---
 public/logo.png       | Bin 0 -> 3019 bytes
 public/style.css      |  21 +++++++++++++++++++++
 src/views/general.nim |  17 +++++++++++++----
 3 files changed, 34 insertions(+), 4 deletions(-)
 create mode 100644 public/logo.png

diff --git a/public/logo.png b/public/logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..2cd5263d673194e1e4f942bfa4a999152ae167c0
GIT binary patch
literal 3019
zcmcgue@s(n6n&-D7M!Jk+Nr5L5QMF$f0!*=Sm_(Z0xoFT1YG2YiEdfc$y`wgRcaZd
zl?c(v%$#6TL&6etM3;=gATU{GLKZ5rxgQb%H7&RysKhEdcJ2o=fNnExk+kW1-@D)W
z&OP_u^RTZ=Hq7>0;Ky;??8F3p3df0V(^obVEA2mC-j5&OoP-VUbKI;z`ieTc_uj|F
zo<zOyM&2*KceieT-S_$8^OCRR^A3M=DAeK;S>h9VUL5`ArnnFxv&bpg?7mmv{%!s{
zdym~|x<0?HTLs9c{cBm@9o^a<v-j?OkKbCeqgm^HtvBD|wmU|9N8)5v(!45JL-58}
zTTgyZ{?2tfj&c54PEdxo+~U3r?omG%>}W4MXI}rITT~S>PqXL)PNu;py`QtnopRn|
z)8GQ1RE@<^R3pYi-t+JwKfrz7b5(LA?Owa2O&Q}K6CGt5I*VOh7mF$OV2zmfNGLpc
zb9E^Yg6x1xwp1WQpV~knbVl8rTuxHSsZ~0cz1C!uDomk9sm|qF*C~=zo=Z~Za)O~t
zBvF0rlmjBWnvg4&4FD-@09-}HEoejkI9-e5YzhVY)S7gzkkg&<Duv0W2XshFl2oD!
zRcCaGgp!2mAqpH)QcaA&*W!pHzPv|a2Xq|x$~27cxF*C`C;?v}6JMYbX&LwmCB#?f
z5+?Wp0(`A<;tM43waUR4%fuI`M0#=v(>N;rS@R7EoSqU%w&{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E(Gs9j@FgWrpyqb{LIA1=H@Fs`QEV7yZH@>Lf6IiDLqF5fsSEhk=q92Lx
zVh?u^(=KN7!BVoyc}zG5s~4o;8(^{!Ux^BQfd{^Vlv2VJP4Go9^tH-KUqU63VfBOz
z>y&9Mgb%)eXi360vU;E<P;0UoU{()Q!kZkz5d~QNGv<qynU)eYcuUGN=NoD)IkIw9
z>$Us~Gh?FbTq1fcawNP0<=}8lGp>V{99}84CU`h2$zLmVo%zKbp9IBxpH<c)$f_c$
zr1Kj574Q1zEkaEqTUW$pB@daKm)&xSJAyjI!ksu<aOP0VaLm*G15EpBytCB{S05_A
R`D-rSCdMc0PraIL{S%*!QMdpA

literal 0
HcmV?d00001

diff --git a/public/style.css b/public/style.css
index 900fbb4..85fa05e 100644
--- a/public/style.css
+++ b/public/style.css
@@ -193,6 +193,7 @@ nav {
     padding-right: 10px;
     display: flex;
     align-items: center;
+    flex-basis: 920px;
     height: 50px;
 }
 
@@ -204,6 +205,26 @@ nav {
     flex-wrap: wrap;
 }
 
+.item.right {
+    text-align: right;
+    justify-content: flex-end;
+}
+
+.site-logo {
+    width: 35px;
+    height: 35px;
+}
+
+.site-about {
+    font-size: 17px;
+    padding-right: 2px;
+    margin-top: -0.75px;
+}
+
+.site-settings {
+    font-size: 18px;
+}
+
 .attachments {
     margin-top: .35em;
     display: flex;
diff --git a/src/views/general.nim b/src/views/general.nim
index a6d496d..ac01672 100644
--- a/src/views/general.nim
+++ b/src/views/general.nim
@@ -4,6 +4,18 @@ import ../utils
 
 const doctype = "<!DOCTYPE html>\n"
 
+proc renderNavbar*(title: string): VNode =
+  buildHtml(nav(id="nav", class="nav-bar container")):
+    tdiv(class="inner-nav"):
+      tdiv(class="item"):
+        a(class="site-name", href="/"): text title
+
+      a(href="/"): img(class="site-logo", src="/logo.png")
+
+      tdiv(class="item right"):
+        a(class="site-about", href="/about"): text "🛈"
+        a(class="site-settings", href="/settings"): text "âš™"
+
 proc renderMain*(body: VNode; title="Nitter"; titleText=""; desc="";
                  `type`="article"; video=""; images: seq[string] = @[]): string =
   let node = buildHtml(html(lang="en")):
@@ -29,10 +41,7 @@ proc renderMain*(body: VNode; title="Nitter"; titleText=""; desc="";
         meta(property="og:video:secure_url", content=video)
 
     body:
-      nav(id="nav", class="nav-bar container"):
-        tdiv(class="inner-nav"):
-          tdiv(class="item"):
-            a(href="/", class="site-name"): text title
+      renderNavbar(title)
 
       tdiv(id="content", class="container"):
         body