155 lines
5.6 KiB
HTML
155 lines
5.6 KiB
HTML
{{define "head"}}
|
|
<title>{{.Title}} - ari melody 💫</title>
|
|
<link rel="shortcut icon" href="/img/favicon.png" type="image/x-icon">
|
|
|
|
<meta name="description" content="{{.Description}}">
|
|
|
|
<meta property="og:title" content="{{.Title}}">
|
|
<meta property="og:type" content="article">
|
|
<meta property="og:url" content="www.arimelody.me/blog/{{.Date.Year}}/{{.GetMonth}}/{{.TitleNormalised}}">
|
|
<meta property="og:image" content="https://www.arimelody.me/img/favicon.png">
|
|
<meta property="og:site_name" content="ari melody">
|
|
<meta property="og:description" content="{{.Description}}">
|
|
|
|
<link rel="stylesheet" href="/style/main.css">
|
|
<link rel="stylesheet" href="/style/index.css">
|
|
<link rel="stylesheet" href="/style/blog.css">
|
|
{{end}}
|
|
|
|
{{define "content"}}
|
|
<main>
|
|
<div id="blog-sidebar">
|
|
<ul>
|
|
<li>
|
|
<a href="#copy-link" id="blog-copy-link" title="copy link">
|
|
<div class="dark-only">
|
|
<img src="/img/blog/copy-link-dark.svg" alt="" width="36" height="36">
|
|
</div>
|
|
<div class="light-only">
|
|
<img src="/img/blog/copy-link-light.svg" alt="" width="36" height="36">
|
|
</div>
|
|
</a>
|
|
</li>
|
|
{{if ne .BlueskyURL ""}}
|
|
<li>
|
|
<a href="{{.BlueskyURL}}" id="blog-share-bsky" title="share on bluesky">
|
|
<div class="dark-only">
|
|
<img src="/img/blog/bluesky-dark.svg" alt="" width="36" height="36">
|
|
</div>
|
|
<div class="light-only">
|
|
<img src="/img/blog/bluesky-light.svg" alt="" width="36" height="36">
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{.BlueskyURL}}" id="blog-like" title="like this post">
|
|
<div class="dark-only">
|
|
<img src="/img/blog/like-dark.svg" alt="" width="36" height="36">
|
|
</div>
|
|
<div class="light-only">
|
|
<img src="/img/blog/like-light.svg" alt="" width="36" height="36">
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{.BlueskyURL}}" id="blog-boost" title="boost this post">
|
|
<div class="dark-only">
|
|
<img src="/img/blog/boost-dark.svg" alt="" width="36" height="36">
|
|
</div>
|
|
<div class="light-only">
|
|
<img src="/img/blog/boost-light.svg" alt="" width="36" height="36">
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="#comments" id="blog-comments" title="comments">
|
|
<div class="dark-only">
|
|
<img src="/img/blog/comment-dark.svg" alt="" width="36" height="36">
|
|
</div>
|
|
<div class="light-only">
|
|
<img src="/img/blog/comment-light.svg" alt="" width="36" height="36">
|
|
</div>
|
|
</a>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
</div>
|
|
<div id="blog-container">
|
|
<article class="blog">
|
|
<h1 class="typeout">{{.Title}}</h1>
|
|
<p class="blog-date">Posted by <a href="/blog/{{.AuthorID}}">{{.AuthorID}}</a> @ {{.PrintDate}}</p>
|
|
|
|
<hr>
|
|
{{.HTML}}
|
|
|
|
</article>
|
|
|
|
{{if ne .BlueskyURL ""}}
|
|
<hr>
|
|
|
|
<div id="interactions">
|
|
<span class="likes">❤️ {{.Likes}}</span>
|
|
<span class="reposts">🔁 {{.Reposts}}</span>
|
|
</div>
|
|
|
|
<p class="comment-callout">
|
|
join the conversation on
|
|
<a class="bluesky" href="{{.BlueskyURL}}" target="_blank">Bluesky 🦋</a>
|
|
<!-- TODO: mastodon support -->
|
|
<!--
|
|
and
|
|
<a class="mastodon" href="{{.MastodonURL}}" target="_blank">Mastodon 🐘</a>
|
|
-->
|
|
</p>
|
|
|
|
<div id="comments">
|
|
{{range .Comments}}
|
|
{{template "comment" .}}
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
<script type="module" src="/script/blog.js"></script>
|
|
</div>
|
|
</main>
|
|
{{end}}
|
|
|
|
{{define "comment"}}
|
|
<article class="comment">
|
|
<div class="comment-hover">
|
|
<div class="comment-header">
|
|
<a href="https://bsky.app/profile/{{.Post.Author.DID}}" target="_blank">
|
|
<img class="avatar" src="{{.Post.Author.Avatar}}" alt="{{.Post.Author.DisplayName}}'s avatar" width="32" height="32">
|
|
<span class="display-name">{{.Post.Author.DisplayName}}</span>
|
|
<span class="handle">@{{.Post.Author.Handle}}</span>
|
|
</a>
|
|
</div>
|
|
<a class="comment-body" href="{{.Post.BskyURL}}" target="_blank">
|
|
<div>
|
|
<p class="comment-text">{{.Post.Record.Text}}</p>
|
|
{{if .Post.HasImage}}
|
|
<p class="comment-images">
|
|
{{range .Post.Embed.Media.Images}}
|
|
<a href="{{.Fullsize}}" target="_blank">[image]</a>
|
|
{{end}}
|
|
</p>
|
|
{{end}}
|
|
</div>
|
|
<div class="comment-footer">
|
|
<span>{{.Post.LikeCount}} like{{if ne .Post.LikeCount 1}}s{{end}}</span>
|
|
•
|
|
<span>{{.Post.RepostCount}} repost{{if ne .Post.RepostCount 1}}s{{end}}</span>
|
|
•
|
|
<span class="comment-date">{{.Post.Record.CreatedAtPrint}}</span>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="comment-replies">
|
|
{{range .Replies}}
|
|
{{template "comment" .}}
|
|
{{end}}
|
|
</div>
|
|
</article>
|
|
{{end}}
|
|
|