;;; GNU Guix web site ;;; Copyright © 2019 Florian Pelz ;;; Initially written by sirgazil who waves all ;;; copyright interest on this file. (define-module (apps videos templates components) #:use-module (apps base templates components) #:use-module (apps videos types) #:use-module (srfi srfi-19) #:export (video-content)) (define (video-content video) `((div (video (@ (class "video-preview") (src ,(video-url video)) (poster ,(video-poster video)) (controls "controls")) (p "Download video: " ,(link-yellow #:label (video-title video) #:url (video-url video)) " (1 minute, 30 seconds)."))) ,(video-description video) ,(let ((date (video-last-updated video))) (if date `(p "Last updated: " ,(date->string date)) ""))))