-
-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathIntroductionCard.razor
More file actions
29 lines (27 loc) · 1.13 KB
/
Copy pathIntroductionCard.razor
File metadata and controls
29 lines (27 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@using LinkDotNet.Blog.Domain
@using LinkDotNet.Blog.Web.Features.SupportMe.Components
@inject IOptions<Introduction> Introduction
@inject IOptions<Social> Social
@inject IOptions<SupportMeConfiguration> SupportConfiguration
<div style="@IntroductionStyle" class="@IntroductionClass">
<div class="introduction-container">
<div class="profile-picture" style="background-image: url('@Introduction.Value.ProfilePictureUrl');">
</div>
<div class="profile-text d-flex flex-column">
<div>@MarkdownConverter.ToMarkupString(Introduction.Value.Description)</div>
<SocialAccounts Social="@Social.Value"></SocialAccounts>
@if (SupportConfiguration.Value.ShowUnderIntroduction)
{
<DonationSection />
}
</div>
</div>
</div>
@code {
private string IntroductionClass => !string.IsNullOrEmpty(Introduction.Value.BackgroundUrl)
? "introduction-background"
: string.Empty;
private string IntroductionStyle => !string.IsNullOrEmpty(Introduction.Value.BackgroundUrl)
? $"background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url({Introduction.Value.BackgroundUrl})"
: string.Empty;
}