forked from Fediversity/fediversity.eu
36 lines
885 B
Nix
36 lines
885 B
Nix
{ config, lib, ... }:
|
|
let
|
|
inherit (config) pages;
|
|
in
|
|
{
|
|
menus.main = {
|
|
label = "Main";
|
|
items = [
|
|
{
|
|
menu.label = "For you";
|
|
menu.items = map (page: { inherit page; })
|
|
(with pages; [ individuals developers european-commission ]);
|
|
}
|
|
{
|
|
menu.label = "Consortium";
|
|
menu.items = map (page: { inherit page; })
|
|
(with pages; [ nlnet oid tweag nordunet ]);
|
|
}
|
|
{ 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);
|
|
}
|
|
];
|
|
};
|
|
}
|