diff options
Diffstat (limited to 'web/view')
| -rw-r--r-- | web/view/brand/aging.scm | 2 | ||||
| -rw-r--r-- | web/view/brand/msk.scm | 2 | ||||
| -rw-r--r-- | web/view/doc.scm | 2 | ||||
| -rw-r--r-- | web/view/markdown.scm | 29 | ||||
| -rw-r--r-- | web/view/view.scm | 12 |
5 files changed, 27 insertions, 20 deletions
diff --git a/web/view/brand/aging.scm b/web/view/brand/aging.scm index 19db4d7..040c711 100644 --- a/web/view/brand/aging.scm +++ b/web/view/brand/aging.scm @@ -53,7 +53,7 @@ ,info) (footer (hr) - (p "Copyright © 2005-2023 " + (p "Copyright © 2005-2025 " (a (@ (href "https://genenetwork.org/")) "GeneNetwork Webservices") " | 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/brand/msk.scm b/web/view/brand/msk.scm index 69c1253..4cbcec4 100644 --- a/web/view/brand/msk.scm +++ b/web/view/brand/msk.scm @@ -51,7 +51,7 @@ (p ,info) (footer (hr) - (p "Copyright © 2005-2023 " + (p "Copyright © 2005-2025 " (a (@ (href "https://genenetwork.org/")) "GeneNetwork Webservices") " | 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/doc.scm b/web/view/doc.scm index 71112eb..cec4400 100644 --- a/web/view/doc.scm +++ b/web/view/doc.scm @@ -44,7 +44,7 @@ ,(scm->json-string body #:pretty #t)) ; (p ,(parse-html "<b>some raw really <i>text</i> here</b>")) (footer - (p "Copyright © 2005—2023 by the GeneNetwork community with a touch of " (span (@ (class "lambda")) "λ") "!") + (p "Copyright © 2005—2025 by the GeneNetwork community with a touch of " (span (@ (class "lambda")) "λ") "!") (p "This is free software. Download the " (a (@ (href "https://ci.genenetwork.org/")) "source code") ".")) diff --git a/web/view/markdown.scm b/web/view/markdown.scm index 653596f..6aa2935 100644 --- a/web/view/markdown.scm +++ b/web/view/markdown.scm @@ -15,9 +15,8 @@ #:use-module (web request) #:use-module (web sxml) #:use-module (commonmark) - #:export (markdown-file->sxml markdown-github->sxml fetch-file - fetch-raw-file commit-file)) + fetch-raw-file commit-file git-invoke)) (define (markdown-file->sxml fn) "Parse a local file" @@ -26,26 +25,26 @@ (define (fetch-raw-file url) (receive (response-status response-body) - (http-request url) response-body)) - -;; https://github.com/genenetwork/gn-docs/master/general/brand/aging/home.md -;; https://raw.githubusercontent.com/genenetwork/gn-docs/master/general/brand/aging/home.md -;; https://github.com/genenetwork/gn-docs/edit/master/general/brand/aging/home.md + (http-request url) response-body)) -(define (form-github-raw-url project repo page) +(define* (form-github-raw-url project repo page #:optional (branch "master")) (string-append "https://raw.githubusercontent.com/" project "/" repo - "/master/" + "/" + branch + "/" (string-join page "/"))) -(define (form-github-edit-url project repo page) +(define* (form-github-edit-url project repo page #:optional (branch "master")) (string-append "https://github.com/" project "/" repo - "/edit/master/" + "/edit/" + branch + "/" (string-join page "/"))) (define (markdown-github->sxml path) @@ -120,12 +119,12 @@ (if (zero? git-commit-file) `(("status" . "201") ("message" . "committed file successfully") - ("content" unquote content) - ("commit_sha" unquote git-commit-sha) - ("commit_message" unquote commit-message)) + ("content" . ,content) + ("commit_sha" . ,git-commit-sha) + ("commit_message" . ,commit-message)) `(("status" . "200") ("message" . "Nothing to commit, working tree clean") - ("commit_sha" unquote git-commit-sha))))) + ("commit_sha" . ,git-commit-sha))))) (#f (throw 'system-error (format #f "~a File does not exist error" file-path)))) (throw 'system-error diff --git a/web/view/view.scm b/web/view/view.scm index 4584cf8..95ff0a1 100644 --- a/web/view/view.scm +++ b/web/view/view.scm @@ -10,11 +10,12 @@ #:use-module (web view markdown) #:use-module (web view brand msk) #:use-module (web view brand aging) + #:use-module (web templates genenetwork) #:export (view-brand)) -(define (view-aging) +(define (view-aging-home) (aging-html #:info `( ,(markdown-github->sxml "genenetwork/gn-docs/general/brand/aging/home.md") @@ -44,7 +45,14 @@ data to benefit from the power of integrated datasets, please contact:") (define* (view-brand path) (match path - ("aging" (view-aging)) + ("aging/UMHET-3" (aging-html #:info + `(,(markdown-github->sxml "genenetwork/gn-docs/general/brand/aging/home.md")))) + ("aging/umhet-3" (aging-html #:info + `(,(markdown-github->sxml "genenetwork/gn-docs/general/brand/aging/home.md")))) + ("aging" (view-aging-home)) + ("gnqa" (default-gn-template + "genenetwork/gn-docs/general/brand/gnqa/gnqa.md" + "GeneNetwork Question and Answer System")) ( _ (msk-html #:info `( ,(markdown-github->sxml "genenetwork/gn-docs/general/brand/msk/home.md") |
