From: danix Date: Mon, 23 Jan 2023 17:58:26 +0000 (+0100) Subject: added all files from previous iterations X-Git-Url: https://git.danix.xyz/?p=theme-danix.xyz.git;a=commitdiff_plain;h=e28a215c266b18d0a3eb7156345f8cdbab3a883b added all files from previous iterations --- diff --git a/LICENSE b/LICENSE index 17993f6..e4483e2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ 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 diff --git a/layouts/404-baseof.html b/layouts/404-baseof.html new file mode 100644 index 0000000..514e43e --- /dev/null +++ b/layouts/404-baseof.html @@ -0,0 +1,22 @@ + + + {{- partial "head.html" . -}} + +
+ + {{- partial "header.html" . -}} +
+
+
+ {{- block "404-main" . }}{{- end }} +
+
+ +
+ {{- partial "footer.html" . -}} +
+ + diff --git a/layouts/404.html b/layouts/404.html index e69de29..e3bac5e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -0,0 +1,7 @@ +{{ define "404-main" }} +
+
+ These aren't the droids you're looking for. +
+
+{{ end }} diff --git a/layouts/blog/baseof.html b/layouts/blog/baseof.html new file mode 100644 index 0000000..8992f73 --- /dev/null +++ b/layouts/blog/baseof.html @@ -0,0 +1,18 @@ + + + {{- partial "head.html" . -}} + +
+ + {{- partial "header.html" . -}} +
+
+
+ {{- block "main" . }}{{- end }} +
+
+
+ {{- partial "footer.html" . -}} +
+ + diff --git a/layouts/blog/list.html b/layouts/blog/list.html new file mode 100644 index 0000000..4a4b1f3 --- /dev/null +++ b/layouts/blog/list.html @@ -0,0 +1,18 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+
+
+ {{ .Content }} +
+
+ +{{ end }} diff --git a/layouts/page/single-baseof.html b/layouts/page/single-baseof.html new file mode 100644 index 0000000..c4b423d --- /dev/null +++ b/layouts/page/single-baseof.html @@ -0,0 +1,18 @@ + + + {{- partial "head.html" . -}} + +
+ + {{- partial "header.html" . -}} +
+
+
+ {{- block "page-main" . }}{{- end }} +
+
+
+ {{- partial "footer.html" . -}} +
+ + diff --git a/layouts/page/single.html b/layouts/page/single.html new file mode 100644 index 0000000..e475272 --- /dev/null +++ b/layouts/page/single.html @@ -0,0 +1,7 @@ +{{ define "page-main" }} +
+
+ {{ .Content }} +
+
+{{ end }} diff --git a/layouts/partials/footer-addition.html b/layouts/partials/footer-addition.html new file mode 100644 index 0000000..d5da406 --- /dev/null +++ b/layouts/partials/footer-addition.html @@ -0,0 +1,4 @@ + +
+ back to top +
diff --git a/layouts/partials/funcs/categories.html b/layouts/partials/funcs/categories.html new file mode 100644 index 0000000..8c32ac9 --- /dev/null +++ b/layouts/partials/funcs/categories.html @@ -0,0 +1,13 @@ +{{ with .Params.categories }} +
+ Published in: + +
+{{ end }} diff --git a/layouts/partials/funcs/datepublish.html b/layouts/partials/funcs/datepublish.html new file mode 100644 index 0000000..235bbe0 --- /dev/null +++ b/layouts/partials/funcs/datepublish.html @@ -0,0 +1,3 @@ +{{ $dateTime := .PublishDate.Format "2006-01-02" }} +{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} + diff --git a/layouts/partials/funcs/favicon.html b/layouts/partials/funcs/favicon.html new file mode 100644 index 0000000..19bc0c3 --- /dev/null +++ b/layouts/partials/funcs/favicon.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/layouts/partials/funcs/social-menu.html b/layouts/partials/funcs/social-menu.html new file mode 100644 index 0000000..15d2d4a --- /dev/null +++ b/layouts/partials/funcs/social-menu.html @@ -0,0 +1,18 @@ +{{ with .Site.Social }} +
+ +
+{{ end }} diff --git a/layouts/partials/funcs/tags.html b/layouts/partials/funcs/tags.html new file mode 100644 index 0000000..d983f86 --- /dev/null +++ b/layouts/partials/funcs/tags.html @@ -0,0 +1,13 @@ +{{ with .Params.tags }} +
+ Tagged: + +
+{{ end }} diff --git a/layouts/partials/funcs/year.html b/layouts/partials/funcs/year.html new file mode 100644 index 0000000..6b40db5 --- /dev/null +++ b/layouts/partials/funcs/year.html @@ -0,0 +1 @@ +{{ now.Format "2006" }} diff --git a/layouts/partials/head-addition.html b/layouts/partials/head-addition.html new file mode 100644 index 0000000..b298b5e --- /dev/null +++ b/layouts/partials/head-addition.html @@ -0,0 +1,10 @@ +{{/* + * Add the featured image to the header if it's present in the Front Matter + */}} +{{ if isset .Params "featured_image" }} + +{{ end }} diff --git a/layouts/partials/home-latest-posts.html b/layouts/partials/home-latest-posts.html new file mode 100644 index 0000000..e3c1375 --- /dev/null +++ b/layouts/partials/home-latest-posts.html @@ -0,0 +1,11 @@ +
+

