Przeglądaj źródła

Add "not supported" page at /about/feature

Fixes #42
Zed 7 lat temu
rodzic
commit
372ce7867c
3 zmienionych plików z 17 dodań i 1 usunięć
  1. 7 0
      public/md/feature.md
  2. 3 0
      src/nitter.nim
  3. 7 1
      src/views/about.nim

+ 7 - 0
public/md/feature.md

@@ -0,0 +1,7 @@
+# Unsupported feature
+
+Nitter doesn't support this feature yet, but it might in the future.
+You can check for an issue and open one if needed here:
+<https://github.com/zedeus/nitter/issues>
+
+To find out more about the Nitter project, see the [About page](/about).

+ 3 - 0
src/nitter.nim

@@ -30,6 +30,9 @@ routes:
   get "/about":
     resp renderMain(renderAbout(), request, cfg.title)
 
+  get "/about/feature":
+    resp renderMain(renderFeature(), request, cfg.title)
+
   extend preferences, ""
   extend rss, ""
   extend search, ""

+ 7 - 1
src/views/about.nim

@@ -1,8 +1,14 @@
 import karax/[karaxdsl, vdom]
 import markdown
 
-let about = markdown(readFile("public/md/about.md"))
+let
+  about = markdown(readFile("public/md/about.md"))
+  feature = markdown(readFile("public/md/feature.md"))
 
 proc renderAbout*(): VNode =
   buildHtml(tdiv(class="overlay-panel")):
     verbatim about
+
+proc renderFeature*(): VNode =
+  buildHtml(tdiv(class="overlay-panel")):
+    verbatim feature