Created
March 16, 2018 21:19
-
-
Save otherjoel/cde1aef9b582392efcdb12d74d65bf7c to your computer and use it in GitHub Desktop.
Minimal Pollen project demonstrating use of `in`
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
#lang pollen | |
◊define-meta[title]{Chapter I} | |
Travellers left and entered our car at every stopping of the train. Three persons, however, remained, bound, like myself, for the farthest station... |
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
#lang pollen | |
◊define-meta[title]{Chapter II} | |
Scarcely had the old man gone when a general conversation began... |
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
#lang pollen | |
◊define-meta[title]{Chapter III} | |
The lawyer and the lady whispered together. I was sitting beside Posdnicheff, and I maintained silence... |
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
#lang pollen | |
◊define-meta[title]{The Kreutzer Sonata} | |
◊define-meta[template]{template-index.html} | |
"The weaker my hand, the greater the need that my model should be perfect." | |
—Leo Tolstoi |
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
#lang pollen/ptree | |
◊index.html{ | |
chapter1.html | |
chapter2.html | |
chapter3.html | |
} |
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
#lang racket | |
(provide (all-defined-out) | |
in) ; from web-server/templates | |
(require web-server/templates | |
pollen/decode) | |
(define (root . xs) | |
`(root ,@(decode-paragraphs xs))) |
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
<html> | |
<head><title>My Book</title></head> | |
<body> | |
<h1>◊(select-from-metas 'title here)</h1> | |
◊(->html (decode-paragraphs (select-from-doc 'root here))) | |
<ul> | |
◊in[c (children here)]{ | |
<li><a href="/◊c">◊(select-from-metas 'title c)</a></li> | |
} | |
</ul> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment