From 49b8dd0b5e6cf1bcfa12884f84c91c0900711ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= <geoffrey@frogeye.fr> Date: Sun, 2 Feb 2025 23:22:18 +0100 Subject: [PATCH] homepage: Allow an URL for categories --- hm/desktop/browser/homepage.css | 9 +++++---- hm/desktop/browser/homepage.html.mustache | 4 ++-- hm/desktop/browser/homepage.nix | 5 ++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hm/desktop/browser/homepage.css b/hm/desktop/browser/homepage.css index 88e209a..2ed0e5e 100644 --- a/hm/desktop/browser/homepage.css +++ b/hm/desktop/browser/homepage.css @@ -5,7 +5,7 @@ html { body { font: 20px Helvetica, sans-serif; - padding: 5% 0; + padding: 2.5% 0; } @@ -18,7 +18,7 @@ h1, h2 { display: none; } -nav div, nav a { +nav a { background: rgba(255, 255, 255, 0.8); width: 110px; height: 100px; @@ -39,13 +39,13 @@ nav div, nav a { position: relative; } - nav div { + nav .main { position: absolute; left: -130px; } } -nav div img { +nav img { margin: auto; max-width: 90%; max-height: 70%; @@ -81,5 +81,6 @@ nav a span { display: block; margin-top: .55em; font-weight: 400; + line-height: 1.1; } diff --git a/hm/desktop/browser/homepage.html.mustache b/hm/desktop/browser/homepage.html.mustache index cf875c2..ce15fc1 100644 --- a/hm/desktop/browser/homepage.html.mustache +++ b/hm/desktop/browser/homepage.html.mustache @@ -14,9 +14,9 @@ <h2>{{title}}</h2> <nav style="color: {{color}};"> {{#image}} - <div> + <a href="{{url}}" class="main"> <img alt="Logo for {{title}}" src="{{image}}" /> - </div> + </a> {{/image}} {{#links}} <a href="{{url}}"> diff --git a/hm/desktop/browser/homepage.nix b/hm/desktop/browser/homepage.nix index c72c731..61c2dd3 100644 --- a/hm/desktop/browser/homepage.nix +++ b/hm/desktop/browser/homepage.nix @@ -73,6 +73,10 @@ in type = lib.types.nullOr lib.types.path; default = null; }; + url = lib.mkOption { + type = lib.types.str; + default = "about:blank"; + }; links = lib.mkOption { default = [ ]; type = lib.types.listOf ( @@ -102,6 +106,5 @@ in ) ); }; - }; }