forked from Fediversity/Fediversity
refactor start page for readability
This commit is contained in:
parent
18b03924ad
commit
ecb9996718
|
@ -27,23 +27,8 @@ in
|
||||||
{ href = "${link cfg.assets."index.css"}"; }
|
{ href = "${link cfg.assets."index.css"}"; }
|
||||||
];
|
];
|
||||||
body.content =
|
body.content =
|
||||||
let
|
|
||||||
prev-content = prev.html.body.content;
|
|
||||||
to-section = { heading, body, attrs ? { } }: {
|
|
||||||
section = {
|
|
||||||
heading.content = heading;
|
|
||||||
inherit attrs;
|
|
||||||
content = [
|
|
||||||
(cfg.templates.html.markdown {
|
|
||||||
name = "${config.name}-${lib.slug heading}";
|
|
||||||
inherit body;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
[
|
[
|
||||||
(lib.head prev-content) # header
|
(lib.head prev.html.body.content)
|
||||||
{
|
{
|
||||||
section = {
|
section = {
|
||||||
attrs = { };
|
attrs = { };
|
||||||
|
@ -52,42 +37,58 @@ in
|
||||||
(cfg.templates.html.markdown { inherit (config) name body; })
|
(cfg.templates.html.markdown { inherit (config) name body; })
|
||||||
]
|
]
|
||||||
++
|
++
|
||||||
(map to-section [
|
(
|
||||||
{
|
let
|
||||||
heading = "Fediversity grants";
|
to-section = { heading, body, attrs ? { } }: {
|
||||||
body = ''
|
section = {
|
||||||
${pages.grants.summary}
|
heading.content = heading;
|
||||||
|
inherit attrs;
|
||||||
|
content = [
|
||||||
|
(cfg.templates.html.markdown {
|
||||||
|
name = "${config.name}-${lib.slug heading}";
|
||||||
|
inherit body;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
map to-section [
|
||||||
|
{
|
||||||
|
heading = "Fediversity grants";
|
||||||
|
body = ''
|
||||||
|
${pages.grants.summary}
|
||||||
|
|
||||||
[Learn more about Fediversity grants](${link pages.grants})
|
[Learn more about Fediversity grants](${link pages.grants})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
heading = "Consortium";
|
heading = "Consortium";
|
||||||
body = ''
|
body = ''
|
||||||
The Consortium behind the Fediversity project is a cooperation between NLnet, Open Internet Discourse Foundation, NORDUnet and Tweag.
|
The Consortium behind the Fediversity project is a cooperation between NLnet, Open Internet Discourse Foundation, NORDUnet and Tweag.
|
||||||
|
|
||||||
${toString (map (partner: ''
|
${toString (map (partner: ''
|
||||||
### ${partner.title}
|
### ${partner.title}
|
||||||
|
|
||||||
${partner.summary}
|
${partner.summary}
|
||||||
|
|
||||||
[Read more about ${partner.title}](${link partner})
|
[Read more about ${partner.title}](${link partner})
|
||||||
'') (with pages; [ nlnet oid tweag nordunet ]))}
|
'') (with pages; [ nlnet oid tweag nordunet ]))}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
heading = "Fediverse explained";
|
heading = "Fediverse explained";
|
||||||
body = ''
|
body = ''
|
||||||
${toString (map (role: ''
|
${toString (map (role: ''
|
||||||
### ${role.title}
|
### ${role.title}
|
||||||
|
|
||||||
${role.summary}
|
${role.summary}
|
||||||
|
|
||||||
[Read more about ${role.title}](${link role})
|
[Read more about ${role.title}](${link role})
|
||||||
'') (with pages; [ individuals developers european-commission ]))}
|
'') (with pages; [ individuals developers european-commission ]))}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -505,7 +505,6 @@ let
|
||||||
else baseType.merge loc (map (p: p.def // { value = p.processed; }) processed);
|
else baseType.merge loc (map (p: p.def // { value = p.processed; }) processed);
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# HACK: bail out for now
|
|
||||||
with-section-constraints
|
with-section-constraints
|
||||||
# TODO: find a reasonable cut-off for where to place raw content
|
# TODO: find a reasonable cut-off for where to place raw content
|
||||||
(listOf (either str (attrTag categories.flow)));
|
(listOf (either str (attrTag categories.flow)));
|
||||||
|
|
Loading…
Reference in a new issue