A simple HTML file using JSON to create a list of links. This is useful to collect links for projects or the teams you are working in.
Have a look at this github page for a working example.
You define everything via JSON (or nix if you use the nix module).
{
"title": "title",
"text": "text",
"items": [
{
"label": "go to example.com",
"href": "https://example.com",
"image": "https://media.giphy.com/media/xrrvZiFNuK7Xa/giphy.gif"
},
{
"label": "go to other example.com",
"href": "https://other-example.com",
"image": "https://media.giphy.com/media/xrrvZiFNuK7Xa/giphy.gif"
}
]
}Just download the index.html from the docs folder.
Edit the script variable contentItmes and you voilà, you have you own landing page.
The nix-flake provides a package that can be used to generate a fully static html page.
services.nginx.virtualHosts."example.org" = {
locations."/" = {
root = pkgs.landingpage.override {
jsonConfig = [{
title = "title";
text = "text";
items = [
{
label = "go to example.com";
href = "https://example.com";
image = "https://media.giphy.com/media/xrrvZiFNuK7Xa/giphy.gif";
}
{
label = "go to example.com";
href = "https://example.com";
image = "https://media.giphy.com/media/xrrvZiFNuK7Xa/giphy.gif";
}
];
}];
};
};
};title: browser tab titlemax-width: width of the content blockbackground-color: background color of the whole pagetitle-color: color of the title blocktitle-background-color: background color of the title blocktext-color: text color of the text blocktext-background-color: background color of the text blockitem-color: text color of the itemsitem-background-color: background color of the itemsimage-width: width of the imagesimage-height: height of the imagesjsonConfig: the content defined under structure
