forked from c3re/c3re-website
change layout
parent
90fd998bae
commit
b220fac44d
Binary file not shown.
After Width: | Height: | Size: 166 KiB |
|
@ -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 }}
|
|
@ -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)
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue