Compare commits

...

2 commits

6 changed files with 44 additions and 19 deletions

View file

@ -48,6 +48,8 @@ theme = "BlogAMore"
# Beschreibung das Webseitenbesitzers, für die Seitenleiste
avatar = "/img/author.jpg"
description = "Eine Beschreibung des Autors, als kurze Zusammenfassung"
# Name der Datendatei mit einer Auflistung von Link, Aufbau der Datei ist im Shortcode Link zu finden
linkdata = "links"
[author.social]
# Links zur erreichbarkeit des Autors (Email ist leider 2 mal anzugeben)
@ -224,6 +226,10 @@ date: {{ now.Format "2006-01-02" }}
> comming soon...
### link
> cooming soon...
## Weiteres
Haben Sie einen Fehler gefunden oder eine Idee für ein neues Feature? Schicken Sie mir bitte eine Mail an ... Oder erstellen Sie direkt einen [Pull Request](https://gitea.marcodn.de/mdn/blogamore/pulls)

View file

@ -12,7 +12,13 @@
<item>
<title>{{ .title }}</title>
<description>{{ .comment }}</description>
<link>{{ (path.Join $baseDir .filename) | absURL }}</link>
<link>
{{ if isset . "url" }}
{{- .url | safeURL -}}
{{ else }}
{{- (path.Join $baseDir .filename) | absURL -}}
{{ end }}
</link>
<author>{{ with $.Site.Author.email }}{{.}}{{end}}</author>
<guid></guid>
<pubDate>{{ (time .published).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>

View file

@ -20,3 +20,14 @@
</div>
</div>
{{ end }}
{{ define "sidebar" }}
{{ if isset .Site.Author "linkdata" }}
{{ with (index .Site.Data .Site.Author.linkdata) }}
<div class="position-sticky">
{{- partial "widget/header.html" (dict "title" "Links") -}}
{{- partial "widget/links.html" . -}}
</div>
{{ end }}
{{ end }}
{{ end }}

View file

@ -0,0 +1,16 @@
<ul>
{{ range (where . "visible" 1) }}
<li>
{{ .name }}
<ul>
{{ range (where .urls "visible" 1) }}
<li>
<a href="{{ .url }}" target="{{- .target -}}" alt="{{- .description }}">{{ .name }}</a>
<br/>
{{ .description }}
</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>

View file

@ -1,8 +1,7 @@
{{ $dataName := .Get "data" }}
{{ $baseDir := path.Dir .Page.File }}
<ul>
{{ range (index .Site.Data (split $dataName "/")) }}
<li><a href="{{ (path.Join $baseDir .filename) | absURL }}">{{ .title }}{{ with .filesize }} ({{ int (div (div . 1024) 1024) }} MB){{ end }}</a><br/>{{ .comment }}</li>
<li><a href="{{ .url | safeURL }}">{{ .title }}{{ with .filesize }} ({{ int (div (div . 1024) 1024) }} MB){{ end }}</a><br/>{{ .comment }}</li>
{{ end }}
</ul>

View file

@ -1,18 +1,5 @@
{{ $dataName := .Get "data" }}
<ul>
{{ range (where (index .Site.Data (split $dataName "/")) "visible" 1) }}
<li>
{{ .name }}
<ul>
{{ range (where .urls "visible" 1) }}
<li>
<a href="{{ .url }}" target="{{- .target -}}" alt="{{- .description }}">{{ .name }}</a>
<br/>
{{ .description }}
</li>
{{ with (index .Site.Data (split $dataName "/")) }}
{{- partial "widget/links.html" . -}}
{{ end }}
</ul>
</li>
{{ end }}
</ul>