2012-08-22 21:27:22 -04:00
|
|
|
<head>
|
|
|
|
<title>The Grid</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2012-08-22 23:24:33 -04:00
|
|
|
{{> nav}}
|
|
|
|
{{> posts}}
|
|
|
|
{{> selected_post}}
|
|
|
|
</body>
|
|
|
|
|
|
|
|
<template name="nav">
|
2012-08-22 22:50:04 -04:00
|
|
|
<header class="header grid">
|
|
|
|
<h1 class="logo"><a href="/">The Grid</a></h1>
|
|
|
|
<ul class="nav site-nav">
|
2012-08-22 23:24:33 -04:00
|
|
|
<li><a href="#">Top</a></li>
|
|
|
|
<li><a href="#">New</a></li>
|
|
|
|
<li><a href="#">Ask</a></li>
|
|
|
|
<li><a href="#">Show</a></li>
|
|
|
|
<li><a href="#">Jobs</a></li>
|
2012-08-22 22:50:04 -04:00
|
|
|
</ul>
|
|
|
|
<ul class="nav user-nav">
|
|
|
|
<li>{{> loginButtons}}</li>
|
|
|
|
<li><a class="submit" href="/">Submit</a></li>
|
|
|
|
</ul>
|
|
|
|
</header>
|
2012-08-22 23:24:33 -04:00
|
|
|
</template>
|
2012-08-22 21:27:22 -04:00
|
|
|
|
|
|
|
<template name="posts">
|
2012-08-22 22:50:04 -04:00
|
|
|
{{#if show}}
|
|
|
|
<div class="posts grid">
|
2012-08-22 21:27:22 -04:00
|
|
|
{{#each posts}}
|
|
|
|
{{> post}}
|
|
|
|
{{/each}}
|
2012-08-22 22:50:04 -04:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</template>
|
|
|
|
|
2012-08-22 21:27:22 -04:00
|
|
|
<template name="post">
|
2012-08-22 22:50:04 -04:00
|
|
|
<div class="post">
|
|
|
|
<ul class="post-actions">
|
|
|
|
<li class="post-share"><a class="share-link icon-share">
|
|
|
|
<span class="action">Share</span>
|
|
|
|
</a></li>
|
|
|
|
<li class="post-discuss"><a class="discuss-link icon-comment">
|
|
|
|
<span class="count">{{comments}}</span>
|
|
|
|
<span class="action">Discuss</span>
|
|
|
|
</a></li>
|
|
|
|
<li class="post-upvote"><a class="upvote-link">
|
|
|
|
<span class="count">{{votes}}</span>
|
|
|
|
<span class="action">Upvote</span>
|
|
|
|
</a></li>
|
|
|
|
</ul>
|
|
|
|
<div class="post-content">
|
|
|
|
<span class="post-rank">1</span>
|
|
|
|
<h3 class="post-heading">
|
|
|
|
<a href="/" class="post-title">{{headline}}</a>
|
|
|
|
<span class="post-domain"></span>
|
|
|
|
</h3>
|
|
|
|
<p class="post-meta">By <a class="post-author">{{submitter}}</a> <span class="post-time">{{ago}}</span></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-08-22 21:27:22 -04:00
|
|
|
</template>
|
2012-08-22 23:24:33 -04:00
|
|
|
|
|
|
|
<template name="selected_post">
|
|
|
|
{{#if show}}
|
|
|
|
{{#with post}}
|
|
|
|
<div class="post grid">
|
|
|
|
{{> post}}
|
|
|
|
{{#if body}}
|
|
|
|
<div class="post-message">{{body}}</div>
|
|
|
|
{{/if}}
|
|
|
|
<div class="comment-new">
|
|
|
|
<div class="comment-field">
|
|
|
|
<textarea id="comment" rows="3" autofocus="autofocus"></textarea>
|
|
|
|
</div>
|
|
|
|
<div class="comment-submit">
|
|
|
|
<input type="submit" value="Add Comment" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{> comments}}
|
|
|
|
</div>
|
|
|
|
{{/with}}
|
|
|
|
{{/if}}
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template name="comments">
|
|
|
|
{{#if show}}
|
|
|
|
<ul>
|
|
|
|
{{#each comments}}
|
|
|
|
{{> comment}}
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
|
|
|
<p>No comments.</p>
|
|
|
|
{{/if}}
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template name="comment">
|
|
|
|
<li class="comment">
|
|
|
|
<div class="comment-content">
|
|
|
|
<div class="comment-actions">
|
|
|
|
<a class="upvote icon-up" href="/">upvote</a>
|
|
|
|
<a class="downvote icon-down" href="/">downvote</a>
|
|
|
|
</div>
|
|
|
|
<div class="comment-meta">
|
|
|
|
<a class="comment-username">{{submitter}}</a>
|
|
|
|
<span class="comment-time">{{ago}}</span>
|
|
|
|
<a class="comment-permalink icon-link">link</a>
|
|
|
|
</div>
|
|
|
|
<div class="comment-text">{{body}}</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</template>
|