78 lines
2.3 KiB
HTML
78 lines
2.3 KiB
HTML
{{ define "main" }}
|
|
<section class="home-bio">
|
|
<p>{{ .Site.Params.bio }}</p>
|
|
<p class="social-line">
|
|
Find me on
|
|
{{- range $i, $s := .Site.Params.social -}}
|
|
{{- if $i }},{{ end }}
|
|
<a href="{{ $s.url }}" target="_blank" rel="noopener noreferrer">{{ $s.name }}</a>
|
|
{{- end -}}.
|
|
</p>
|
|
</section>
|
|
|
|
{{- $posts := where .Site.RegularPages "Section" "posts" -}}
|
|
{{- if $posts }}
|
|
<section>
|
|
<div class="section-title-bar">
|
|
<h2 class="section-heading">Recent Writing</h2>
|
|
<a href="/posts/" class="section-link">All posts →</a>
|
|
</div>
|
|
<ul class="post-list">
|
|
{{- range first 4 $posts }}
|
|
<li class="post-list-item">
|
|
<time class="post-date" datetime="{{ .Date.Format "2006-01-02" }}">
|
|
{{ .Date.Format "02 Jan 2006" }}
|
|
</time>
|
|
<div class="post-list-info">
|
|
<a href="{{ .Permalink }}" class="post-title-link">{{ .Title }}</a>
|
|
{{- with .Params.tags }}
|
|
<span class="post-list-tags">
|
|
{{- range . }}
|
|
<a href="/posts/?tag={{ . | urlize }}" class="post-list-tag">#{{ . }}</a>
|
|
{{- end }}
|
|
</span>
|
|
{{- end }}
|
|
</div>
|
|
</li>
|
|
{{- end }}
|
|
</ul>
|
|
</section>
|
|
{{- end }}
|
|
|
|
{{- if .Site.Params.projects }}
|
|
<section>
|
|
<div class="section-title-bar">
|
|
<h2 class="section-heading">Featured Projects</h2>
|
|
<a href="/projects/" class="section-link">All projects →</a>
|
|
</div>
|
|
<div class="projects-grid">
|
|
{{- range first 4 .Site.Params.projects }}
|
|
<div class="project-card">
|
|
<div class="project-card-inner">
|
|
<div class="project-card-header">
|
|
<h3 class="project-card-name">
|
|
{{- if eq .url "#" -}}
|
|
{{ .name }}
|
|
{{- else -}}
|
|
<a href="{{ .url }}" target="_blank" rel="noopener noreferrer">{{ .name }} <span class="project-arrow">↗</span></a>
|
|
{{- end -}}
|
|
</h3>
|
|
{{- with .article }}
|
|
<a href="{{ . }}" class="project-article-link">writeup ↗</a>
|
|
{{- end }}
|
|
</div>
|
|
<p class="project-card-desc">{{ .description }}</p>
|
|
{{- with .tags }}
|
|
<div class="project-card-tags">
|
|
{{- range . }}
|
|
<span class="project-card-tag">{{ . }}</span>
|
|
{{- end }}
|
|
</div>
|
|
{{- end }}
|
|
</div>
|
|
</div>
|
|
{{- end }}
|
|
</div>
|
|
</section>
|
|
{{- end }}
|
|
{{ end }}
|