jk.nipponalba.scot website https://jk.nipponalba.scot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

112 lines
5.4 KiB

{{ define "main" }}
{{ if not (eq .Type "response" "bookmarkof")}}
<article class="post h-entry entry contents">
<div class="author" style="display:none;">
<a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}<img src="/images/profile.jpg"/></a>
</div>
<div class="post-content">{{ with .Page.Params.Image }}{{ partial "taxonomy/image.html" . }}{{ end }}<h3 class="post-title p-name entry-title">{{ .Title }}</h3><b>{{ .Description }}</b>
<aside>
{{ if eq .Type "article" }}<div class="info">
<i class="fa fa-sun"></i><a class="u-url" href="{{ .RelPermalink }}"><span class="date"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></span></a>
<i class="fa fa-clock"></i><span class="reading-time">{{ .ReadingTime }}-minute read</span>
</div>{{end}}
<div class="e-content"><a href="https://webmention.io/jk.nipponalba.scot/webmention" rel="webmention" style="display:none">webmention</a>
{{ .Content }}
{{ if eq .Type "photo"}}
<div class="photos">
{{ range .Page.Params.Photo }}
<a href="{{ . }}"><img class="u-photo thumb" src="{{ replace . "800." "300."}}"/></a>
{{end}}
</div>
{{end}}
{{ if eq .Type "article" }}<div class="p-summary" style="display:none">
{{ .Page.Params.summary }}<br/>
</div>
{{ end }}<br/>
</div>
<div class="post-footer-page">
<div class="date"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></div>
{{ $pathJSON := (print .Permalink "bridgy.json") }}
{{ $relpathJSON := (print .RelPermalink "bridgy.json") }}
{{ if fileExists $relpathJSON }}
<div class="syndication">
{{ $mJSON := getJSON $pathJSON }}
Syndicated to <a href="{{ printf $mJSON.url}}">Pleroma</a>
</div>
{{ end }}
<div class="info">
{{ with .Page.Params.Blog }}{{ partial "taxonomy/blog.html" . }}{{ end }}
{{ with .Page.Params.category }}{{ partial "taxonomy/categories.html" . }}{{ end }}
{{ with .Page.Params.tag }}{{ partial "taxonomy/tags.html" . }}{{ end }}
</div>
</div>
<a href="https://brid.gy/publish/mastodon"></a>
<div class="interactions"><h4>Interactions</h4></div>
<div class="webmention-form">
<form action="https://webmention.io/jk.nipponalba.scot/webmention" method="post">
<label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
<input name="source" type="url"/>
<input name="target" value="{{ .Permalink }}" type="hidden"/>
<input value="Send Webmention" type="submit"/>
</form>
</div>
{{ $pathJSON := (print "data" (strings.TrimSuffix "/" .RelPermalink) ".json") }}
{{ if fileExists $pathJSON }}
<div class="webmentions">
{{ $mJSON := getJSON $pathJSON }}
<div class="like interaction"><h4>Likes</h4>{{ partial "likes.html" $mJSON }}</div>
<div class="share interaction"><h4>Shares</h4>{{ partial "shares.html" $mJSON }}</div>
<h4>Comments & Replies</h4>{{ partial "webmention.html" $mJSON }}
</div>
{{ end }}
</aside></div>
</article>
{{ else if eq .Type "bookmarkof" }}
{{ $cats := slice }}
{{ range .Site.Data.bookmarks }}
{{ $cats = $cats | append .category }}
{{ end }}
{{ $cats = uniq $cats | sort }}
{{ range $cats }}
{{ $cat := . }}
<h4>{{ $cat }}</h4>
{{ range $.Site.Data.bookmarks }}
{{ if eq .category $cat }}
<section data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
<div class="author" style="display:none">
<a rel="author" class="p-author h-card" rel="me" href="https://jk.nipponalba.scot"><img src="/images/profile.jpg"/><div class="title">{{ .Site.Params.Title }}</div></a>
</div>
<aside>
<article class="h-cite">
<u><a href="{{ .bookmarkof | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a></u> - <div class="p-name p-content">{{ .content | markdownify }}</div>
</article>
</aside>
</section>
{{ end }}
{{ end }}
{{ end }}
{{ else }}
{{ if .Params.inreplyto }}<article class="h-entry h-cite" id="response">{{ end }}
{{ if .Params.likeof }}<article class="h-entry h-cite" id="response">{{ end }}
{{ if .Params.repostof }}<article class="h-entry h-cite" id="response">{{ end }}
<div class="author">
<a rel="author" class="p-author h-card" rel="me" href="https://jk.nipponalba.scot"><img src="/images/profile.jpg"/><div class="title">{{ .Site.Params.Title }}</div></a>
</div>
<a href="https://webmention.io/jk.nipponalba.scot/webmention" rel="webmention" style="display:none">webmention</a>
{{ if .Params.inreplyto }}<p> Replied to {{ end }}
{{ if .Params.likeof }}<p> Liked {{ end }}
{{ if .Params.repostof }}<p>Shared {{ end }}
someone's
{{ if .Params.likeof }}<a href="{{ .Params.likeof }}" class="u-url u-like-of"> post</a>{{ end }}
{{ if .Params.inreplyto }}<a href="{{ .Params.inreplyto }}" class="u-url u-in-reply-to"> post</a>{{ end }}
{{ if .Params.repostof }}<a href="{{ .Params.repostof }}" class="u-url u-repost-of"> post</a>{{ end }}</p>
{{ if .Content }}<div class="e-content">{{ .Content }}</div><br/> {{end}}
<time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time>
<a href="{{ .Permalink }}" class="u-url"></a>
</article>
{{end}}
{{end}}