31 lines
824 B
Nix
31 lines
824 B
Nix
{nixite}: let
|
|
markup = {
|
|
"index.html" = nixite.md.mdToPage ../README.md;
|
|
"my-page" = with nixite.elems; let
|
|
blue = nixite.style.component span "blue" {
|
|
style = {color = "blue";};
|
|
};
|
|
underblue = nixite.style.component blue "under" {
|
|
style = {text-decoration = "underline";};
|
|
};
|
|
in (
|
|
nixite.html.document {
|
|
head = [(title "Nixite")];
|
|
body = main [
|
|
(a "/" "Readme")
|
|
(a "/blog" "blog")
|
|
(List {} ["item 1" "item 2" "item 3"])
|
|
(p [
|
|
"check out my"
|
|
(blue "blue span")
|
|
"isn't it"
|
|
(underblue {onclick = "alert(1)";} "great!")
|
|
])
|
|
];
|
|
}
|
|
);
|
|
blog = nixite.md.readDir ./blog;
|
|
};
|
|
in
|
|
nixite.site.prepare {favicon = ./src/favicon.png;} markup
|