Fix embed styles in HTML

pull/853/head
Oleksii Holub 3 years ago
parent 2b6f01bf6f
commit cfbd267d3a

@ -233,7 +233,7 @@
@{/* Embed author */} @{/* Embed author */}
@if (embed.Author is not null) @if (embed.Author is not null)
{ {
<div class="chatlog__embed-author"> <div class="chatlog__embed-author-container">
@if (!string.IsNullOrWhiteSpace(embed.Author.IconUrl)) @if (!string.IsNullOrWhiteSpace(embed.Author.IconUrl))
{ {
<img class="chatlog__embed-author-icon" src="@await ResolveUrlAsync(embed.Author.IconProxyUrl ?? embed.Author.IconUrl)" alt="Author icon" loading="lazy" onerror="this.style.visibility='hidden'"> <img class="chatlog__embed-author-icon" src="@await ResolveUrlAsync(embed.Author.IconProxyUrl ?? embed.Author.IconUrl)" alt="Author icon" loading="lazy" onerror="this.style.visibility='hidden'">
@ -241,16 +241,16 @@
@if (!string.IsNullOrWhiteSpace(embed.Author.Name)) @if (!string.IsNullOrWhiteSpace(embed.Author.Name))
{ {
<span class="chatlog__embed-author"> if (!string.IsNullOrWhiteSpace(embed.Author.Url))
@if (!string.IsNullOrWhiteSpace(embed.Author.Url))
{ {
<a class="chatlog__embed-author-link" href="@embed.Author.Url">@embed.Author.Name</a> <a class="chatlog__embed-author-link" href="@embed.Author.Url">
<div class="chatlog__embed-author">@embed.Author.Name</div>
</a>
} }
else else
{ {
@embed.Author.Name <div class="chatlog__embed-author">@embed.Author.Name</div>
} }
</span>
} }
</div> </div>
} }
@ -301,7 +301,7 @@
@{/* Embed author */} @{/* Embed author */}
@if (embed.Author is not null) @if (embed.Author is not null)
{ {
<div class="chatlog__embed-author"> <div class="chatlog__embed-author-container">
@if (!string.IsNullOrWhiteSpace(embed.Author.IconUrl)) @if (!string.IsNullOrWhiteSpace(embed.Author.IconUrl))
{ {
<img class="chatlog__embed-author-icon" src="@await ResolveUrlAsync(embed.Author.IconProxyUrl ?? embed.Author.IconUrl)" alt="Author icon" loading="lazy" onerror="this.style.visibility='hidden'"> <img class="chatlog__embed-author-icon" src="@await ResolveUrlAsync(embed.Author.IconProxyUrl ?? embed.Author.IconUrl)" alt="Author icon" loading="lazy" onerror="this.style.visibility='hidden'">
@ -309,16 +309,16 @@
@if (!string.IsNullOrWhiteSpace(embed.Author.Name)) @if (!string.IsNullOrWhiteSpace(embed.Author.Name))
{ {
<span class="chatlog__embed-author"> if (!string.IsNullOrWhiteSpace(embed.Author.Url))
@if (!string.IsNullOrWhiteSpace(embed.Author.Url))
{ {
<a class="chatlog__embed-author-link" href="@embed.Author.Url">@embed.Author.Name</a> <a class="chatlog__embed-author-link" href="@embed.Author.Url">
<div class="chatlog__embed-author">@embed.Author.Name</div>
</a>
} }
else else
{ {
@embed.Author.Name <div class="chatlog__embed-author">@embed.Author.Name</div>
} }
</span>
} }
</div> </div>
} }

@ -415,7 +415,7 @@
flex: 1; flex: 1;
} }
.chatlog__embed-author { .chatlog__embed-author-container {
display: flex; display: flex;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
align-items: center; align-items: center;
@ -429,7 +429,7 @@
} }
.chatlog__embed-author { .chatlog__embed-author {
color: @Themed("#ffffff", "#4f545c") color: @Themed("#ffffff", "#4f545c");
font-size: 0.875rem; font-size: 0.875rem;
font-weight: 600; font-weight: 600;
direction: ltr; direction: ltr;

Loading…
Cancel
Save