forked from Fediversity/Fediversity
refactor start page for readability
This commit is contained in:
parent
18b03924ad
commit
ecb9996718
|
@ -27,8 +27,18 @@ in
|
||||||
{ href = "${link cfg.assets."index.css"}"; }
|
{ href = "${link cfg.assets."index.css"}"; }
|
||||||
];
|
];
|
||||||
body.content =
|
body.content =
|
||||||
|
[
|
||||||
|
(lib.head prev.html.body.content)
|
||||||
|
{
|
||||||
|
section = {
|
||||||
|
attrs = { };
|
||||||
|
heading.content = config.title;
|
||||||
|
content = [
|
||||||
|
(cfg.templates.html.markdown { inherit (config) name body; })
|
||||||
|
]
|
||||||
|
++
|
||||||
|
(
|
||||||
let
|
let
|
||||||
prev-content = prev.html.body.content;
|
|
||||||
to-section = { heading, body, attrs ? { } }: {
|
to-section = { heading, body, attrs ? { } }: {
|
||||||
section = {
|
section = {
|
||||||
heading.content = heading;
|
heading.content = heading;
|
||||||
|
@ -42,17 +52,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
[
|
map to-section [
|
||||||
(lib.head prev-content) # header
|
|
||||||
{
|
|
||||||
section = {
|
|
||||||
attrs = { };
|
|
||||||
heading.content = config.title;
|
|
||||||
content = [
|
|
||||||
(cfg.templates.html.markdown { inherit (config) name body; })
|
|
||||||
]
|
|
||||||
++
|
|
||||||
(map to-section [
|
|
||||||
{
|
{
|
||||||
heading = "Fediversity grants";
|
heading = "Fediversity grants";
|
||||||
body = ''
|
body = ''
|
||||||
|
@ -87,7 +87,8 @@ in
|
||||||
'') (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