Support embedded images/albums (closes #41)

This commit is contained in:
video-prize-ranch
2022-07-16 15:59:06 -04:00
parent 3f29e71876
commit 95eaf959b0
5 changed files with 140 additions and 17 deletions

View File

@@ -4,22 +4,45 @@
<head>
{{> partials/head }}
<link rel="stylesheet" href="/static/fonts/Material-Icons-Outlined.css" />
<link rel="stylesheet" href="/static/css/embed.css" />
</head>
<body>
<video loop poster="/{{id}}.webp" autoplay width="100%">
<source src="/{{id}}.webm" type="video/webm" />
<source src="/{{id}}.mp4" type="video/mp4" />
</video>
<div class="postLink">
<a href="/{{id}}">
<img src="/static/img/rimgo.svg" width="32px" height="32px" class="logo">
</a>
<a href="/{{id}}" class="rimgoLink">
rimgo
</a>
<a href="/{{id}}.mp4?download=1">download</a>
<div class="mediaWrapper">
<div class="media">
{{#each post.Media}}
{{#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}}
{{/each}}
</div>
</div>
<div class="postMeta">
<div class="postDetails">
{{#if post.TItle}}
<a href="/{{post.Id}}">
<h3>{{post.Title}}</h3>
</a>
{{/if}}
<div class="views">
<span class="material-icons-outlined" title="Views">visibility</span>
<p>{{post.Views}}</p>
</div>
</div>
<div class="logoContainer">
<a href="/{{post.Id}}">
<img src="/static/img/rimgo.svg" width="32px" height="32px" class="logo">
</a>
<a href="/{{post.Id}}">
rimgo
</a>
</div>
</div>
</body>