The MIT License (MIT)
-Copyright (c) 2023 YOUR_NAME_HERE
+Copyright (c) 2021 YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
--- /dev/null
+<!DOCTYPE html>
+<html lang="{{ $.Site.LanguageCode | default "en" }}">
+ {{- partial "head.html" . -}}
+ <body class="not-found 404 error">
+ <div id="page">
+ <a class="skip-link screen-reader-text" href="#primary">skip to content</a>
+ {{- partial "header.html" . -}}
+ <div id="content" class="site-content">
+ <div id="primary" class="content-area">
+ <main id="main" class="site-main">
+ {{- block "404-main" . }}{{- end }}
+ </main>
+ </div>
+ <div id="secondary" class="related-content">
+ {{- partial "tag-cloud.html" . -}}
+ {{- partial "home-latest-posts.html" . -}}
+ </div>
+ </div>
+ {{- partial "footer.html" . -}}
+ </div>
+ </body>
+</html>
+{{ define "404-main" }}
+<article class="found-not">
+ <blockquote cite="Obiwan Kenobi">
+ These aren't the droids you're looking for.
+ </blockquote>
+</article>
+{{ end }}
--- /dev/null
+<!DOCTYPE html>
+<html lang="{{ $.Site.LanguageCode | default "en" }}">
+ {{- partial "head.html" . -}}
+ <body class="blog">
+ <div id="page">
+ <a id="top" class="skip-link screen-reader-text" href="#primary">skip to content</a>
+ {{- partial "header.html" . -}}
+ <div id="content" class="site-content">
+ <div id="primary" class="content-area">
+ <main id="main" class="site-main">
+ {{- block "main" . }}{{- end }}
+ </main>
+ </div>
+ </div>
+ {{- partial "footer.html" . -}}
+ </div>
+ </body>
+</html>
--- /dev/null
+{{ define "main" }}
+<article class="entry post">
+ <header>
+ <h2>{{ .Title }}</h2>
+ </header>
+ <div id="content">
+ {{ .Content }}
+ </div>
+</article>
+<ul>
+ <!-- Ranges through content/posts/*.md -->
+ {{ range .Pages }}
+ <li>
+ <a href="{{.Permalink}}">{{.Date.Format "01-02-2006"}} | {{.Title}}</a>
+ </li>
+ {{ end }}
+</ul>
+{{ end }}
--- /dev/null
+<!DOCTYPE html>
+<html lang="{{ $.Site.LanguageCode | default "en" }}">
+ {{- partial "head.html" . -}}
+ <body class="page home">
+ <div id="page">
+ <a id="top" class="skip-link screen-reader-text" href="#primary">skip to content</a>
+ {{- partial "header.html" . -}}
+ <div id="content" class="site-content">
+ <div id="primary" class="content-area">
+ <main id="main" class="site-main">
+ {{- block "page-main" . }}{{- end }}
+ </main>
+ </div>
+ </div>
+ {{- partial "footer.html" . -}}
+ </div>
+ </body>
+</html>
--- /dev/null
+{{ define "page-main" }}
+<article class="single-page">
+ <div id="page-content">
+ {{ .Content }}
+ </div>
+</article>
+{{ end }}
--- /dev/null
+<!-- here will appear eventual js code and other additions to the footer -->
+<div id="backtotop">
+ <a href="#top">back to top</a>
+</div>
--- /dev/null
+{{ with .Params.categories }}
+<div class="post-cats">
+ <span>Published in:</span>
+ <ul class="article-tags">
+ {{ range . }}
+ {{ $href := print (absURL "categories/") (urlize .) }}
+ <li>
+ <a href="{{ $href }}">{{ . }}</a>
+ </li>
+ {{ end }}
+ </ul>
+</div>
+{{ end }}
--- /dev/null
+{{ $dateTime := .PublishDate.Format "2006-01-02" }}
+{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
+<time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
--- /dev/null
+<meta name="theme-color" content="#ffeb3b">
+<meta name="msapplication-navbutton-color" content="#ffeb3b">
+<meta name="apple-mobile-web-app-capable" content="yes">
+<meta name="apple-mobile-web-app-status-bar-style" content="black">
+
+<link rel="icon" sizes="192x192" href='{{ "/assets/img/icon.png" | absURL }}'>
+<link rel="apple-touch-icon" href='{{ "/assets/img/icon.png" | absURL }}'>
--- /dev/null
+{{ with .Site.Social }}
+<div id="social-menu">
+ <ul class="social-links">
+ <li class="social-link social-facebook">
+ <a href="https://facebook.com/{{ .facebook }}" target="_blank">facebook</a>
+ </li>
+ <li class="social-link social-twitter">
+ <a href="https://twitter.com/{{ .twitter }}" target="_blank">twitter</a>
+ </li>
+ <li class="social-link social-instagram">
+ <a href="https://instagram.com/{{ .instagram }}" target="_blank">instagram</a>
+ </li>
+ <li class="social-link social-github">
+ <a href="https://github.com/{{ .github }}" target="_blank">github</a>
+ </li>
+ </ul>
+</div>
+{{ end }}
--- /dev/null
+{{ with .Params.tags }}
+<div class="post-tags">
+ <span>Tagged: </span>
+ <ul class="article-tags">
+ {{ range . }}
+ {{ $href := print (absURL "tags/") (urlize .) }}
+ <li>
+ <a class="" href="{{ $href }}">{{ . }}</a>
+ </li>
+ {{ end }}
+ </ul>
+</div>
+{{ end }}
--- /dev/null
+{{ now.Format "2006" }}
--- /dev/null
+{{/*
+ * Add the featured image to the header if it's present in the Front Matter
+ */}}
+{{ if isset .Params "featured_image" }}
+<style media="screen">
+ header#masthead {
+ background-image: url( {{ $.Params.featured_image | urlize }} );
+ }
+</style>
+{{ end }}
--- /dev/null
+<div id="latest-posts">
+ <h3>latest posts</h3>
+ {{ range where $.Site.RegularPages.ByLastmod.Reverse "Section" "blog" }}
+ <article class="post post-summary">
+ <header class="article-meta">
+ <h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
+ {{ partial "funcs/datepublish.html" . }}
+ </header>
+ </article>
+ {{ end }}
+</div>
--- /dev/null
+<ul>
+ {{ $currentPage := . }}
+ {{ range .Site.Menus.main }}
+ {{ if .HasChildren }}
+ <li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
+ <a href="#">{{ .Pre }} <span>{{ .Name }}</span></a>
+ </li>
+ <ul class="sub-menu">
+ {{ range .Children }}
+ <li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
+ <a href="{{ .URL }}">{{ .Name }}</a>
+ </li>
+ {{ end }}
+ </ul>
+ {{ else }}
+ <li>
+ <a href="{{ .URL }}">{{ .Pre }} <span>{{ .Name }}</span></a>
+ </li>
+ {{ end }}
+ {{ end }}
+</ul>
--- /dev/null
+{{ if $.Site.Taxonomies.tags }}
+ {{- if not (eq (len $.Site.Taxonomies.tags) 0) -}}
+ {{- $fontUnit := "rem" -}}
+ {{- $largestFontSize := 2.0 -}}
+ {{- $largestFontSize := 2.5 -}}
+ {{- $smallestFontSize := 1.0 -}}
+ {{- $fontSpread := sub $largestFontSize $smallestFontSize -}}
+ {{- $max := add (len (index $.Site.Taxonomies.tags.ByCount 0).Pages) 1 -}}
+ {{- $min := len (index $.Site.Taxonomies.tags.ByCount.Reverse 0).Pages -}}
+ {{- $spread := sub $max $min -}}
+ {{- $fontStep := div $fontSpread $spread -}}
+
+ <div id="tag-cloud">
+ <h3>here we talk about..</h3>
+ {{- range $name, $taxonomy := $.Site.Taxonomies.tags -}}
+ {{- $currentTagCount := len $taxonomy.Pages -}}
+ {{- $currentFontSize := (add $smallestFontSize (mul (sub $currentTagCount $min) $fontStep) ) -}}
+ {{- $count := len $taxonomy.Pages -}}
+ {{- $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) -}}
+ {{- $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) -}}
+ <!--Current font size: {{$currentFontSize}}-->
+ <a class="tag-cloud-link" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" style="font-size:{{$currentFontSize}}{{$fontUnit}}">{{ $name }}</a>
+ {{- end -}}
+ </div>
+ {{- end -}}
+{{- else -}}
+ <div id="tag-cloud">
+ <p>here will appear the tag cloud as soon as we have tags :)</p>
+ </div>
+{{- end -}}
--- /dev/null
+<!DOCTYPE html>
+<html lang="{{ $.Site.LanguageCode | default "en" }}">
+ {{- partial "head.html" . -}}
+ <body class="single-post blog">
+ <div id="blog-post">
+ <a id="top" class="skip-link screen-reader-text" href="#primary">skip to content</a>
+ {{- partial "header.html" . -}}
+ <div id="content" class="site-content">
+ <div id="primary" class="content-area">
+ <main id="main" class="site-main">
+ {{- block "post-main" . }}{{- end }}
+ </main>
+ </div>
+ <div id="secondary" class="related-content">
+ {{- partial "funcs/tags.html" . -}}
+ {{- partial "funcs/categories.html" . -}}
+ </div>
+ </div>
+ {{- partial "footer.html" . -}}
+ </div>
+ </body>
+</html>
--- /dev/null
+{{ define "post-main" }}
+<article class="post">
+ {{ .Content }}
+</article>
+{{ end }}
--- /dev/null
+{{/*
+ * The gravatar shortcode:
+ * All arguments are optional, main ones are mail and size and have a fallback set in place.
+ * Args:
+ * mail: [string] The email address. Falls back to .Site.Params.author_email which should be set in your config file.
+ * size: [int] The size of the fetched image. Defaults to 200 if not set.
+ * class: [string] The class to give to the figure block.
+ * link: [string] The address to link the picture to.
+ * target: [string] Where to open the link. One of "_blank", "_self", "_parent", "_top".
+ * caption: [string] Caption text to show with the image. Supports Markdown.
+ *
+ * Usage:
+ * {{< gravatar mail="some@address.com" size=150 class="some class" link="https://example.com" target="_blank" rel="author" caption="Here's a picture of a dog." >}}
+ *
+ * Output:
+ * <figure class="some class">
+ * <a href="https://example.com" target="_blank" rel="author">
+ * <img src="https://www.gravatar.com/avatar/emailhash?s=150" alt="Here's a picture of a dog." />
+ * </a>
+ * <<figcaption>
+ * <p>
+ * Here's a picture of a dog.
+ * </p>
+ * </figcaption>
+ * </figure>
+ *
+ */}}
+{{- if .Get "mail" -}}
+ {{- $mailaddr := .Get "mail" -}}
+ {{- .Scratch.Set "mailhash" $mailaddr -}}
+{{ else }}
+ {{- .Scratch.Set "mailhash" $.Site.Params.author_email -}}
+{{ end }}
+{{- $hash := .Scratch.Get "mailhash" | lower | md5 -}}
+
+<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
+{{- if .Get "link" -}}
+ <a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
+{{- end }}
+ <img src="https://www.gravatar.com/avatar/{{- $hash -}}?s={{- with .Get "size" }}{{.}}{{ else }}200{{ end }}"
+ {{- if or (.Get "alt") (.Get "caption") }}
+ alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
+ {{- end -}}
+ />
+{{- if .Get "link" -}}
+ </a>
+{{- end }}
+{{- if .Get "caption" -}}
+ <figcaption>
+ <p>
+ {{- .Get "caption" | markdownify -}}
+ </p>
+ </figcaption>
+{{- end }}
+</figure>
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
-name = "Hugo Dagreynix"
+name = "dagreynix"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
description = ""
-homepage = "https://danix.xyz/"
-tags = [minimal]
+homepage = "http://example.com/"
+tags = []
features = []
min_version = "0.41.0"
[author]
- name = "Danilo 'danix' M."
- homepage = "https://danix.xyz"
+ name = ""
+ homepage = ""
+# If porting an existing theme
+[original]
+ name = ""
+ homepage = ""
+ repo = ""