Files
doc.rustdesk.com/layouts/shortcodes/ghcontributors.html
rustdesk 1736869d5f seo/geo
2026-03-20 15:16:55 +08:00

39 lines
943 B
HTML

<style type="text/css">
.ghContributors{
display:flex;
flex-flow: wrap;
align-content: flex-start
}
.ghContributors > div{
width: 50% ;
display: inline-flex;
margin-bottom: 5px;
}
.ghContributors > div label{
padding-left: 4px ;
}
.ghContributors > div span{
font-size: x-small;
padding-left: 4px ;
}
</style>
<div class="ghContributors">
{{ $url := .Get 0 }}
{{ with try (resources.GetRemote $url) }}
{{ with .Err }}
{{ warnf "Unable to fetch GitHub contributors from %q: %s" $url . }}
{{ else with .Value }}
{{ $contributors := .Content | transform.Unmarshal }}
{{ range $contributors }}
<div>
<img src="{{.avatar_url}}" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="{{.html_url}}">@{{.login}}</a></label>
<span class="contributions">{{.contributions}} commits</span>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>