6
0
Fork 0

change layout

master
Dirk Heilig 2024-01-08 20:19:45 +01:00
parent 90fd998bae
commit b220fac44d
3 changed files with 58 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View File

@ -0,0 +1,48 @@
{{ define "main" }}
<section class="single">
<h1 class="title">{{ .Title }}</h1>
{{/*
<div class="tip">
<time datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006/01/02" }}</time>
<span class="split">·</span>
<span> {{ .WordCount }} words </span>
<span class="split">·</span>
<span>
{{ .ReadingTime }} minutes to read
</span>
</div>
*/}}
<div class="taxonomies">
{{ with .Params.categories }}
<div>
Categories:
{{ range . }}
<a href="{{ "categories/" | relURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
{{ with .Params.tags }}
<div>
Tags:
{{ range . }}
<a href="{{ "tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
</div>
<div class="content">
{{ .Content }}
</div>
{{ with and .Site.Params.remark42 .Params.show_comments }}
<hr />
{{ partial "comment.html" . }}
{{ end }}
</section>
{{ end }}

View File

@ -0,0 +1,10 @@
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('a[href^="http"]').forEach(function(element) {
const myhost = window.location.hostname;
const linkhost=new URL(element.href).hostname;
if(myhost === linkhost) return;
element.setAttribute("target","_blank");
console.log(element.attributes)
})
});