This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity.eu/content/navigation.nix

36 lines
885 B
Nix
Raw Normal View History

{ config, lib, ... }:
2024-11-13 15:24:41 +01:00
let
inherit (config) pages;
in
{
menus.main = {
label = "Main";
items = [
2024-11-13 15:24:41 +01:00
{
menu.label = "For you";
menu.items = map (page: { inherit page; })
(with pages; [ individuals developers european-commission ]);
}
2024-11-13 15:24:41 +01:00
{
menu.label = "Consortium";
2024-11-13 15:24:41 +01:00
menu.items = map (page: { inherit page; })
(with pages; [ nlnet oid tweag nordunet ]);
2024-11-13 15:24:41 +01:00
}
2024-11-13 15:24:41 +01:00
{ page = pages.fediversity; }
{ page = pages.grants; }
{
menu.label = "News";
menu.items =
let
sorted = with lib; reverseList (sortOn (entry: entry.date) config.collections.news.entry);
in
map
(page: {
page = lib.recursiveUpdate page { title = "${page.date}: ${page.title}"; };
})
(lib.take 3 sorted);
}
2024-11-13 15:24:41 +01:00
];
};
}