Skip to content

Commit

Permalink
Author image on home
Browse files Browse the repository at this point in the history
  • Loading branch information
alanta committed Nov 18, 2020
1 parent 5b9a19d commit 256eb23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions input/Shared/postbox.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@using MemoirsTheme.Helpers
@model Kentico.Kontent.Statiq.Memoirs.Models.Post
@{ var site = ViewData["SiteMetadata"] as SiteSettings;
Author author = null; // todo
Author author = Model.Author.OfType<Author>().FirstOrDefault();
}

<div class="blog-grid-item">
Expand Down Expand Up @@ -31,7 +31,7 @@
<span class="meta-footer-thumb">
@if (author?.AvatarImage != null)
{
@Html.Image(author.AvatarImage, author.Name, site.LazyImages, 580, 400, ImageFitMode.Crop, new { @class = "img-thumb" })
@Html.Image(author.AvatarImage, author.Name, site.LazyImages, 40, fit:ImageFitMode.Crop,htmlAttributes: new { @class = "author-thumb" })
}
else
{
Expand All @@ -40,7 +40,7 @@
</span>
<span class="author-meta">
@* TODO : author detail page*@
<span class="post-name"><a target="_blank" href="">@author.Name</a></span>
<span class="post-name"><a target="_blank" href="author/@author.System.Codename">@author.Name</a></span>
</span>}

<span class="post-date">@Model.PostDate?.ToString("dd MMMM yyyy")</span>
Expand Down

0 comments on commit 256eb23

Please sign in to comment.