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