homepage: personnal data

* NEW Adds an index layout.
* NEW Adds a partial perso layout.
* NEW Adds a partial pro layout.
* NEW Adds a partial online layout.

Signed-off-by: iGor milhit <igor@milhit.ch>
pull/31/head
iGor milhit 2019-03-14 07:30:22 +01:00
parent 3b7347cdee
commit 788c7c621b
No known key found for this signature in database
GPG Key ID: 3B5043D919E99ED2
5 changed files with 53 additions and 2 deletions

View File

@ -3,9 +3,7 @@
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -0,0 +1,15 @@
{{ define "main" }}
<main aria-role="main" itemscope itemtype="https://schema.org/Person">
{{if not .Site.Params.contactsPriv.hide }}
{{ partial "perso" .}}
{{ end }}
{{if not .Site.Params.contactsPro.hide }}
{{ partial "pro" . }}
{{ end }}
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}
{{ if not .Site.Params.online }}
{{ partial "online" }}
{{ end }}
</main>
{{ end }}

View File

@ -0,0 +1 @@
<h2>Online</h2>

View File

@ -0,0 +1,14 @@
<ul>
{{ with .Site.Params.contactsPriv.address }}
<li><span itemprop="address">adresse: {{ . }}</span></li>
{{ end }}
{{ with .Site.Params.contactsPriv.email }}
<li>email: <a href="mailto:{{ . }}" itemprop="email">{{ . }}</a></li>
{{ end }}
{{ with .Site.Params.contactsPriv.pĥone }}
<li>tél.: <a href="tel:{{ replace . " " ""}}"><span itemprop="telephone">{{ . }}</span></a></li>
{{end}}
{{ with .Site.Params.contactsPriv.mobile }}
<li>mobile: <a href="tel:{{ replace . " " ""}}"><span itemprop="telephone">{{ . }}</span></a></li>
{{end}}
</ul>

View File

@ -0,0 +1,23 @@
<ul>
{{ with .Site.Params.contactsPro.email }}
<li>email: <a href="mailto:{{ . }}" itemprop="email">{{ . }}</a></li>
{{end}}
{{ with .Site.Params.contactsPro.address }}
<li>adresse: <span itemprop="address">{{ . }}</span></li>
{{end}}
{{ with .Site.Params.contactsPro.mobile}}
<li>mobile: <a href="tel:{{ replace . " " ""}}"><span itemprop="telephone">{{ . }}</span></a></li>
{{end}}
{{ with .Site.Params.contactsPro.phone}}
<li>tel: <a href="tel:{{ replace . " " ""}}"><span itemprop="telephone">{{ . }}</span></a></li>
{{end}}
{{ with .Site.Params.contactsPro.publickey }}
<li>clé: <a href="/{{ . }}">{{ . }}</a></li>
{{end}}
{{ with .Site.Params.contactsPro.fingerprint}}
<li>empreinte: <code>{{ . }}</code></li>
{{end}}
{{ with .Site.Params.contactsPro.cv}}
<li>cv: <a href="/{{ . }}">{{ . }}</a></li>
{{end}}
</ul>