Compare commits

..

2 Commits

4 changed files with 62 additions and 15 deletions

View File

@ -78,12 +78,7 @@
</abbr> </abbr>
} }
</p> </p>
<div class="post-tags">
@foreach (string tag in post.Tags)
{
<a asp-page="Index" asp-route-tag="@tag" class="badge bg-secondary">@tag</a>
}
</div>
<hr> <hr>
<article> <article>
@ -92,6 +87,18 @@
<hr> <hr>
<div class="d-flex align-items-center mb-3">
<i data-lucide="tag"></i>
<ul class="ms-2 post-tags">
@foreach (string tag in post.Tags)
{
<li class="post-tag">
<a asp-page="Index" asp-route-tag="@Html.UrlEncoder.Encode(tag)">@tag</a>
</li>
}
</ul>
</div>
<div class="row"> <div class="row">
<div class="col-sm-12 col-md-6"> <div class="col-sm-12 col-md-6">
@if (BlogPostService.GetPreviousPost(post) is { } previousPost) @if (BlogPostService.GetPreviousPost(post) is { } previousPost)

View File

@ -1,4 +1,5 @@
@using Humanizer @using Humanizer
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using OliverBooth.Common.Data.Blog @using OliverBooth.Common.Data.Blog
@using OliverBooth.Common.Services @using OliverBooth.Common.Services
@model IBlogPost @model IBlogPost
@ -49,8 +50,16 @@
<hr/> <hr/>
@foreach (string tag in Model.Tags) <div class="d-flex align-items-center">
{ <i data-lucide="tag"></i>
<a href="?tag=@Html.UrlEncoder.Encode(tag)" class="badge text-bg-dark">@tag</a> <ul class="ms-2 post-tags">
} @foreach (string tag in Model.Tags)
{
<li class="post-tag">
<a asp-page="Index" asp-route-tag="@Html.UrlEncoder.Encode(tag)">@tag</a>
</li>
}
</ul>
</div>
</div> </div>

View File

@ -453,7 +453,13 @@ td.trim-p p:last-child {
.mastodon-update-card.card { .mastodon-update-card.card {
background-color: desaturate(darken(#6364FF, 50%), 50%); background-color: desaturate(darken(#6364FF, 50%), 50%);
margin-bottom: 50px; margin-bottom: 20px;
border-radius: 3px;
border: none;
.card-body, .card-footer {
border: none;
}
p:last-child { p:last-child {
margin-bottom: 0; margin-bottom: 0;

View File

@ -18,7 +18,6 @@ div.blog-card {
} }
} }
ul.pagination { ul.pagination {
border: none; border: none;
@ -47,3 +46,29 @@ ul.pagination {
} }
} }
} }
ul.post-tags {
list-style: none;
margin: 0;
padding: 0;
li.post-tag {
display: inline-block;
margin: 0 5px;
a {
border-radius: 5px;
border: 1px solid #007ec6;
padding: 5px;
&:link, &:active, &:visited {
color: #007ec6;
}
&:hover {
border-color: #ffffff;
color: #ffffff;
}
}
}
}