Improved ArticleView layout
This commit is contained in:
parent
f2a5231c8d
commit
81e95042bd
|
@ -3,46 +3,45 @@
|
||||||
|
|
||||||
@inject IStringLocalizer<Pages.ArticleView> Localizer
|
@inject IStringLocalizer<Pages.ArticleView> Localizer
|
||||||
|
|
||||||
<h1 class="text-3xl lg:text-5xl font-light text-primary">
|
<article class="mb-6">
|
||||||
@Article.Title
|
<header class="bg-secondary text-secondary-content border-b-2 border-current mt-[-2rem] mx-[-3rem] py-6 px-12 mb-6">
|
||||||
</h1>
|
<h1 class="text-3xl lg:text-5xl font-light">
|
||||||
<p class="mb-6">
|
@Article.Title
|
||||||
<small class="text-sm text-secondary">
|
</h1>
|
||||||
<time datetime="@Article.PublishDate.ToString("u")"
|
<p>
|
||||||
title="@Article.PublishDate.ToString("g")">
|
<small class="text-sm">
|
||||||
@Article.PublishDate.Humanize()
|
<time datetime="@Article.PublishDate.ToString("u")"
|
||||||
</time>
|
title="@Article.PublishDate.ToString("g")">
|
||||||
@if (Article.LastModified is not null && Article.LastModified > Article.PublishDate) {
|
@Article.PublishDate.Humanize()
|
||||||
<time datetime="@Article.LastModified.Value.ToString("u")"
|
</time>
|
||||||
title="@Article.LastModified.Value.ToString("g")">
|
@if (Article.LastModified is not null && Article.LastModified > Article.PublishDate) {
|
||||||
 (@Localizer["ModifiedOn"] @Article.LastModified.Humanize())
|
<time datetime="@Article.LastModified.Value.ToString("u")"
|
||||||
</time>
|
title="@Article.LastModified.Value.ToString("g")">
|
||||||
}
|
 (@Localizer["ModifiedOn"] @Article.LastModified.Humanize())
|
||||||
@if (Article.Status < ArticleStatus.Published) {
|
</time>
|
||||||
<span class="badge badge-sm badge-outline badge-warning ml-2">
|
}
|
||||||
@Article.Status.Humanize()
|
@if (Article.Status < ArticleStatus.Published) {
|
||||||
</span>
|
<span class="badge badge-sm badge-outline badge-warning ml-2">
|
||||||
}
|
@Article.Status.Humanize()
|
||||||
</small>
|
</span>
|
||||||
</p>
|
}
|
||||||
|
</small>
|
||||||
<hr class="my-3" />
|
</p>
|
||||||
|
</header>
|
||||||
<article class="prose prose-neutral max-w-none mb-6">
|
<div class="prose prose-neutral max-w-none hyphens-auto text-justify">
|
||||||
@Content
|
@Content
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<hr class="my-3" />
|
|
||||||
|
|
||||||
@if (!string.IsNullOrWhiteSpace(Article.Author.AboutTheAuthor)) {
|
@if (!string.IsNullOrWhiteSpace(Article.Author.AboutTheAuthor)) {
|
||||||
<section class="mb-2">
|
<section class="mb-2">
|
||||||
<h2 class="text-2xl lg:text-4xl mb-3">About The Author</h2>
|
|
||||||
<div class="card sm:card-side card-compact bg-secondary text-secondary-content rounded shadow">
|
<div class="card sm:card-side card-compact bg-secondary text-secondary-content rounded shadow">
|
||||||
<figure class="sm:max-w-32">
|
<figure class="sm:max-w-40">
|
||||||
<img src="/api/user/pfp/@Article.Author.Id" alt="" width="800">
|
<img src="/api/user/pfp/@Article.Author.Id" alt="" width="800">
|
||||||
</figure>
|
</figure>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">@Article.Author.Name</h3>
|
<h2 class="card-title">About The Author</h2>
|
||||||
|
<h3><strong>@Article.Author.Name</strong></h3>
|
||||||
<p>
|
<p>
|
||||||
@Article.Author.AboutTheAuthor
|
@Article.Author.AboutTheAuthor
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -24,4 +24,7 @@ @layer base {
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
@apply font-heading;
|
@apply font-heading;
|
||||||
}
|
}
|
||||||
|
hyphens-auto {
|
||||||
|
hyphenate-limit-chars: 5 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
2
Wave/wwwroot/css/main.min.css
vendored
2
Wave/wwwroot/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue