nixite/testing/my-site.nix

41 lines
973 B
Nix
Raw Normal View History

2024-01-04 22:37:43 +00:00
{nixite}:
with nixite.elems; let
blue = nixite.style.component span "blue" {
style = {
color = "blue";
__mediaQueries = {
"(max-width: 500px)" = {
color = "green";
};
};
2024-01-04 22:37:43 +00:00
};
};
underblue = nixite.style.component blue "under" {
style = {text-decoration = "underline";};
};
readme = nixite.site.link {
content = nixite.md.mdToPage ../README.md;
name = "readme";
};
markup = {
"index.html" = (
nixite.html.document {
head = [(title "Nixite")];
body = main [
2024-01-04 22:37:43 +00:00
(a {href = readme;} "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