Skip to content

Commit 937ae67

Browse files
Merge pull request #76 from MestiriBaha/author-and-co-authors-to-be-clickable-links-leading-to-the-author's-page-on-Hashnode
feat(post-details): author and co-authors to be clickable links leading to the author's page on Hashnode
2 parents 48b714d + a865785 commit 937ae67

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

angular-primeng-app/src/app/components/post-details/post-details.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ <h1 class="title">{{ post.title }}</h1>
77
<div class="author-info">
88
@if (isTeam) {
99
<p-avatarGroup styleClass="mb-3" >
10+
<a href="https://hashnode.com/@{{post.author.username}}" target="_blank">
1011
<p-avatar [image]="post.author.profilePicture" size="large" shape="circle" title="{{ post.author.username}}"></p-avatar>
12+
</a>
1113
@for (coAuthor of post.coAuthors; track coAuthor.username) {
12-
<p-avatar [image]="coAuthor.profilePicture" size="large" shape="circle" title="{{ coAuthor.username}}"></p-avatar>
14+
<a href="https://hashnode.com/@{{coAuthor.username}}" target="_blank">
15+
<p-avatar [image]="coAuthor.profilePicture" size="large" shape="circle" title="{{coAuthor.username}}"></p-avatar>
16+
</a>
1317
}
1418
</p-avatarGroup>
1519
} @else {
20+
<a href="https://hashnode.com/@{{post.author.username}}" target="_blank">
1621
<p-avatar [image]="post.author.profilePicture" size="large" shape="circle" title="{{ post.author.username}}"></p-avatar>
22+
</a>
1723
}
1824
<div class="author-text">
1925
<span class="author-name">{{post.author.name}} {{isTeam && post.coAuthors.length > 0 ? 'with ' + post.coAuthors.length + ' co-author' + (post.coAuthors.length > 1 ? 's' : '') : ''}}</span>

0 commit comments

Comments
 (0)