Last active
October 18, 2017 22:52
-
-
Save lepinekong/b267d7a3ce5b32f906858ff03fb3ee16 to your computer and use it in GitHub Desktop.
Html5 DSL
This file contains 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
Red[] | |
to-rebol-file: :to-red-file | |
print "get-vars loaded" | |
get-vars: func[source-file][ | |
vars: [] | |
html-template: read to-rebol-file source-file | |
rules: [any [thru "<%" copy var to "%>" (append vars var)]] | |
parse html-template rules | |
return vars | |
] | |
This file contains 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
<!DOCTYPE html> | |
<html lang="<%lang%>"> | |
<head> | |
<title><%title%></title> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<h1><%title%></h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
do %autoload.red
get-vars %bootstrap.r.tpl