update tix and add html document
This commit is contained in:
parent
baa5b6854e
commit
93799cac12
9 changed files with 759 additions and 699 deletions
|
@ -64,15 +64,24 @@ in rec {
|
|||
|| builtins.isList tag
|
||||
|| (tag ? __toString && builtins.isFunction tag.__toString));
|
||||
|
||||
addToHead = page: heads:
|
||||
page
|
||||
addToHead = doc: heads:
|
||||
doc
|
||||
// {
|
||||
child =
|
||||
map
|
||||
(e:
|
||||
if e.tag == "head"
|
||||
then e // {child = e.child ++ heads;}
|
||||
else e)
|
||||
page.child;
|
||||
head = doc.head ++ heads;
|
||||
};
|
||||
|
||||
document = {
|
||||
head ? [],
|
||||
body ? [],
|
||||
attrs ? {},
|
||||
}: {
|
||||
inherit head body attrs;
|
||||
__toString = self: ''
|
||||
<!DOCTYPE html>
|
||||
${(tag "html" [
|
||||
(tag "head" self.head)
|
||||
(tag "body" self.body)
|
||||
])}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue