From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: Re: We need your feedback of the documentation videos! Date: Tue, 22 Oct 2019 14:05:04 +0200 Message-ID: <20191022120504.7cyoc5x2exylpzrg@pelzflorian.localdomain> References: <87d0i9gfme.fsf@elephly.net> <87o90zwtdq.fsf@elephly.net> <20191017043403.hwv77ripwbrzco54@pelzflorian.localdomain> <8736fov6go.fsf@gnu.org> <20191019210034.elopd6mhzq2dinxl@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fhrbse2gicyszos7" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49915) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMsud-0000oj-K9 for guix-devel@gnu.org; Tue, 22 Oct 2019 08:05:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMsuS-0001V0-Pd for guix-devel@gnu.org; Tue, 22 Oct 2019 08:05:19 -0400 Content-Disposition: inline In-Reply-To: <20191019210034.elopd6mhzq2dinxl@pelzflorian.localdomain> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix-devel --fhrbse2gicyszos7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable OAOn Sat, Oct 19, 2019 at 11:00:34PM +0200, pelzflorian (Florian Pelz) wr= ote: > On Sat, Oct 19, 2019 at 10:13:59PM +0200, Ludovic Court=C3=A8s wrote: > > [=E2=80=A6] if you wanted to integrate them on > > the web site, I think that=E2=80=99d be great. > >=20 >=20 > I suppose the =E2=80=9CDiscover Guix=E2=80=9D section on the homepage s= hould advertise > Guix System and the videos, maybe in buttons next to the ALL PACKAGES > button. I will look at making a proposal next week. I am nowhere > near as creative as the website=E2=80=99s authors, so maybe others will= think > of better designs. >=20 >=20 Do you have in mind something like the attached patch? It does not yet add all of the videos; this is more proof of concept-like. > > Especially since we now host the web site by ourselves, we could also > > host the videos there, so that can be pretty easy to do. > >=20 > > WDYT? > >=20 > > Ludo=E2=80=99. >=20 > I cannot judge whether audio-video.gnu.org is better or worse than > berlin. >=20 Putting the video files in the guix-artwork git repository may be wrong, so the patch does not do that yet, instead still referencing archive.org which seems wrong too. Regards, Florian --fhrbse2gicyszos7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-website-Use-needed-modules-in-posts.patch" >From eb38b985f3c8bddd9abef94256e398a395d29965 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 22 Oct 2019 13:15:07 +0200 Subject: [PATCH 1/2] website: Use needed modules in posts. * website/posts/back-from-seagl-2018.sxml: Use needed modules. --- website/posts/back-from-seagl-2018.sxml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/posts/back-from-seagl-2018.sxml b/website/posts/back-from-seagl-2018.sxml index c5ad0a9..958369f 100644 --- a/website/posts/back-from-seagl-2018.sxml +++ b/website/posts/back-from-seagl-2018.sxml @@ -1,6 +1,7 @@ (begin (use-modules (apps base templates components) - (srfi srfi-19)) + (apps base utils) + (srfi srfi-19)) `((title . "Back from SeaGL 2018") (author . "Chris Marusich") (date . ,(make-date 0 0 0 0 10 12 2018 -28800)) -- 2.23.0 --fhrbse2gicyszos7 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0002-wip-website-Add-documentation-videos.patch" Content-Transfer-Encoding: quoted-printable >From e1f3352ac249faf6a3c6ac82a5b2498550656708 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 22 Oct 2019 13:36:46 +0200 Subject: [PATCH 2/2] [wip] website: Add documentation videos. * website/static/videos/img/everyday-use-01.png: New file. * website/static/videos/img/everyday-use-02.png: New file. * website/static/videos/img/installation-from-script.png: New file. * website/apps/videos/data.scm: New file. * website/apps/videos/types.scm: New file. * website/apps/videos/utils.scm: New file. * website/apps/videos/templates/components.scm: New file. * website/apps/videos/templates/video-list.scm: New file. * website/apps/videos/templates/video.scm: New file. * website/apps/videos/builder.scm: New file. * website/haunt.scm (site): Add the builder. * website/apps/base/templates/components.scm (navbar): Add to navbar. * website/static/base/css/navbar.css: Increase size at which website switches to mobile mode. * website/apps/base/templates/home.scm (home-t): Reference videos in Discover Guix section. --- website/apps/base/templates/components.scm | 1 + website/apps/base/templates/home.scm | 8 ++- website/apps/videos/builder.scm | 65 +++++++++++++++++ website/apps/videos/data.scm | 46 ++++++++++++ website/apps/videos/templates/components.scm | 30 ++++++++ website/apps/videos/templates/video-list.scm | 46 ++++++++++++ website/apps/videos/templates/video.scm | 50 +++++++++++++ website/apps/videos/types.scm | 66 ++++++++++++++++++ website/apps/videos/utils.scm | 19 +++++ website/haunt.scm | 2 + website/static/base/css/navbar.css | 2 +- website/static/videos/img/everyday-use-01.png | Bin 0 -> 102437 bytes website/static/videos/img/everyday-use-02.png | Bin 0 -> 120292 bytes .../videos/img/installation-from-script.png | Bin 0 -> 91881 bytes 14 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 website/apps/videos/builder.scm create mode 100644 website/apps/videos/data.scm create mode 100644 website/apps/videos/templates/components.scm create mode 100644 website/apps/videos/templates/video-list.scm create mode 100644 website/apps/videos/templates/video.scm create mode 100644 website/apps/videos/types.scm create mode 100644 website/apps/videos/utils.scm create mode 100644 website/static/videos/img/everyday-use-01.png create mode 100644 website/static/videos/img/everyday-use-02.png create mode 100644 website/static/videos/img/installation-from-script.pn= g diff --git a/website/apps/base/templates/components.scm b/website/apps/ba= se/templates/components.scm index d3f6af1..ac3cd7b 100644 --- a/website/apps/base/templates/components.scm +++ b/website/apps/base/templates/components.scm @@ -294,6 +294,7 @@ ,(menu-item #:label "Download" #:active-item active-item #:url (gu= ix-url "download/")) ,(menu-item #:label "Packages" #:active-item active-item #:url (gu= ix-url "packages/")) ,(menu-item #:label "Blog" #:active-item active-item #:url (guix-u= rl "blog/")) + ,(menu-item #:label "Videos" #:active-item active-item #:url (guix= -url "videos/")) ,(menu-item #:label "Help" #:active-item active-item #:url (guix-u= rl "help/")) ,(menu-item #:label "Donate" #:active-item active-item #:url (guix= -url "donate/")) =20 diff --git a/website/apps/base/templates/home.scm b/website/apps/base/tem= plates/home.scm index 5cb3bf5..6a856ca 100644 --- a/website/apps/base/templates/home.scm +++ b/website/apps/base/templates/home.scm @@ -117,7 +117,13 @@ ,@(map screenshot->shtml (context-datum context "screenshots"))) =20 (div - (@ (class "action-box centered-text")) + (@ (class "fields-box")) + + ,(button-big + #:label "VIDEOS" + #:url (guix-url "videos/") + #:light #true) + " " ,(button-big #:label "ALL PACKAGES" #:url (guix-url "packages/") diff --git a/website/apps/videos/builder.scm b/website/apps/videos/builde= r.scm new file mode 100644 index 0000000..2a42220 --- /dev/null +++ b/website/apps/videos/builder.scm @@ -0,0 +1,65 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; Initially written by sirgazil who waives all +;;; copyright interest on this file. + +(define-module (apps videos builder) + #:use-module (apps aux web) + #:use-module (apps videos data) + #:use-module (apps videos templates video) + #:use-module (apps videos templates video-list) + #:use-module (apps videos utils) + #:use-module (haunt html) + #:use-module (haunt page) + #:use-module (haunt utils) + #:use-module (srfi srfi-1) + #:export (builder)) + + +;;; +;;; Application builder. +;;; + +(define (builder site posts) + "Return the list of web resources that compose the app. + + This procedure is a Haunt builder procedure. + + SITE () + A site object that defines all the properties of the website. See + Haunt objects for more information. + + POSTS (list of ) + A list of post objects that represent articles from the blog. See + Haunt objects for more information. + + RETURN (list of ) + A list of page objects that represent the web resources of the + application. See Haunt objects for more information." + (flatten + (list (video-list-builder) + (videos-builder)))) + +;;; +;;; Helper builders. +;;; + +(define (videos-builder) + "Return a list of Haunt pages representing videos." + (map-in-order + (lambda (playlist) + (map-in-order + (lambda (previous video next) + (make-page (video->url video) + (video-t previous video next) + sxml->html)) + (cons #f (drop-right playlist 1)) + playlist + (append (cdr playlist) '(#f)))) + playlists)) + +(define (video-list-builder) + "Return a Haunt page displaying all videos." + (make-page (url-path-join "videos" "index.html") + (video-list-t) + sxml->html)) diff --git a/website/apps/videos/data.scm b/website/apps/videos/data.scm new file mode 100644 index 0000000..db11c98 --- /dev/null +++ b/website/apps/videos/data.scm @@ -0,0 +1,46 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; Initially written by sirgazil who waves all +;;; copyright interest on this file. + +(define-module (apps videos data) + #:use-module (apps base utils) + #:use-module (apps videos types) + #:use-module (srfi srfi-19) + #:export (playlists)) + + +;;; +;;; Data. +;;; + + +(define playlists + ;; List of "playlists" of related videos in proper order. + (list + (list + (video + #:title "Installation from Script" + #:description + '(p "Explains how to install Guix on distributions not running +GNU Guix.") + #:url "https://archive.org/download/guix-videos/01-installation-fro= m-script.webm" + #:poster (guix-url "static/videos/img/installation-from-script.png"= ) + #:last-updated (string->date "2019-10-21T20:00:00" "~Y-~m-~dT~H:~M:= ~S"))) + (list + (video + #:title "Everyday use of GNU Guix, Part One" + #:description + '(p "Shows you how to install packages and how to manage software +package generations.") + #:url "https://archive.org/download/guix-videos/02-everyday-use-par= t-one.webm" + #:poster (guix-url "static/videos/img/everyday-use-01.png") + #:last-updated (string->date "2019-10-21T20:00:00" "~Y-~m-~dT~H:~M:= ~S")) + (video + #:title "Everyday use of GNU Guix, Part Two" + #:description + '(p "Shows you how to upgrade software and how to reclaim storage +space.") + #:url "https://archive.org/download/guix-videos/02-everyday-use-par= t-two.webm" + #:poster (guix-url "static/videos/img/everyday-use-02.png") + #:last-updated (string->date "2019-10-21T20:00:00" "~Y-~m-~dT~H:~M:= ~S"))))) diff --git a/website/apps/videos/templates/components.scm b/website/apps/= videos/templates/components.scm new file mode 100644 index 0000000..fc9f916 --- /dev/null +++ b/website/apps/videos/templates/components.scm @@ -0,0 +1,30 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 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)) + "")))) diff --git a/website/apps/videos/templates/video-list.scm b/website/apps/= videos/templates/video-list.scm new file mode 100644 index 0000000..7847225 --- /dev/null +++ b/website/apps/videos/templates/video-list.scm @@ -0,0 +1,46 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; Initially written by sirgazil who waves all +;;; copyright interest on this file. + +(define-module (apps videos templates video-list) + #: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 data) + #:use-module (apps videos templates components) + #:use-module (apps videos types) + #:use-module (apps videos utils) + #:export (video-list-t)) + + +(define (video-list-t) + "Return a list of videos in SHTML." + (theme + #:title '("Videos") + #: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/"))) + #:content + `(main + (@ (class "page centered-block limit-width")) + ,(map-in-order + (lambda (playlist) + `(,(map-in-order + (lambda (video) + `((h2 ,(link-yellow + #:label (video-title video) + #:url (guix-url (video->url video)))) + ,(video-content video))) + playlist) + ,(horizontal-separator))) + playlists)))) diff --git a/website/apps/videos/templates/video.scm b/website/apps/video= s/templates/video.scm new file mode 100644 index 0000000..1737178 --- /dev/null +++ b/website/apps/videos/templates/video.scm @@ -0,0 +1,50 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; 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 "=E2=86=90 Previous" + #:url (guix-url (video->url previous)))) + "") + ,(if next + `(div + ,(link-yellow + #:label "Next =E2=86=92" + #:url (guix-url (video->url next)))) + "")))) diff --git a/website/apps/videos/types.scm b/website/apps/videos/types.sc= m new file mode 100644 index 0000000..ababb44 --- /dev/null +++ b/website/apps/videos/types.scm @@ -0,0 +1,66 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; Initially written by sirgazil who waves all +;;; copyright interest on this file. + +(define-module (apps videos types) + #:use-module (srfi srfi-9) + #:export (video + video? + video-description + video-last-updated + video-poster + video-title + video-url)) + + +;;; +;;; Data types. +;;; + +;;; Video (record type) +;;; --------------------- +;;; +;;; A video object represents something viewable in an HTML video +;;; element and accessible from the videos list on the website. +;;; +;;; Objects of this type can be created with the "video" procedure as +;;; well (see Helper procedures below). +;;; +;;; Fields: +;;; +;;; title (string) +;;; The full name of the video. For example: +;;; "Everyday use of GNU Guix, Part One". +;;; +;;; description (SXML) +;;; A short description. For example: +;;; '(p "Shows you how to install packages and how to manage +;;; software package generations."). +;;; +;;; url (string) +;;; A URL to the video file. +;;; +;;; poster (string) +;;; A URL to a representative preview image for the video. +;;; +;;; last-updated (date) +;;; Optional SRFI-19 upload date of the video file's most recent +;;; version, or #f. This should be specified for videos that +;;; possibly become outdated over time such as documentation videos. +;;; +(define-record-type