Skip to content

Commit

Permalink
Merge pull request #38 from SwimResults/develop
Browse files Browse the repository at this point in the history
fix author names in blog
  • Loading branch information
konrad2002 authored Aug 5, 2024
2 parents 9ceafba + 3f36f93 commit 9bcd90d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/php/content/blog/article.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function printArticleForBlogList($post): void {
echo('<img class="post-image" src="'.getImgSrc($post).'" alt="post '.$post["title"].'">');
$author = BlogHelper::getAuthorInfo($post["author"]);
if ($author) {
echo('<h3 class="post-author">' . $author["name"]["formatted"] . '</h3>');
echo('<h3 class="post-author">' . $author["displayName"] . '</h3>');
}
echo('<h1 class="post-title"><a href="article/'.$post["id"].'-'.getArticleAlias($post["title"]).'">'.$post["title"].'</a></h1>');
echo('</div>');
Expand All @@ -83,10 +83,10 @@ function printArticleFullPage($post): void {
$author = BlogHelper::getAuthorInfo($post["author"]);
if ($author) {
echo('<div class="author">');
echo('<img src="'.$author["thumbnailUrl"].'" alt="author image for '.$author["name"]["formatted"].'" class="author-img">');
echo('<img src="'.$author["thumbnailUrl"].'" alt="author image for '.$author["displayName"].'" class="author-img">');
echo('<div class="post-info">');
echo('<span class="author-name">');
echo($author["name"]["formatted"]);
echo($author["displayName"]);
echo('</span><br>');
echo('<span class="post-date">');
echo('<span title="'.getDateTimeString(getPostPublishDate($post)).'">');
Expand Down Expand Up @@ -115,4 +115,4 @@ function printArticleFullPage($post): void {
echo('<p class="post-author-info">'.T::t("CONTENT.BLOG.WRITTEN_BY").': <b>'.$author["name"]["formatted"].'</b></p>');
echo('</div>');
echo('</div>');
}
}

0 comments on commit 9bcd90d

Please sign in to comment.