diff options
| author | sirgazil <sirgazil@zoho.com> | 2019-02-07 14:00:24 -0500 |
|---|---|---|
| committer | sirgazil <sirgazil@zoho.com> | 2019-02-07 14:00:24 -0500 |
| commit | 5023f63b98bc0ae90a8724605ffd9a00c5555975 (patch) | |
| tree | d033c72484e7e2581481265be228208d0e87c94f | |
| parent | website: Fix URL to Guix IRC logs. (diff) | |
| download | guix-artwork-5023f63b98bc0ae90a8724605ffd9a00c5555975.tar.gz | |
website: packages: package detail page: Add missing package information.
This commit adds license, package source, patches and builds
information to the end of package descriptions.
* website/apps/packages/templates/components.scm:
(location->shtml): New procedure.
(license->shtml): Export it.
(patches->shtml): Likewise.
(supported-systems->shtml): Likewise.
* website/apps/packages/templates/package.scm:
(package-t): Add missing package information.
| -rw-r--r-- | website/apps/packages/templates/components.scm | 16 | ||||
| -rw-r--r-- | website/apps/packages/templates/package.scm | 12 |
2 files changed, 23 insertions, 5 deletions
diff --git a/website/apps/packages/templates/components.scm b/website/apps/packages/templates/components.scm index 1e5e7cd..e4fff09 100644 --- a/website/apps/packages/templates/components.scm +++ b/website/apps/packages/templates/components.scm @@ -17,9 +17,13 @@ #:use-module (srfi srfi-1) #:export (detailed-package-preview issue-count->shtml + license->shtml lint-issue->shtml + location->shtml package-preview - sidebar)) + patches->shtml + sidebar + supported-systems->shtml)) ;;; @@ -128,6 +132,16 @@ (pre ,(lint-issue-description issue)))) +(define (location->shtml loc) + "Return an SHTML a element representing the given location LOC. + + LOC (<location>) + A location object as defined in the GNU Guix API reference." + (let ((ilink (location->ilink loc))) + (link-subtle #:label (ilink-name ilink) + #:url (ilink-url ilink)))) + + (define (package-preview package) "Return an SHTML a element representing the given PACKAGE object. diff --git a/website/apps/packages/templates/package.scm b/website/apps/packages/templates/package.scm index 8633c35..118b629 100644 --- a/website/apps/packages/templates/package.scm +++ b/website/apps/packages/templates/package.scm @@ -58,10 +58,14 @@ (li (b "Website: ") (a (@ (href ,(package-home-page package))) ,(package-home-page package))) - (li (b "License: ")) - (li (b "Build status: ")) - (li (b "Patches: ")) - (li (b "Package source code: "))) + (li (b "License: ") + ,(license->shtml (package-license package))) + (li (b "Package source: ") + ,(location->shtml (package-location package))) + (li (b "Patches: ") + ,(patches->shtml (package-patches package))) + (li (b "Builds: ") + ,(supported-systems->shtml package))) ;; Lint issues. ,(if (null? lint-issues) |
