homepage: Allow an URL for categories

This commit is contained in:
Geoffrey Frogeye 2025-02-02 23:22:18 +01:00
parent 7ca1e0576b
commit 49b8dd0b5e
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
3 changed files with 11 additions and 7 deletions

View file

@ -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;
}

View file

@ -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}}">

View file

@ -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
)
);
};
};
}