♻️ Move resume parts to separate content pieces
This commit is contained in:
parent
8d09360dcb
commit
6292c91b3d
7 changed files with 193 additions and 119 deletions
76
layouts/_default/web-resume.html
Normal file
76
layouts/_default/web-resume.html
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{{ define "body" }}
|
||||
<body id="web-resume">
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main class="post">
|
||||
|
||||
<div class="post-info">
|
||||
{{ if .IsTranslated }}
|
||||
<p>
|
||||
{{ i18n "postAvailable" }}
|
||||
{{ range .Translations }}
|
||||
<a href="{{ .Permalink }}"><span class="flag fi fi-{{ index $.Site.Data.langFlags (.Lang) }}"></span></a>
|
||||
{{ end}}
|
||||
</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ with .Params.post_title }}{{ . | markdownify }}{{ else }}{{ .Title | markdownify }}{{ end }}</a>
|
||||
</h2>
|
||||
|
||||
{{ if .Params.Cover }}
|
||||
<figure class="post-cover">
|
||||
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title }}" />
|
||||
|
||||
{{ if .Params.CoverCaption }}
|
||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.toc }}
|
||||
<hr />
|
||||
<aside id="toc">
|
||||
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
|
||||
<nav id="TableOfContents">
|
||||
<ul>
|
||||
{{ range .Resources.Match "sections/*.md" }}
|
||||
{{ $toc := strings.Substr .TableOfContents 37 }}
|
||||
{{ $toc = strings.TrimSuffix "</ul>\n</nav>" $toc }}
|
||||
{{ $toc | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{ $toc := strings.Substr .TableOfContents 37 }}
|
||||
{{ $toc = strings.TrimSuffix "</ul>\n</nav>" $toc }}
|
||||
{{ $toc | safeHTML }}
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<hr />
|
||||
{{ end }}
|
||||
{{ range .Resources.Match "sections/*.md" }}
|
||||
<aside id="{{ .Params.id }}" class="{{ .Params.class }}">
|
||||
{{ .Content }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="post-info">
|
||||
{{ partial "tags.html" .Params.tags }}
|
||||
{{ partial "categories.html" . }}
|
||||
|
||||
{{- if .GitInfo }}
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-git-commit"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg><a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a> @ {{ if .Site.Params.dateformNum }}{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}{{ else }}{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}{{ end }}</p>
|
||||
{{- end }}
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue