From 1b2b7c3eb939724696894f31ff27db97b0cac84c Mon Sep 17 00:00:00 2001 From: Andreas Widen Date: Sat, 25 Nov 2023 17:21:37 +0100 Subject: Initial commit. Signed-off-by: Andreas Widen --- apps/media/templates/screenshot.scm | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 apps/media/templates/screenshot.scm (limited to 'apps/media/templates/screenshot.scm') diff --git a/apps/media/templates/screenshot.scm b/apps/media/templates/screenshot.scm new file mode 100644 index 0000000..5a32016 --- /dev/null +++ b/apps/media/templates/screenshot.scm @@ -0,0 +1,43 @@ +;;; Harmonic Flow web site + +(define-module (apps media templates screenshot) + #:use-module (apps base templates theme) + #:use-module (apps base types) + #:use-module (apps base utils) + #:use-module (apps media templates components) + #:use-module (apps media types) + #:use-module (apps i18n) + #:export (screenshot-t)) + + +(define (screenshot-t context) + "Return an SHTML page for the screenshot in the CONTEXT." + (let ((shot (context-datum context "screenshot")) + (shots (context-datum context "screenshots"))) + (theme + #:title (list (screenshot-title shot) (C_ "webpage title" "screenshot |")) + #:description (screenshot-caption shot) + #:keywords + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "Harmonic Flow|HFGE|Screenshot") #\|) + #:active-menu-item (C_ "website menu" "Screenshots") + #:css (list (hfweb-url "static/base/css/index.css") + (hfweb-url "static/media/css/screenshots.css")) + #:crumbs (list (crumb (C_ "website menu" "Screenshots") (hfweb-url "screenshots/")) + (crumb (screenshot-title shot) "./")) + #:content + `(main + (section + (@ (class "light-text centered-text noise-bg")) + (h2 + (@ (class "a11y-offset")) + ,(screenshot-title shot)) + + (div + (@ (class "screenshot-viewer")) + (img + (@ (class "responsive-image centered-block") + (src ,(screenshot-image shot)) + (alt ,(screenshot-caption shot))))) + + ,(screenshots-box shots #:shadow #t)))))) -- cgit v1.2.3-54-g00ecf