latest posts

+ {{ range where $.Site.RegularPages.ByLastmod.Reverse "Section" "blog" }} +
+ +
+ {{ end }} +
diff --git a/layouts/partials/main-menu.html b/layouts/partials/main-menu.html new file mode 100644 index 0000000..207d05f --- /dev/null +++ b/layouts/partials/main-menu.html @@ -0,0 +1,21 @@ + diff --git a/layouts/partials/tag-cloud.html b/layouts/partials/tag-cloud.html new file mode 100644 index 0000000..9f7b060 --- /dev/null +++ b/layouts/partials/tag-cloud.html @@ -0,0 +1,30 @@ +{{ 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 -}} + +
+

here we talk about..

+ {{- 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) ) -}} + + {{ $name }} + {{- end -}} +
+ {{- end -}} +{{- else -}} +
+

here will appear the tag cloud as soon as we have tags :)

+
+{{- end -}} diff --git a/layouts/post/single-baseof.html b/layouts/post/single-baseof.html new file mode 100644 index 0000000..10afcb1 --- /dev/null +++ b/layouts/post/single-baseof.html @@ -0,0 +1,22 @@ + + + {{- partial "head.html" . -}} + +
+ + {{- partial "header.html" . -}} +
+
+
+ {{- block "post-main" . }}{{- end }} +
+
+ +
+ {{- partial "footer.html" . -}} +
+ + diff --git a/layouts/post/single.html b/layouts/post/single.html new file mode 100644 index 0000000..87a61c5 --- /dev/null +++ b/layouts/post/single.html @@ -0,0 +1,5 @@ +{{ define "post-main" }} +
+ {{ .Content }} +
+{{ end }} diff --git a/layouts/shortcodes/gravatar.html b/layouts/shortcodes/gravatar.html new file mode 100644 index 0000000..10b15e0 --- /dev/null +++ b/layouts/shortcodes/gravatar.html @@ -0,0 +1,55 @@ +{{/* + * 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: + *
+ * + * <
+ *

+ * Here's a picture of a dog. + *

+ *
+ *
+ * + */}} +{{- 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 -}} + + +{{- if .Get "link" -}} + +{{- end }} + {{ with .Get +{{- if .Get "link" -}} + +{{- end }} +{{- if .Get "caption" -}} +
+

+ {{- .Get "caption" | markdownify -}} +

+
+{{- end }} + diff --git a/static/assets/img/icon.png b/static/assets/img/icon.png new file mode 100644 index 0000000..03da3c9 Binary files /dev/null and b/static/assets/img/icon.png differ diff --git a/theme.toml b/theme.toml index fd0772c..b0115ea 100644 --- a/theme.toml +++ b/theme.toml @@ -1,16 +1,21 @@ # 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 = ""