diff --git a/static/img/banner.png b/static/img/banner.png new file mode 100644 index 0000000..62b12cb Binary files /dev/null and b/static/img/banner.png differ diff --git a/themes/hugo-theme-flat/layouts/_default/index.html b/themes/hugo-theme-flat/layouts/_default/index.html new file mode 100644 index 0000000..66e3087 --- /dev/null +++ b/themes/hugo-theme-flat/layouts/_default/index.html @@ -0,0 +1,48 @@ +{{ define "main" }} + +
+

{{ .Title }}

+{{/* +
+ + · + {{ .WordCount }} words + · + + {{ .ReadingTime }} minutes to read + +
+ */}} + +
+ {{ with .Params.categories }} +
+ Categories: + {{ range . }} + {{ . }} + {{ end }} +
+ {{ end }} + + {{ with .Params.tags }} +
+ Tags: + {{ range . }} + {{ . }} + {{ end }} +
+ {{ end }} +
+ + +
+ {{ .Content }} +
+ + {{ with and .Site.Params.remark42 .Params.show_comments }} +
+ {{ partial "comment.html" . }} + {{ end }} +
+ +{{ end }} diff --git a/themes/hugo-theme-flat/static/js/layout.js b/themes/hugo-theme-flat/static/js/layout.js new file mode 100644 index 0000000..52b948f --- /dev/null +++ b/themes/hugo-theme-flat/static/js/layout.js @@ -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) +}) +}); \ No newline at end of file