mirror of
https://github.com/sergeyyarkov/node-docker-example.git
synced 2026-10-11 18:29:34 +03:00
49 lines
1.5 KiB
Handlebars
49 lines
1.5 KiB
Handlebars
<html lang='en'>
|
|
{{> head }}
|
|
<body>
|
|
<main class='app'>
|
|
<div class='app-heading'>
|
|
<h1>Articles ({{ articles.length }})</h1>
|
|
<span class="app-tag">{{title}}</span>
|
|
</div>
|
|
<div class='app-description'>
|
|
<p>This app showcases a website built with NodeJS. The site has a set of
|
|
articles, each article has a separate page, all data about the article
|
|
is stored in the PostgreSQL database. Docker is used to deploy the
|
|
application.</p>
|
|
</div>
|
|
|
|
<hr />
|
|
<div class="app-body">
|
|
<button onclick="location.href='/editor/create'" type="button">Write new</button>
|
|
{{#unless articles.length }}
|
|
<p style="text-align: center;margin: 30px 0;">
|
|
No articles found.
|
|
</p>
|
|
{{/unless}}
|
|
{{#each articles}}
|
|
<article>
|
|
<div class="article-heading">
|
|
<h2>
|
|
<a href='articles/{{ this.id }}'>
|
|
{{ this.title }}
|
|
</a>
|
|
</h2>
|
|
<form method='post' action='/articles/{{ this.id }}'>
|
|
<button type="submit">✕</button>
|
|
</form>
|
|
</div>
|
|
<div class="article-description">
|
|
<p>{{ this.description }}</p>
|
|
</div>
|
|
<div class="article-time">
|
|
<time>{{ this.created_at }}</time>
|
|
</div>
|
|
</article>
|
|
<hr />
|
|
{{/each}}
|
|
</div>
|
|
{{> footer }}
|
|
</main>
|
|
</body>
|
|
</html> |