fix site.getStyles
This commit is contained in:
parent
28f8cfe612
commit
4f5bedbc45
6 changed files with 41 additions and 37 deletions
|
@ -1,7 +1,6 @@
|
|||
{nixite}: let
|
||||
markup = {
|
||||
"index.html" = nixite.md.mdToPage ../README.md;
|
||||
"my-page" = with nixite.elems; let
|
||||
"index.html" = with nixite.elems; let
|
||||
blue = nixite.style.component span "blue" {
|
||||
style = {color = "blue";};
|
||||
};
|
||||
|
|
|
@ -87,24 +87,27 @@ in
|
|||
]
|
||||
)
|
||||
(
|
||||
describe "getStyles" [
|
||||
(it "gets all styles" {
|
||||
expected = {
|
||||
"p" = {};
|
||||
"div" = {};
|
||||
"p.class" = {color = "blue";};
|
||||
"div.class2" = {color = "green";};
|
||||
describe "getStyles" (let
|
||||
p = style.component elems.p "class" {style = {color = "blue";};};
|
||||
g = style.component elems.div "class2" {style = {color = "green";};};
|
||||
my-site = {
|
||||
"index.html" = html.document {
|
||||
body = p "";
|
||||
};
|
||||
actual = getStyles (let
|
||||
p = style.component elems.p "class" {style = {color = "blue";};};
|
||||
g = style.component elems.div "class2" {style = {color = "green";};};
|
||||
in {
|
||||
"index.html" = p "";
|
||||
blog = {"index.html" = g "";};
|
||||
});
|
||||
removeDunders = true;
|
||||
blog = {
|
||||
"index.html" = html.document {
|
||||
body = g "";
|
||||
};
|
||||
};
|
||||
};
|
||||
in [
|
||||
(it "gets all styles" {
|
||||
expected =
|
||||
(style.getStyles my-site."index.html".body)
|
||||
// (style.getStyles my-site.blog."index.html".body);
|
||||
actual = getStyles my-site;
|
||||
})
|
||||
]
|
||||
])
|
||||
)
|
||||
(
|
||||
describe "getPaths" [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue