about summary refs log tree commit diff
path: root/web/view
diff options
context:
space:
mode:
authorPjotr Prins2023-08-07 11:56:33 +0200
committerPjotr Prins2023-08-07 11:56:33 +0200
commit34ccdfe012cf11775ad3771e12e649aeabfae3ad (patch)
treeb3576cc7201ce8b81e8c9b9680a7e6af607cc426 /web/view
parent9b9d22605d0581187809865f029541c0381cc164 (diff)
downloadgn-guile-34ccdfe012cf11775ad3771e12e649aeabfae3ad.tar.gz
Added first HTML view using code from mumi/dave
Diffstat (limited to 'web/view')
-rw-r--r--web/view/doc.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/web/view/doc.scm b/web/view/doc.scm
new file mode 100644
index 0000000..c934a2a
--- /dev/null
+++ b/web/view/doc.scm
@@ -0,0 +1,41 @@
+(define-module (web view doc)
+  #:use-module (json)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
+  #:use-module (ice-9 iconv)
+  #:use-module (ice-9 receive)
+  #:use-module (ice-9 string-fun)
+  ; #:use-module (sxml simple)
+  #:use-module (web sxml)
+
+  #:export (view-doc))
+
+
+(define* (layout #:key
+                 (head '())
+                 (body '())
+                 (title "Guix issue tracker"))
+  `((doctype "html")
+    (html (@ (lang "en"))
+     (head
+      (title ,title)
+      (meta (@ (http-equiv "Content-Type") (content "text/html; charset=UTF-8")))
+      (meta (@ (name "author") (content "GeneNetwork team")))
+      (meta (@ (name "viewport")
+               (content "width=device-width, initial-scale=1")))
+      (link
+       (@ (rel "stylesheet")
+          (media "screen")
+          (type "text/css")
+          (href "./css/gn-doc.css")))
+      ,@head)
+     (body (h1 page)
+           (footer
+                   (p "Copyright © 2005—2023 by the GeneNetwork community with " (span (@ (class "lambda")) "λ") "!")
+                   (p "This is free software. Download the "
+                      (a (@ (href "https://ci.genenetwork.org/"))
+                         "source code") "."))
+           ))))
+
+(define (view-doc path page)
+  (layout))