{{ $links := .Site.Params.links -}}
{{ $contribUrl := .Params.contributingUrl | default "docs/contribution-guidelines" -}}

<section class="row td-box td-box--white td-box--height-auto linkbox">
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
        <h2>{{ T "community_learn" }}</h2>
        <p>{{ T "community_using" . }}</p>
        {{ with index $links "user" -}}
        {{ template "community-links-list" . -}}
        {{ end }}
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
        <h2>{{ T "community_develop" }}</h2>
        <p>{{ T "community_contribute" . }}</p>
        {{ with index $links "developer" -}}
        {{ template "community-links-list" . -}}
        {{ end }}
        <p>
            {{ T "community_how_to" . }}
            <a href="{{ $contribUrl | relURL }}">{{ T "community_guideline" }}</a>.
        </p>
    </div>
</section>

{{ define "community-links-list" -}}
<ul>
    {{ range . -}}
    <li title="{{ .name }}">
        <a rel="noopener" href="{{ .url }}"><i class="{{ .icon }}"></i> {{ .name }}</a>:
        {{ .desc }}
    </li>
    {{ end }}
</ul>
{{- end }}