1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| | ;;; GNU Guix web site
;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Initially written by sirgazil who waves all
;;; copyright interest on this file.
(define-module (apps videos templates video)
#:use-module (apps base templates components)
#:use-module (apps base templates theme)
#:use-module (apps base types)
#:use-module (apps base utils)
#:use-module (apps videos templates components)
#:use-module (apps videos types)
#:use-module (apps videos utils)
#:export (video-t))
(define (video-t previous video next)
"Return a page in SHTML for the given VIDEO. If true, links to the
PREVIOUS and NEXT videos are added."
(theme
#:title (list "Video" (video-title video))
#:description
"Video about GNU Guix."
#:keywords
'("GNU" "Linux" "Unix" "Free software" "Libre software"
"Operating system" "GNU Hurd" "GNU Guix package manager"
"Help resources" "Videos")
#:active-menu-item "Videos"
#:css (list
(guix-url "static/base/css/page.css")
(guix-url "static/base/css/index.css"))
#:crumbs (list (crumb "Videos" (guix-url "videos/"))
(crumb (video-title video) "./"))
#:content
`(main
(@ (class "page centered-block limit-width"))
(h2 ,(video-title video))
,(video-content video)
,(if previous
`(div
,(link-yellow
#:label "← Previous"
#:url (guix-url (video->url previous))))
"")
,(if next
`(div
,(link-yellow
#:label "Next →"
#:url (guix-url (video->url next))))
""))))
|