mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-15 04:35:16 +00:00
Single-media posts that are neither albums nor galleries (closes #15)
This commit is contained in:
98
views/post.hbs
Normal file
98
views/post.hbs
Normal file
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>
|
||||
{{#if post.Title}}
|
||||
{{post.Title}} -
|
||||
{{/if}}
|
||||
rimgo
|
||||
</title>
|
||||
|
||||
{{> partials/head }}
|
||||
|
||||
<link rel="stylesheet" href="/static/fonts/Material-Icons-Outlined.css" />
|
||||
<link rel="stylesheet" href="/static/css/album.css" />
|
||||
<link rel="stylesheet" href="/static/css/comments.css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{> partials/header }}
|
||||
|
||||
<main>
|
||||
<h1>{{post.Title}}</h1>
|
||||
|
||||
<p>{{post.CreatedAt}}</p>
|
||||
|
||||
<div class="imageMeta__wrapper">
|
||||
{{#if post.User.Username}}
|
||||
<div class="user">
|
||||
<a href="/user/{{post.User.Username}}">
|
||||
<img src="{{post.User.Avatar}}" class="pfp" width="36" height="36" loading="lazy" />
|
||||
</a>
|
||||
<a href="/user/{{post.User.Username}}">
|
||||
<p>
|
||||
<b>{{post.User.Username}}</b>
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="imageMeta">
|
||||
<div class="imageMeta__item">
|
||||
<span class="material-icons-outlined" title="Views">visibility</span>
|
||||
<p>{{post.Views}}</p>
|
||||
</div>
|
||||
{{#if post.SharedWithCommunity}}
|
||||
<p><span class="material-icons-outlined" title="Likes">thumb_up</span> {{post.Upvotes}}</p>
|
||||
<p><span class="material-icons-outlined" title="Dislilkes">thumb_down</span> {{post.Downvotes}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
{{#each post.Media}}
|
||||
{{#if this.Title}}
|
||||
<h4>{{this.Title}}</h4>
|
||||
{{/if}}
|
||||
{{#if this.Description}}
|
||||
<p>{{this.Description}}</p><br>
|
||||
{{/if}}
|
||||
|
||||
<div class="center">
|
||||
{{#equal this.Type "image"}}
|
||||
<img src="{{this.Url}}" loading="lazy">
|
||||
{{/equal}}
|
||||
{{#equal this.Type "video"}}
|
||||
<video controls loop>
|
||||
<source type="{{this.MimeType}}" src="{{this.Url}}" />
|
||||
</video>
|
||||
{{/equal}}
|
||||
</div>
|
||||
|
||||
<br>
|
||||
{{/each}}
|
||||
|
||||
{{#if comments}}
|
||||
<div>
|
||||
<hr>
|
||||
<input id="comments__expandBtn" type="checkbox">
|
||||
<label class="comments__expandBtn__label" for="comments__expandBtn">
|
||||
<h3>Comments ({{post.Comments}})</h3>
|
||||
<span class="comments__expandBtn__icon material-icons-outlined"></span>
|
||||
</label>
|
||||
<div class="comments">
|
||||
{{#each comments}}
|
||||
{{> partials/comment }}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
{{/if}}
|
||||
</main>
|
||||
|
||||
{{> partials/footer }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user