75 lines (72 loc) · 2.70 KB
 1{{ define "main" }}
 2{{ partial "cloud-hero.html" "TENYORU" }}
 3<div class="home shell--narrow">
 4  {{/* Job-seeking banner */}}
 5  {{ with .Site.Params.banner }}
 6  {{ if .enabled }}
 7  <a href="{{ .url | default "/contact/" }}" class="home-banner">
 8    <span class="home-banner__text"><span class="home-banner__tag">[!]</span> {{ .text }}</span>
 9    <span class="home-banner__cta">Contact</span>
10  </a>
11  {{ end }}
12  {{ end }}
13
14  {{/* Intro */}}
15  <section class="home-intro">
16    <h1 class="label">About</h1>
17    {{ with .Content }}<div class="home-intro__bio">{{ . }}</div>{{ end }}
18    {{ with .Site.Params.media }}
19    <div class="home-media">
20      {{ range . }}
21      <a href="{{ .url }}" class="home-media__link" title="{{ .label }}" target="_blank" rel="me noopener noreferrer">
22        {{ partial "icon" .icon }}
23      </a>
24      {{ end }}
25      {{ range partial "social-contacts.html" . }}
26      <a href="{{ .url }}" class="home-media__link" title="{{ .label }}" rel="me">
27        {{ partial "icon" .icon }}
28        {{ with .value }}<span class="sr-only">{{ . }}</span>{{ end }}
29      </a>
30      {{ end }}
31    </div>
32    {{ end }}
33  </section>
34
35  {{/* Projects */}}
36  {{ with .Site.Params.projects }}
37  <section class="list">
38    <h2 class="label">Work</h2>
39    <ul class="list__list list-none">
40      {{ range . }}
41      <li class="home-projects__item">
42        <a href="{{ .url }}" class="list__link" target="_blank" rel="noopener">
43          <span class="list__link-title">{{ with .icon }}{{ if resources.Get (printf "images/%s.svg" .) }}{{ partial "icon" . }}{{ end }}{{ end }}{{ .name }}</span>
44          {{ with .desc }}<span class="list__link-date">{{ . }}</span>{{ end }}
45        </a>
46      </li>
47      {{ end }}
48    </ul>
49  </section>
50  {{ end }}
51
52  {{/* Recent Posts */}}
53  {{ $posts := where .Site.RegularPages "Section" "blog" }}
54  {{ $posts = where $posts "Params.recent" "!=" false }}
55  {{ with $posts | first 5 }}
56  <section class="list">
57    <div class="section-header__top">
58      <h2 class="label">Recent posts</h2>
59      {{ with site.GetPage "blog" }}<a href="{{ .Permalink }}index.xml" class="section-header__rss tag-list__link" title="RSS Feed">{{- partial "icon" "rss" -}}rss</a>{{ end }}
60    </div>
61    <ul class="list__list list-none">
62      {{ range . }}
63      <li class="list__item">
64        <a href="{{ .RelPermalink }}" class="list__link">
65          <span class="list__link-title">{{ if .Params.pin }}{{ partial "icon" "star" }}{{ end }}{{ .Title }}</span>
66          <time class="list__link-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2006" }}</time>
67        </a>
68      </li>
69      {{ end }}
70    </ul>
71    <a href="/blog/" class="list__more link">All posts -&gt;</a>
72  </section>
73  {{ end }}
74</div>
75{{ end }}