summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/guix-packages.js (renamed from js/guix-web.js)9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/guix-web.js b/js/guix-packages.js
index 8cdbd53..9c4c450 100644
--- a/js/guix-web.js
+++ b/js/guix-packages.js
@@ -40,6 +40,12 @@ guix.controller = function() {
};
guix.view = function(ctrl) {
+ function renderName(package) {
+ var name = package.name;
+
+ return m("a", { href: "/package/".concat(name) }, name);
+ }
+
function renderHomepage(package) {
if(package.homepage) {
return m("a", { href: package.homepage }, package.homepage);
@@ -65,7 +71,6 @@ guix.view = function(ctrl) {
}
return [
- m("h1", "GNU Guix"),
m("h2", [
"Packages",
m("span.badge", ctrl.packages().length)
@@ -94,7 +99,7 @@ guix.view = function(ctrl) {
m("tbody", [
ctrl.visiblePackages().map(function(package) {
return m("tr", [
- m("td", package.name),
+ m("td", renderName(package)),
m("td", package.version),
m("td", package.synopsis),
m("td", renderHomepage(package)),