Skip to content

Commit

Permalink
clean up display and uniformity of social icons
Browse files Browse the repository at this point in the history
  • Loading branch information
RaidMax committed Jul 6, 2022
1 parent 65175f7 commit 2fb3c34
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 17 deletions.
26 changes: 14 additions & 12 deletions WebfrontCore/Views/Shared/_LeftNavBar.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,20 @@
@foreach (var social in ViewBag.CommunityInformation?.SocialAccounts ?? Array.Empty<SocialAccountConfiguration>())
{
<a href="@social.Url" class="sidebar-link" target="_blank" title="@social.Title">
@if (!string.IsNullOrWhiteSpace(social.IconId))
{
<i class="oi @social.IconId mr-5"></i>
}
else if (!string.IsNullOrWhiteSpace(social.IconUrl))
{
var url = Uri.TryCreate(social.IconUrl, UriKind.Absolute, out Uri parsedUrl)
? parsedUrl.AbsoluteUri
: $"/images/community/{social.IconUrl}";
<img class="img-fluid social-icon" style="max-height: 1.2rem" src="@url" alt="@social.Title"/>
}
<span class="name text-truncate">@social.Title</span>
<div class="d-flex align-items-center">
@if (!string.IsNullOrWhiteSpace(social.IconId))
{
<i class="oi @social.IconId align-self-center"></i>
}
else if (!string.IsNullOrWhiteSpace(social.IconUrl))
{
var url = Uri.TryCreate(social.IconUrl, UriKind.Absolute, out Uri parsedUrl)
? parsedUrl.AbsoluteUri
: $"/images/community/{social.IconUrl}";
<img class="img-fluid social-icon align-self-center" src="@url" alt="@social.Title"/>
}
<div class="name text-truncate align-self-center">@social.Title</div>
</div>
</a>
}
<br/>
Expand Down
5 changes: 2 additions & 3 deletions WebfrontCore/wwwroot/css/src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,10 @@ table.with-auto-width td {
}

img.social-icon {
max-height: 1.75rem;
margin-right: 0.6rem;
margin-top: 3px;
height: 1.6rem;
}

.sidebar-link .oi, .sidebar-link img {
min-width: 1.2rem;
margin-right: 0.75rem;
}
65 changes: 64 additions & 1 deletion WebfrontCore/wwwroot/images/community/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion WebfrontCore/wwwroot/images/community/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2fb3c34

Please sign in to comment.