Sidbare-Elemente in widget-Partials ausgelagert
This commit is contained in:
parent
ca19ee452b
commit
9827bb7ba7
15 changed files with 151 additions and 120 deletions
|
@ -11,7 +11,7 @@
|
|||
<div id="content" class="col-md-8 border rounded shadow-lg p-3 mb-2">
|
||||
{{- block "main" . -}}{{- end }}
|
||||
</div>
|
||||
<div id="sidebar" class="col-md-4">
|
||||
<div id="sidebar" class="col-md-4 px-3">
|
||||
{{- block "sidebar" . -}}{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,70 +1,22 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ range .Pages.ByPublishDate.Reverse }}
|
||||
<p>
|
||||
<h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
{{ partial "metadata.html" . }}
|
||||
<a class="summary" href="{{ .RelPermalink }}">
|
||||
<p>{{ .Summary }}</p>
|
||||
</a>
|
||||
</p>
|
||||
{{ range .Pages.ByTitle }}
|
||||
<article class="border-bottom">
|
||||
<h1 class="mb-3">
|
||||
<a href="{{ .RelPermalink | relURL }}">{{ .Title }}</a>
|
||||
</h1>
|
||||
<p>{{ .Description }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "sidebar" }}
|
||||
<div class="position-sticky" style="top: 2rem;">
|
||||
<div class="p-4 mb-3 bg-light rounded">
|
||||
<h4 class="py-1 mb-3 fst-italic text-bg-dark text-center">About Me</h4>
|
||||
{{ with .Site.Params.Avatar }}
|
||||
<div class="py-1 text-center">
|
||||
<img class="rounded-circle" src="{{ . }}" alt="Ansprechendes Bild"/>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- Über config beschreibbar machen -->
|
||||
{{ with .Site.Params.Description }}
|
||||
<div class="py-1">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="position-sticky" style="top: 0.5rem;">
|
||||
{{- partial "widget/header.html" (dict "title" "About Me") -}}
|
||||
{{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Avatar "description" .Site.Params.Description) -}}
|
||||
|
||||
<h4 class="py-1 mb-3 fst-italic text-bg-dark text-center">Contact Me</h4>
|
||||
<div class="py-1 social">
|
||||
<ul class="social-links">
|
||||
{{ with .Site.Params.Social.Email }}
|
||||
<li><a href="mailto:{{ . }}"><i data-feather="mail"></i> {{ . }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.Phone }}
|
||||
<li><a href="tel:{{ . }}"><i class="bi" data-feather="phone"></i> {{ . }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.VoIP }}
|
||||
<li><a href="sip:{{ . }}"><i data-feather="phone"></i> {{ . }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.Github }}
|
||||
<li><a href="https://github.com/{{ . }}" target="_blank"><i data-feather="github"></i> {{ . }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.Twitter }}
|
||||
<li><a href="https://twitter.com/{{ . }}" target="_blank"><i class="bi" data-feather="twitter"></i> {{ . }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.LinkedIn }}
|
||||
<li><a href="https://linkedin.com/in/{{ . }}" target="_blank"><i class="bi" data-feather="linkedin"></i> {{ . }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.Matrix }}
|
||||
<li><a href="https://matrix.to/#/{{ . }}" target="_blank"><img src="/img/matrix-badge.svg" alt="Chat on matrix"> {{ . }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.RSS }}
|
||||
<li><a href="{{ . }}"><i class="bi" data-feather="rss"></i> RSS</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Hier die Links zu Mail usw. vielleicht auch zum SIP Anschluss, vielleicht mit dem Icons aus faether oder Bootstrap -->
|
||||
</div>
|
||||
{{ with .Site.Params.Social }}
|
||||
{{- partial "widget/header.html" (dict "title" "Contact Me") -}}
|
||||
{{- partial "widget/socials.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -1,6 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ partial "metadata.html" . }}
|
||||
<br/><br/>
|
||||
{{ .Content }}
|
||||
<h1 class="mb-4">{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "sidebar" }}
|
||||
<div class="position-sticky" style="top: 0.5rem;">
|
||||
{{- partial "widget/header.html" (dict "title" "About Me") -}}
|
||||
{{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Avatar "description" .Site.Params.Description) -}}
|
||||
|
||||
{{ with .Site.Params.Social }}
|
||||
{{- partial "widget/header.html" (dict "title" "Contact Me") -}}
|
||||
{{- partial "widget/socials.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue