Skip to content

Commit

Permalink
Add navigation snippet, non-default layout, subdir partial to examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffano committed Dec 9, 2011
1 parent 5a68408 commit 1a661a1
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
13 changes: 13 additions & 0 deletions examples/layouts/alternative.html
@@ -0,0 +1,13 @@
<html>
<head>
<title>{title()} w/ Alternative Layout</title>
<link rel="stylesheet" href="{relative('styles/global.css')}?{__genId}" type="text/css"/>
<script type="text/javascript" src="{relative('scripts/global.js')}?{__genId}"></script>
</head>
<body>
{include('header.html')}
{include('common/nav.html')}
{content}
{include('footer.html')}
</body>
</html>
5 changes: 3 additions & 2 deletions examples/layouts/default.html
@@ -1,12 +1,13 @@
<html>
<head>
<title>{title()}</title>
<title>{title()} w/ Default Layout</title>
<link rel="stylesheet" href="{relative('styles/global.css')}?{__genId}" type="text/css"/>
<script type="text/javascript" src="{relative('scripts/global.js')}?{__genId}"></script>
</head>
<body>
{include('header.html')}
{include('common/nav.html')}
{content}
{include('footer.html')}
</body>
</html>
</html>
3 changes: 3 additions & 0 deletions examples/pages/about/team.html
@@ -0,0 +1,3 @@
<div id="team">
Team Page
</div>
6 changes: 3 additions & 3 deletions examples/pages/index.html
@@ -1,3 +1,3 @@
<div id="content">
Home
</div>
<div id="home">
Home Page
</div>
5 changes: 3 additions & 2 deletions examples/params.js
@@ -1,9 +1,10 @@
exports.params = {
site: {
name: 'Example Inc.',
name: 'Examples',
url: 'http://localhost:3000'
},
sitemap: {
'index.html': { title: 'Home' }
'index.html': { title: 'Home Page' },
'about/team.html': { title: 'About - Team Page', layouts: 'alternative.html' }
}
};
7 changes: 7 additions & 0 deletions examples/partials/common/nav.html
@@ -0,0 +1,7 @@
<div id="nav">
<ul>
{foreach page in sitemap}
<li><a href="{relative(page.key)}">{page.value.title}</a></li>
{end}
</ul>
</div>

0 comments on commit 1a661a1

Please sign in to comment.