Skip to content

Commit

Permalink
proper temptlating using mustache
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Jan 22, 2015
1 parent 2e20e8a commit 81ef399
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 51 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"cheerio": "^0.17.0",
"chokidar": "^0.12.6",
"clean-css": "^2.2.14",
"mustache": "^1.0.0",
"uglify-js": "^2.4.16"
},
"devDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions source/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<footer>
<span class="right"><a href="http://github.com/davidmerfield/Public-Icons">View the project <em>on Github</em></a></span>
<a href="http://twitter.com/davidmerfieId">By <em>David Merfield</em></a>.
<a href="/license">The entire project is in <em>the public domain</em></a>.
<a href="http://www.google.com/fonts/specimen/Source+Sans+Pro">Set in <em>Source Sans Pro</em> by Adobe</a>.
</footer>
<script src="/app.js"></script>
8 changes: 8 additions & 0 deletions source/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<head>
<meta charset="utf-8">
<title>Public Icons - Free icons in the public domain</title>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/icons.css">
<link rel="icon" type="image/png" href="/favicon.png" />
</head>
8 changes: 8 additions & 0 deletions source/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<header>
<h1>Public Icons <span>A collection of free icons in the public domain</span></h1>
<nav>
<!-- <a href="http://github.com/davidmerfield/Public-Icons">Contribute to this project</a>
--> <a href="mailto:dmerfield@gmail.com">Contact</a>
</nav>
<span class="clear"></span>
</header>
33 changes: 6 additions & 27 deletions source/icon.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Public Icons - Free icons in the public domain</title>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/icons.css">
<link rel="icon" type="image/png" href="/favicon.png" />
</head>
{{> head}}
<body>
<header>
<h1>Public Icons <span>A collection of free icons in the public domain</span></h1>
<nav>
<!-- <a href="http://github.com/davidmerfield/Public-Icons">Contribute to this project</a>
--> <a href="mailto:dmerfield@gmail.com">Contact</a>
</nav>
<span class="clear"></span>
</header>
</section>
{{> header}}
<section>
<a href="/">&larr; Back to homepage</a>
</section>
<section class="iconContainer">
<h1></h1>
<a href="" download>Download this icon</a><br />
<span class="icon"></span>
<h1>{{title}}</h1>
<a href="{{location}}" download>Download this icon</a><br />
<span class="icon">{{{svgString}}}</span>
</section>
<footer>
<span class="right"><a href="http://github.com/davidmerfield/Public-Icons">View the project <em>on Github</em></a></span>
<a href="http://twitter.com/davidmerfieId">By <em>David Merfield</em></a>.
<a href="/license">The entire project is in <em>the public domain</em></a>.
<a href="http://www.google.com/fonts/specimen/Source+Sans+Pro">Set in <em>Source Sans Pro</em> by Adobe</a>.
</footer>
<script src="/app.js"></script>
{{> footer}}
</body>
</html>
33 changes: 9 additions & 24 deletions source/index.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Public Icons - Free icons in the public domain</title>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/icons.css">
<link rel="icon" type="image/png" href="/favicon.png" />
</head>
{{> head}}
<body>
<header>
<h1>Public Icons <span>A collection of free icons in the public domain</span></h1>
<nav>
<!-- <a href="http://github.com/davidmerfield/Public-Icons">Contribute to this project</a>
--> <a href="mailto:dmerfield@gmail.com">Contact</a>
</nav>
<span class="clear"></span>
</header>
{{> header}}
<section>
<input id="search" name="search" type="text" placeholder="Search all icons" /><br />
</section>
<section id="searchResults" style="display: none">

</section>
<section id="allIcons">

{{#icons}}
<a href="/icon/{{slug}}" data-index="{{index}}" data-tags="{{tags}}" title="{{title}}">
<span class="icon">{{{svgString}}}</span>
<span class="label">{{title}}</span>
</a>
{{/icons}}
</section>
<footer>
<span class="right"><a href="http://github.com/davidmerfield/Public-Icons">View the project <em>on Github</em></a></span>
<a href="http://twitter.com/davidmerfieId">By <em>David Merfield</em></a>.
<a href="/license">The entire project is in <em>the public domain</em></a>.
<a href="http://www.google.com/fonts/specimen/Source+Sans+Pro">Set in <em>Source Sans Pro</em> by Adobe</a>.
</footer>
<script src="/app.js"></script>
{{> footer}}
</body>
</html>

0 comments on commit 81ef399

Please sign in to comment.