More done for micro

This commit is contained in:
Fundor333
2025-01-18 02:03:49 +01:00
parent 2fe508b782
commit 248504a939
5 changed files with 57 additions and 1 deletions

View File

@@ -4,5 +4,11 @@ date: {{ .Date }}
description:
tags:
categories:
reply:
repost:
like:
rsvp:
bookmark:
---

View File

@@ -8,6 +8,8 @@ defaultColor:
# the default value is set to 'auto'.
# You can take a look at layouts/index.html for more information.
mainSections: ["post", "photos", "micro"]
commentSections: ["post", "photos", "micro"]
suggestionSections: ["post"]
toc: false # set to false to disable table of contents 'globally'
tocOpen: false # set to true to open table of contents by default
goToTop: true # set to false to disable 'go to top' button

29
layouts/micro/single.html Normal file
View File

@@ -0,0 +1,29 @@
{{ define "main" }}
<div class="wrapper post">
<main class="page-content" aria-label="Content">
<article class="h-entry">
<header class="header">
<h1 class="header-title p-name">{{ .Title }}</h1>
<div class="post-meta">
<div style="display: none;" class="p-summary ">{{ .Description }}</div>
<a class="u-url" href="{{ .Permalink }}">
{{ $configDateFormat := .Site.Params.dateFormat | default ":date_medium" }}
{{ with .Date }}
{{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }}
<time datetime="{{ $ISO_time }}" class="dt-published" itemprop="datePublished"> {{ . | time.Format $configDateFormat }} </time>
{{ end }}
by {{ with .Site.Params.Hcard.Avatar }}<img class="u-photo" alt="" style=" display: none;" src="{{ . | absURL }}"> {{ end }}<a class="p-author h-card" rel="author" href="{{ .Site.BaseURL }}">{{ $.Site.Params.Hcard.FullName }}</a>
</a>
</div>
</header>
{{ partial "toc.html" .}}
<div class="page-content e-content">
{{ partial "micro.html" . }}
{{ .Content }}
</div>
</article>
{{- partial "comments.html" . -}}
</main>
</div>
{{ end }}

View File

@@ -1,4 +1,4 @@
{{if in site.Params.mainSections .Type}}
{{if in site.Params.commentSections .Type}}
<hr>
<script src="/js/webmention.min.js"
@@ -11,6 +11,9 @@ data-alternative-url='{{ range .Aliases }}{{ (absURL .) }}{{ end }}' async>
<p>To reply to this post, you can send a <a href="https://indieweb.org/Webmention" target="_blank">Webmention</a> or you can toot me at <a href="https://mastodon.social/@fundor333">fundor333@mastodon.social</a> <br>
You mentioned this post on your site? Send a <a href="https://indieweb.org/Webmention" target="_blank">Webmention</a></p>
{{end}}
{{if in site.Params.suggestionSections .Type}}
{{ $related := .Site.RegularPages.Related . | first 5 }}

View File

@@ -0,0 +1,16 @@
<hr>
{{with .Params.Reply}}
<p><a href="{{.}}" class="u-in-reply"><i class="fa-regular fa-reply"></i>In replay of {{.}}</a></p>
{{end}}
{{with .Params.Repost}}
<p><a href="{{.}}" class="u-repost"><i class="fa-regular fa-retweet"></i>Repost of {{.}}</a></p>
{{end}}
{{with .Params.Like}}
<p><a href="{{.}}" class="u-like"><i class="fa-regular fa-heart"></i>Like the lik {{.}}</a></p>
{{end}}
{{with .Params.Bookmark}}
<p><a href="{{.}}" class="u-bookmark"><i class="fa-regular fa-bookmark"></i>Bookmark of {{.}}</a></p>
{{end}}
{{with .Params.Rspv}}
<p><a href="{{.}}" class="u-rsvp"><i class="fa-regular fa-calendar-heart"></i>RSPV of {{.}}</a></p>
{{end}}