-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from cferdinandi/ianroberts-domparser-template
Ianroberts domparser template
- Loading branch information
Showing
15 changed files
with
127 additions
and
58 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Fragments</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<style type="text/css"> | ||
body { | ||
margin: 0 auto; | ||
max-width: 40em; | ||
width: 88%; | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
margin-bottom: 1.5em; | ||
max-width: 100%; | ||
width: 100%; | ||
} | ||
|
||
th, | ||
td { | ||
text-align: left; | ||
padding: 0.5em; | ||
} | ||
|
||
th { | ||
border-bottom: 0.125em solid #e5e5e5; | ||
font-weight: bold; | ||
vertical-align: bottom; | ||
} | ||
|
||
td { | ||
border-top: 1px solid #e5e5e5; | ||
vertical-align: top; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Number</th> | ||
<th>Wizard</th> | ||
</tr> | ||
</thead> | ||
<tbody id="app"></tbody> | ||
</table> | ||
|
||
<script src="../dist/reef.js"></script> | ||
<script> | ||
let {render} = reef; | ||
|
||
let wizards = ['Gandalf', 'Ursula', 'Merlin']; | ||
|
||
function template () { | ||
return wizards.map(function (wizard, index) { | ||
return ` | ||
<tr> | ||
<td>${index + 1}</td> | ||
<td>${wizard}</td> | ||
</tr>`; | ||
}).join(''); | ||
} | ||
|
||
reef.component('#app', template); | ||
</script> | ||
|
||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.