mirror of
https://github.com/MeshTender/MeshTender.git
synced 2026-09-02 10:03:43 +00:00
Also fix the list on the org member page
This commit is contained in:
@@ -88,7 +88,22 @@
|
||||
{{if .Links}}
|
||||
<div class="card mt-3">
|
||||
<div class="card-header"><h3 class="card-title">Links</h3></div>
|
||||
<div class="card-body">{{template "link-list" .Links}}</div>
|
||||
<div class="list-group list-group-flush">
|
||||
{{range .Links}}
|
||||
{{if .Href}}
|
||||
<a class="list-group-item list-group-item-action d-flex align-items-center gap-2" href="{{.Href}}" target="_blank" rel="noopener noreferrer nofollow">
|
||||
<span class="text-secondary d-flex" title="{{.PlatformName}}">{{template "link-icon" .Platform}}</span>
|
||||
<span class="flex-fill text-truncate">{{.Display}}</span>
|
||||
<span class="text-secondary d-flex">{{template "icon-arrow-right" ""}}</span>
|
||||
</a>
|
||||
{{else}}
|
||||
<div class="list-group-item d-flex align-items-center gap-2">
|
||||
<span class="text-secondary d-flex" title="{{.PlatformName}}">{{template "link-icon" .Platform}}</span>
|
||||
<span class="flex-fill text-truncate">{{.Display}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -51,6 +51,3 @@
|
||||
back to a generic link glyph for "website" and anything unknown. Keep the
|
||||
branches in sync with the platforms in store/org_links.go + user_links.go. */}}
|
||||
{{define "link-icon"}}{{if eq . "email"}}{{template "icon-mail" ""}}{{else if eq . "signal"}}{{template "icon-brand-signal" ""}}{{else if eq . "meshcore"}}{{template "icon-key" ""}}{{else if eq . "discord"}}{{template "icon-brand-discord" ""}}{{else if eq . "facebook"}}{{template "icon-brand-facebook" ""}}{{else if eq . "instagram"}}{{template "icon-brand-instagram" ""}}{{else if eq . "x"}}{{template "icon-brand-x" ""}}{{else if eq . "youtube"}}{{template "icon-brand-youtube" ""}}{{else if eq . "tiktok"}}{{template "icon-brand-tiktok" ""}}{{else if eq . "twitch"}}{{template "icon-brand-twitch" ""}}{{else if eq . "github"}}{{template "icon-brand-github" ""}}{{else if eq . "telegram"}}{{template "icon-brand-telegram" ""}}{{else if eq . "reddit"}}{{template "icon-brand-reddit" ""}}{{else if eq . "linkedin"}}{{template "icon-brand-linkedin" ""}}{{else if eq . "mastodon"}}{{template "icon-brand-mastodon" ""}}{{else if eq . "bluesky"}}{{template "icon-brand-bluesky" ""}}{{else}}{{template "icon-link" ""}}{{end}}{{end}}
|
||||
{{/* link-list renders a wrapping row of org link buttons. . is a slice of links,
|
||||
each exposing .Platform, .URL, and .Display. */}}
|
||||
{{define "link-list"}}<div class="btn-list">{{range .}}{{if .Href}}<a class="btn" href="{{.Href}}" target="_blank" rel="noopener noreferrer nofollow"><span class="d-flex" title="{{.PlatformName}}">{{template "link-icon" .Platform}}</span><span class="ms-1">{{.Display}}</span></a>{{else}}<span class="btn disabled"><span class="d-flex" title="{{.PlatformName}}">{{template "link-icon" .Platform}}</span><span class="ms-1">{{.Display}}</span></span>{{end}}{{end}}</div>{{end}}
|
||||
|
||||
Reference in New Issue
Block a user