Crazy html is a language that transpiles to html
Create a file .chtml
and run racket <your-file.chtml>
.
#lang reader "reader.rkt"
-- output filename
filename: "page/hello-world.html"
-- file content
tag: html ->
properties: [{"lang", "en"}]
childrens:
tag: head ->
childrens:
tag: meta ->
properties: [{"charset", "UTF-8"}]
end
tag: title ->
childrens: "Hello World"
end
tag: style ->
childrens: "
.hello-world {
color: #3E5BA9;
}"
end
end
tag: body ->
childrens:
tag: div ->
childrens:
tag: h1 ->
properties: [{"class", "hello-world"}]
childrens: "Hello World!"
end
tag: ul ->
childrens:
tag: li ->
childrens: "Firt item"
end
tag: li ->
childrens: "Second item"
end
end
end
end
end