Files
services/docs/hugo-tania/layouts/_default/index.html
2021-01-28 13:14:16 +00:00

95 lines
2.4 KiB
HTML

{{ define "main" }}
<div class="container">
<section class="my">
<div class="content">
{{ with.Content }}
{{ . }}
{{ end }}
<div class="bio-social">
{{ range $name, $path := $.Param "socialOptions" }}
{{ if (and $path (ne $name "email")) }}
<a
href="{{ $path | safeURL }}"
target="_blank"
rel="noreferrer"
title="{{ $name }}"
aria-label="{{ $name }}"
>
{{ partial (print "svgs/social/" $name ".svg") (dict "width" 25 "height" 25) }}
</a>
{{ end }}
{{ end }}
</div>
</div>
</section>
</div>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $projects := where .Site.RegularPages "Section" "projects" }}
<div class="container">
<section>
<div class="posts">
{{ $pages = .Site.Taxonomies.labels.readme }}
{{ range $i,$e := $pages }}
{{if modBool $i 2}}
<div class="container">
<nav class="flex container suggested">
<a rel="prev" href="{{ .RelPermalink }}" title="{{ $e.Title }}">
<span style="font-size: 1.5em; font-weight: bold;">
{{ $e.Title }}</span
>
<span style="color: #777">{{ $e.Summary }}</span>
</a>
{{ end }}
{{if not (modBool $i 2)}}
<a rel="next" href="{{ .RelPermalink }}" title="{{ $e.Title }}">
<span style="font-size: 1.5em; font-weight: bold;">
{{ $e.Title }}</span
>
<span style="color: #777">{{ $e.Summary }}</span>
</a>
</nav>
</div>
{{ end }}
{{ end }}
<!-- todo: do not copypaste it all -->
</div>
</section>
{{ if gt (len $projects) 0}}
<section>
<h2>Projects</h2>
<div class="projects">
{{ range $projects.ByWeight }}
<div class="project">
<div>
<a href="{{ .Params.link }}" target="_blank" rel="noreferrer">
<div class="icon">{{ .Params.icon }}</div>
<h3>{{ .Title }}</h3>
</a>
<div class="description">{{ .Params.description }}</div>
</div>
<div class="flex">
<a
href="{{ .Params.repo }}"
class="button"
target="_blank"
rel="noreferrer"
>Source</a
>
</div>
</div>
{{ end }}
</div>
</section>
{{ end }}
</div>
{{ end }}