Last active
December 16, 2015 04:48
-
-
Save robotlolita/5379617 to your computer and use it in GitHub Desktop.
Elegance. A pure, declarative language for writing documents (HTML/XML/etc.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses html; | |
uses prelude; | |
let style-sheets { |...xs| | |
map xs { |x| link href: x/url rel: x/kind type: "text/css" }; | |
}; | |
let search-panel { | |
uses jumper-skirt as jsk; | |
div#search-panel | |
jsk/search placeholder: "Search a project by name..."; | |
}; | |
let navigation { | |
div#header | |
search-panel | |
h1#logo > DONT PANIC | |
} | |
let contents { |xs| match xs | |
| Project x => x/name | |
| _ x => ":(" | |
} | |
let layout { |*k ...items| | |
html-5 | |
head | |
title > [[k/title]] - DONT PANIC | |
style-sheets resources/css | |
body.foo id: k/kind | |
navigation | |
contents k/items | |
footer > | |
Hacked together while drinking something *not entirely unlike* tea. | |
Don't forget your towel | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses html | |
uses prelude | |
let style-sheets = { |...xs| | |
<map xs>{ |x| <link href: x/url rel: x/kind type: "text/css" /> }</map> | |
} | |
let search-panel = { | |
uses jumper-skirt as jsk | |
<div#search-panel> | |
<jsk/search placeholder: "Search a project by name..." /> | |
</div#search-panel> | |
} | |
let navigation = { | |
<div#header> | |
<search-panel /> | |
<h1#logo>DONT PANIC</h1> | |
</div#header> | |
} | |
let contents = { | |
:| (Project x) => x/name | |
:| (_ x) => ":(" | |
} | |
let layout = { |*k ...items| | |
<html-5> | |
<head> | |
<title>k/title <text>- DONT PANIC</text></title> | |
<style-sheets resources/css /> | |
</head> | |
<body.foo id: k/kind> | |
<navigation /> | |
<contents items /> | |
<footer><markdown> | |
Hacked while drinking something *not entirely unlike* tea, by [Sorella][]. | |
Don't forget your towel. | |
</markdown></footer> | |
</body> | |
</html-5> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment