aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2023-09-11 10:59:57 -0500
committerPjotr Prins2023-09-11 10:59:57 -0500
commitbb1beb91f41055b5fb892cef69d1bb4f84e02508 (patch)
treea4e52dbe64e60bd2ca81d67b5a7bc314a1add845
parentafce0bd01077ee279c79755b284f238fb544295f (diff)
downloadgn-guile-bb1beb91f41055b5fb892cef69d1bb4f84e02508.tar.gz
Support for aging
-rw-r--r--web/static/images/old-man-lisboa.jpgbin0 -> 332298 bytes
-rw-r--r--web/view/brand/aging.scm52
-rw-r--r--web/view/view.scm32
-rwxr-xr-xweb/webserver.scm4
4 files changed, 83 insertions, 5 deletions
diff --git a/web/static/images/old-man-lisboa.jpg b/web/static/images/old-man-lisboa.jpg
new file mode 100644
index 0000000..a43710a
--- /dev/null
+++ b/web/static/images/old-man-lisboa.jpg
Binary files differ
diff --git a/web/view/brand/aging.scm b/web/view/brand/aging.scm
new file mode 100644
index 0000000..c6f8284
--- /dev/null
+++ b/web/view/brand/aging.scm
@@ -0,0 +1,52 @@
+;; Branding module for AGING
+(define-module (web view brand aging)
+ #: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 (aging-html))
+
+
+(define* (aging-html #:key
+ (head '())
+ (body '())
+ (title "GN4AGING: GeneNetwork and Genetics for Aging")
+ (info "")
+ (meta "")
+ (data "")
+ (back "")
+ )
+ `((doctype "html")
+ (html (@ (lang "en"))
+ (head
+ (title ,title)
+ (meta (@ (charset "utf-8")))
+ (meta (@ (http-equiv "Content-Type") (content "text/html; charset=UTF-8")))
+ (meta (@ (name "author") (content "GN4AGING team (https://aging.genenetwork.org/)")))
+ (meta (@ (name "description") (content "The GN4AGING portal for muscuskeletal disease and model organisms")))
+ (meta (@ (name "viewport")
+ (content "width=device-width, initial-scale=1")))
+ ; (meta (@ (http-equiv "refresh") (content "5")))
+ (link
+ (@ (rel "stylesheet")
+ (media "screen")
+ (type "text/css")
+ ; (href "./css/gn-doc.css")
+ ))
+ ,@head)
+ (body
+ (img (@ (src "/static/images/old-man-lisboa.jpg")))
+ (h1 ,title)
+ (p ,info)
+ (footer
+ (hr)
+ (p "Copyright © 2005-2023 "
+ (a (@ (href "https://genenetwork.org/")) "GeneNetwork Webservices"))
+ (p "GeneNetwork and this website runs fully on free software. See status and download the "
+ (a (@ (href "https://ci.genenetwork.org/"))
+ "source code") "."))
+ ))))
diff --git a/web/view/view.scm b/web/view/view.scm
index 388be74..911ed7b 100644
--- a/web/view/view.scm
+++ b/web/view/view.scm
@@ -11,8 +11,36 @@
#:export (view-brand))
+(define (view-aging)
+ (aging-html #:info
+ '((h2 "Introduction")
+ (p "New aging portal! This is initial work for providing a full community webservice for aging.")
+ (h2 "Explore GeneNetwork for aging (GN4AGING)")
+ (p "Find all genes that have a hit for")
+ (ul
+ (li (a (@ (href "https://genenetwork.org/gsearch?type=gene&terms=aging")) "aging")))
+ (p "Find all phenotypes that have a hit for")
+ (ul
+ (li (a (@ (href "https://genenetwork.org/gsearch?type=phenotype&terms=aging")) "aging"))
+ )
+ (p "Note that you can use the powerful search at the top of the results page!
+Search terms can be "
+ (a (@ (href "https://issues.genenetwork.org/topics/xapian-search-queries")) "added") ". In the results click on any item to (re)run the relevant GWA or QTL mapping")
+ (h2 "Contact")
+ (p "We host private and public datasets. If you are interested in exploring data on GeneNetwork, or to add your own
+data to benefit from the power of integrated datasets, please contact:")
+ (a (@ (href "https://davidashbrook.wordpress.com/")) "David Ashbrook")
+ " | "
+ (a (@ (href "https://uthsc.edu/genetics/faculty-staff.php")) "Rob W Williams")
+ " | "
+ (a (@ (href "https://thebird.nl")) "Pjotr Prins")
+ (p)
+ (img (@ (src "/static/images/CMOR.jpg") (width "1000"))))))
+
(define* (view-brand path)
- (msk-html #:info
+ (match path
+ ("aging" (view-aging))
+ ( _ (msk-html #:info
'((h2 "Introduction")
(p "New start page for MSK! This is initial work for providing a full community webservice for musculoskeletal disease.")
(h2 "Explore GeneNetwork for MSK (GN4MSK)")
@@ -42,4 +70,4 @@ data to benefit from the power of integrated datasets, please contact:")
(a (@ (href "https://thebird.nl")) "Pjotr Prins")
(p)
(img (@ (src "/static/images/CMOR.jpg") (width "1000"))))
- ))
+ ))))
diff --git a/web/webserver.scm b/web/webserver.scm
index 73ae7ed..ce4ab9d 100755
--- a/web/webserver.scm
+++ b/web/webserver.scm
@@ -118,9 +118,7 @@ otherwise search for set/group data"
(define (render-json-string2 json)
(list '((content-type . (text/plain)))
(lambda (port)
- ;; (display "ThthxST" port)
- (format port "~a" "foo")
- )))
+ (format port "~a" "foo"))))
(define (controller request body)
(match-lambda