oliverbooth.dev/OliverBooth/Pages/Blog/Index.cshtml

48 lines
1.3 KiB
Plaintext
Raw Normal View History

@page
@model Index
@{
ViewData["Title"] = "Blog";
}
<div id="all-blog-posts">
@await Html.PartialAsync("_LoadingSpinner")
</div>
<script id="blog-post-template" type="text/x-handlebars-template">
2023-09-23 22:09:26 +01:00
<div class="card-header">
<span class="text-muted">
<img class="blog-author-icon" src="{{author.avatar}}" alt="{{author.name}}">
<span>{{author.name}}<span>
<span> &bull; </span>
<abbr title="{{ post.formattedDate }}">{{ post.date_humanized }}</abbr>
{{#if post.enable_comments}}
<span> &bull; </span>
<a href="{{post.url}}#disqus_thread" data-disqus-identifier="{{post.disqus_identifier}}">
Loading comment count &hellip;
</a>
{{/if}}
2023-09-23 22:09:26 +01:00
</span>
</div>
<div class="card-body">
<h2>
<a href="{{post.url}}"> {{post.title}}</a>
</h2>
<p>{{{post.excerpt}}}</p>
{{#if post.trimmed}}
<p>
<a href="{{post.url}}">
Read more...
</a>
</p>
{{/if}}
</div>
2023-09-23 22:08:25 +01:00
<div class="card-footer">
{{#each post.tags}}
<a href="?tag={{urlEncode this}}" class="badge text-bg-dark">{{this}}</a>
2023-09-23 22:08:25 +01:00
{{/each}}
</div>
</script>