Created
July 31, 2018 17:28
-
-
Save copygirl/474f957dbe58c96d8e284488ccfff8cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "main" }} | |
{{ .Content }} | |
<h2>People</h2> | |
<ul class="boxes"> | |
{{ range .Site.Data.people }} | |
<li><div> | |
<img class="picture" src="/images/people/avatars/default.png" /> | |
<div class="buttons"> | |
{{ $scratch := newScratch }} | |
{{ range $button := .buttons }} | |
{{ range $icon, $link := . }} | |
{{ $scratch.Set "link" $link }} | |
{{ if eq $icon "twitter" }}{{ $scratch.Set "link" (printf "https://twitter.com/%s" ($scratch.Get "link")) }}{{ end }} | |
{{ if eq $icon "github" }}{{ $scratch.Set "link" (printf "https://github.com/%s" ($scratch.Get "link")) }}{{ end }} | |
{{ if eq $icon "email" }}{{ $scratch.Set "link" (printf "mailto:%s" ($scratch.Get "link")) }}{{ end }} | |
<a class="circle-button icon icon-{{ $icon }}" href="{{ $scratch.Get "link" }}"></a> | |
{{ end }} | |
{{ end }} | |
</div> | |
<h3> | |
{{ with .name }}<span class="name">{{ . }}</span>{{ end }} | |
{{ with .nickname }}<span class="nickname">{{ . }}</span>{{ end }} | |
</h3> | |
<section>{{ .about }}</section> | |
</div></li> | |
{{ end }} | |
</ul> | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment