Improved UserLinkComponent
This commit is contained in:
parent
67d0336ba7
commit
847a543266
|
@ -1,9 +1,10 @@
|
||||||
@using Wave.Data
|
@using Wave.Data
|
||||||
@using System.Net
|
@using System.Net
|
||||||
|
@using System.Text.RegularExpressions
|
||||||
|
|
||||||
<a href="@Link.UrlString" rel="me" target="_blank" title="@Link.Url.Host" @attributes="AdditionalAttributes">
|
<a href="@Link.UrlString" rel="me" target="_blank" title="@Link.Url.Host" @attributes="AdditionalAttributes">
|
||||||
<img src="@("/api/proxy/favicon/" + WebUtility.UrlEncode(Link.Url.Host))" alt="" width="32" height="32" class="w-5 h-5" loading="async" />
|
<img src="@("/api/proxy/favicon/" + WebUtility.UrlEncode(Link.Url.Host))" alt="" width="32" height="32" class="w-5 h-5" loading="async" />
|
||||||
@(Link.Url.Host.LastIndexOf('.') > -1 ? Link.Url.Host[..Link.Url.Host.LastIndexOf('.')] : Link.Url.Host)
|
@Regex.Replace(Link.Url.Host, @"(www\.|.de|.com)", "", RegexOptions.Compiled | RegexOptions.IgnoreCase)
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
Loading…
Reference in a new issue