rimgo/views/post.hbs

115 lines
2.7 KiB
Handlebars
Raw Normal View History

2022-01-17 20:23:04 +00:00
<!DOCTYPE html>
<html lang="en">
2022-01-17 20:48:24 +00:00
2022-01-17 20:23:04 +00:00
<head>
2022-02-02 15:48:25 +00:00
<title>
{{#if post.Title}}
{{post.Title}} -
2022-02-02 15:48:25 +00:00
{{/if}}
rimgo
</title>
2022-01-18 23:31:15 +00:00
2022-01-17 20:23:04 +00:00
{{> partials/head }}
2022-01-18 23:05:06 +00:00
2022-01-17 20:48:24 +00:00
<link rel="stylesheet" href="/static/css/album.css" />
2022-01-18 23:05:06 +00:00
<link rel="stylesheet" href="/static/css/comments.css" />
2022-01-17 20:23:04 +00:00
</head>
2022-01-17 20:48:24 +00:00
2022-01-17 20:23:04 +00:00
<body>
2022-01-17 20:48:24 +00:00
{{> partials/header }}
2022-08-05 00:14:17 +00:00
<header>
<h1>{{post.Title}}</h1>
<p>{{post.CreatedAt}}</p>
2022-08-05 00:14:17 +00:00
</header>
<main>
2022-01-17 22:11:33 +00:00
<div class="imageMeta__wrapper">
{{#if post.User.Username}}
2022-10-13 21:29:05 +00:00
<a href="/user/{{post.User.Username}}" class="user">
<img src="{{post.User.Avatar}}" class="pfp" width="36" height="36" />
<p>
<b>{{post.User.Username}}</b>
</p>
</a>
2022-02-02 15:46:47 +00:00
{{/if}}
2022-01-17 22:11:33 +00:00
<div class="imageMeta">
2022-01-18 00:21:43 +00:00
<div class="imageMeta__item">
2022-10-13 22:26:08 +00:00
<img class="icon" src="/static/icons/eye.svg" alt="Views">
<p>{{post.Views}}</p>
2022-01-18 00:21:43 +00:00
</div>
{{#if post.SharedWithCommunity}}
2022-10-13 22:26:08 +00:00
<div class="imageMeta__item">
<img class="icon" src="/static/icons/chevron-up.svg" alt="Likes">
<p>{{post.Upvotes}}</p>
</div>
<div class="imageMeta__item">
<img class="icon" src="/static/icons/chevron-down.svg" alt="Dislikes">
<p>{{post.Downvotes}}</p>
</div>
2022-01-26 21:28:03 +00:00
{{/if}}
2022-01-17 22:11:33 +00:00
</div>
</div>
2022-10-13 21:29:05 +00:00
<div class="post__media">
{{#each post.Media}}
{{#if this.Title}}
<h4>{{this.Title}}</h4>
{{/if}}
2022-01-18 00:25:49 +00:00
2022-01-18 21:45:57 +00:00
{{#equal this.Type "image"}}
2022-01-18 00:25:49 +00:00
<img src="{{this.Url}}" loading="lazy">
2022-01-18 21:45:57 +00:00
{{/equal}}
{{#equal this.Type "video"}}
<video controls loop>
<source type="{{this.MimeType}}" src="{{this.Url}}" />
</video>
{{/equal}}
2022-10-13 21:29:05 +00:00
{{#if this.Description}}
<p>{{{this.Description}}}</p>
{{/if}}
2022-01-17 20:48:24 +00:00
{{/each}}
2022-10-13 21:29:05 +00:00
</div>
2022-01-18 23:05:06 +00:00
2022-02-21 17:14:00 +00:00
{{#if post.tags}}
<div class="tags">
2022-07-22 16:20:51 +00:00
<style nonce="{{nonce}}">
{{#each post.tags}}
.{{this.BackgroundId}} { background-image: url('{{this.Background}}') }
{{/each}}
</style>
2022-02-21 17:14:00 +00:00
{{#each post.tags}}
<a href="/t/{{this.Tag}}">
2022-07-22 16:20:51 +00:00
<div class="tag {{this.BackgroundId}}">
2022-02-21 17:14:00 +00:00
<p class="tag__display">{{this.Display}}</p>
</div>
</a>
{{/each}}
</div>
{{/if}}
2022-08-05 00:14:17 +00:00
</main>
2022-02-21 17:14:00 +00:00
2022-08-05 00:14:17 +00:00
<section>
2022-01-24 01:59:29 +00:00
{{#if comments}}
2022-01-18 23:05:06 +00:00
<div>
<hr>
<input id="comments__expandBtn" type="checkbox">
<label class="comments__expandBtn__label" for="comments__expandBtn">
<h3>Comments ({{post.Comments}})</h3>
2022-10-13 22:26:08 +00:00
<span class="comments__expandBtn__icon"></span>
2022-01-18 23:05:06 +00:00
</label>
<div class="comments">
{{#each comments}}
{{> partials/comment }}
{{/each}}
</div>
</div>
2022-01-24 01:59:29 +00:00
{{/if}}
2022-08-05 00:14:17 +00:00
</section>
2022-01-17 22:11:33 +00:00
{{> partials/footer }}
2022-01-17 20:23:04 +00:00
</body>
2022-01-17 20:48:24 +00:00
2022-01-17 20:23:04 +00:00
</html>