clean up display and uniformity of social icons

This commit is contained in:
RaidMax 2022-07-06 09:49:44 -05:00
parent 7a022a1973
commit 57484690b6
4 changed files with 95 additions and 17 deletions

View File

@ -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">
<div class="d-flex align-items-center">
@if (!string.IsNullOrWhiteSpace(social.IconId))
{
<i class="oi @social.IconId mr-5"></i>
<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" style="max-height: 1.2rem" src="@url" alt="@social.Title"/>
<img class="img-fluid social-icon align-self-center" src="@url" alt="@social.Title"/>
}
<span class="name text-truncate">@social.Title</span>
<div class="name text-truncate align-self-center">@social.Title</div>
</div>
</a>
}
<br/>

View File

@ -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;
}

View File

@ -1 +1,64 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><defs><style>.a{fill:#dadada;}</style></defs><title>discord-icon</title><path class="a" d="M184.74,204.24s-7.43-8.76-13.55-16.69c26.93-7.6,37.18-24.45,37.18-24.45a110.2,110.2,0,0,1-23.63,12.06A127.88,127.88,0,0,1,155,183.92a146.82,146.82,0,0,1-53.19-.17A191.59,191.59,0,0,1,71.58,175a119.6,119.6,0,0,1-15-6.94c-.66-.33-1.15-.66-1.82-1a1.64,1.64,0,0,1-.82-.66c-3.64-2-5.78-3.47-5.78-3.47s9.91,16.35,36,24.28c-6.11,7.77-13.71,17-13.71,17C25,202.75,7.81,173,7.81,173c0-66.08,29.57-119.77,29.57-119.77C67,31.27,95,31.76,95,31.76l2,2.48C60,45,43,61.17,43,61.17s4.47-2.48,12.06-6c22-9.58,39.49-12.39,46.59-12.88a24.1,24.1,0,0,1,3.47-.33,172.18,172.18,0,0,1,41.47-.33,167.5,167.5,0,0,1,61.79,19.65S192.18,46,157.15,35.23l2.81-3.3s28.09-.66,57.66,21.64c0,0,29.57,53.53,29.57,119.77C247.52,173,230.17,202.92,184.74,204.24ZM89.25,108.42c-11.73,0-21,10.24-21,22.8s9.42,22.8,21,22.8c11.73,0,21-10.25,21-22.8C110.4,118.66,101,108.42,89.25,108.42Zm75,0c-11.73,0-21,10.24-21,22.8s9.42,22.8,21,22.8c11.73,0,21-10.25,21-22.8C185.07,118.66,176,108.42,164.26,108.42Z"/></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="352"
height="352"
viewBox="0 0 352 352"
overflow="hidden"
version="1.1"
id="svg13"
sodipodi:docname="Discord_Canary_2021.svg"
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)">
<metadata
id="metadata17">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1001"
id="namedview15"
showgrid="false"
inkscape:zoom="1.0665722"
inkscape:cx="53.327387"
inkscape:cy="169.20483"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="g11" />
<g
id="g11">
<path
d="M 0,176 C 0,78.798 78.798,0 176,0 273.202,0 352,78.798 352,176 352,273.202 273.202,352 176,352 78.798,352 0,273.202 0,176 Z"
fill-rule="evenodd"
id="path7"
style="fill:#117ac0;fill-opacity:1" />
<path
d="M 252.13119,104.48694 C 237.93314,98.045781 222.75448,93.373058 206.88505,90.72087 204.9364,94.131234 202.65828,98.727853 201.08931,102.36558 184.21995,99.915058 167.50615,99.915058 150.94499,102.36558 149.37697,98.727853 147.04767,94.131234 145.08065,90.72087 129.19576,93.373058 113.99778,98.071466 99.801667,104.53831 71.166938,146.4701 63.407091,187.39257 67.287014,227.70905 86.278932,241.47608 104.68345,249.81126 122.77785,255.29352 127.24421,249.33181 131.22943,242.99149 134.66302,236.29727 128.12434,233.89718 121.86488,230.9168 115.94644,227.48169 117.51832,226.34492 119.05058,225.18244 120.53549,223.97051 156.62092,240.31361 195.82978,240.31361 231.4843,223.97051 232.98372,225.18244 234.51985,226.34492 236.07048,227.48169 230.13754,230.94249 223.85875,233.92286 217.32103,236.32296 220.75463,242.99149 224.72149,249.33181 229.2062,255.29352 247.31798,249.83695 265.74086,241.47608 284.73278,227.70905 289.2861,180.97613 276.95265,140.43323 252.13119,104.48694 Z M 139.57861,202.92803 C 128.74748,202.92803 119.8621,193.10219 119.8621,181.17874 119.8621,169.23058 128.55523,159.4038 139.57861,159.4038 150.60104,159.4038 159.48352,169.20491 159.29512,181.17874 159.31251,193.10219 150.60104,202.92803 139.57861,202.92803 Z M 212.43829,202.92803 C 201.60715,202.92803 192.72469,193.10219 192.72469,181.17874 192.72469,169.23058 201.41876,159.4038 212.43829,159.4038 223.46168,159.4038 232.34609,169.20491 232.15479,181.17874 232.15479,193.10219 223.46168,202.92803 212.43829,202.92803 Z"
fill="#ffffff"
fill-rule="evenodd"
id="path9" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1 +1,15 @@
<svg role="img" fill="white" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="97px" height="97px" viewBox="0 0 97 97" enable-background="new 0 0 97 97" xml:space="preserve">
<g>
<path fill="#ff6060" d="M92.71,44.408L52.591,4.291c-2.31-2.311-6.057-2.311-8.369,0l-8.33,8.332L46.459,23.19
c2.456-0.83,5.272-0.273,7.229,1.685c1.969,1.97,2.521,4.81,1.67,7.275l10.186,10.185c2.465-0.85,5.307-0.3,7.275,1.671
c2.75,2.75,2.75,7.206,0,9.958c-2.752,2.751-7.208,2.751-9.961,0c-2.068-2.07-2.58-5.11-1.531-7.658l-9.5-9.499v24.997
c0.67,0.332,1.303,0.774,1.861,1.332c2.75,2.75,2.75,7.206,0,9.959c-2.75,2.749-7.209,2.749-9.957,0c-2.75-2.754-2.75-7.21,0-9.959
c0.68-0.679,1.467-1.193,2.307-1.537V36.369c-0.84-0.344-1.625-0.853-2.307-1.537c-2.083-2.082-2.584-5.14-1.516-7.698
L31.798,16.715L4.288,44.222c-2.311,2.313-2.311,6.06,0,8.371l40.121,40.118c2.31,2.311,6.056,2.311,8.369,0L92.71,52.779
C95.021,50.468,95.021,46.719,92.71,44.408z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 835 B

After

Width:  |  Height:  |  Size: 1.2 KiB