From 7c40f41e614379bcd994ef55ae0b03aa88f5e01a Mon Sep 17 00:00:00 2001 From: Abyss Date: Fri, 17 Jul 2020 22:18:31 -0400 Subject: [PATCH 01/58] Adjustable footer --- layouts/partials/footer.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 2953aab..b8856db 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -13,8 +13,8 @@ From 14d62b638730ef831663f13c30fdd9d438307e93 Mon Sep 17 00:00:00 2001 From: rishi Date: Sat, 18 Jul 2020 20:26:41 +0530 Subject: [PATCH 02/58] Add Social Icon links --- docs/svgs.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/svgs.md b/docs/svgs.md index e63e9d5..d339941 100644 --- a/docs/svgs.md +++ b/docs/svgs.md @@ -32,15 +32,15 @@ - [reddit](https://simpleicons.org/?q=reddit) - [slack](https://simpleicons.org/?q=slack) - [soundcloud](https://simpleicons.org/?q=soundcloud) -- stackoverflow +- [stackoverflow](https://simpleicons.org/?q=stackoverflow) - [steam](https://simpleicons.org/?q=Steam) -- telegram +- [telegram](https://simpleicons.org/?q=telegram) - [tumblr](https://simpleicons.org/?q=tumblr) -- twitch -- twitter +- [twitch](https://simpleicons.org/?q=twitch) +- [twitter](https://simpleicons.org/?q=twitter) - [whatsapp](https://simpleicons.org/?q=whatsapp) - [xampp](https://simpleicons.org/?q=xampp) - [xing](https://simpleicons.org/?q=xing) - [xmpp](https://simpleicons.org/?q=xmpp) - [ycombinator](https://simpleicons.org/?q=ycombinator) -- youtube +- [youtube](https://simpleicons.org/?q=youtube) From f9ccae8e3fd6a7cd78b0dd19ed924d96ec4c482b Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Fri, 24 Jul 2020 19:09:46 +0200 Subject: [PATCH 03/58] Use relURL for post-cover Use relURL instead of statically adding a / in front of the path. Otherwise, this would give issues with external URLs. Also assumes user would know that a / is added in front of the path, making it relative to the root. --- layouts/_default/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 21bce3b..5275c6b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -24,7 +24,7 @@ {{- end }} {{ with .Params.Cover }} - + {{ end }}
From ec03b2f9e8186c4d4e404885ab8e041df7e92f3b Mon Sep 17 00:00:00 2001 From: polarisfm Date: Sun, 9 Aug 2020 10:28:38 -0500 Subject: [PATCH 04/58] Add social icons for Peertube and generic git --- docs/svgs.md | 2 ++ layouts/partials/svg.html | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/docs/svgs.md b/docs/svgs.md index e63e9d5..1076096 100644 --- a/docs/svgs.md +++ b/docs/svgs.md @@ -11,6 +11,7 @@ - [dribbble](https://simpleicons.org/?q=dribbble) - [email](https://feathericons.com/?query=mail) - [facebook](https://simpleicons.org/?q=facebook) +- git - gitbook - [github](https://feathericons.com/?query=github) - [gitlab](https://feathericons.com/?query=gitlab) @@ -27,6 +28,7 @@ - [mixcloud](https://simpleicons.org/?q=mixcloud) - [linkedin](https://feathericons.com/?query=linked) - [pinterest](https://simpleicons.org/?q=pinterest) +- [peertube](https://simpleicons.org/?q=peertube) - [podcasts-apple](https://simpleicons.org/?q=podcast) - [podcasts-google](https://simpleicons.org/?q=podcast) - [reddit](https://simpleicons.org/?q=reddit) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index c5266b7..afbfaf2 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -20,6 +20,8 @@ {{- else if (eq .name "facebook") -}} +{{- else if (eq .name "git") -}} + {{- else if (eq .name "gitbook") -}} {{- else if (eq .name "github") -}} @@ -54,6 +56,8 @@ {{- else if (eq .name "pinterest") }} +{{- else if (eq .name "peertube") }} + {{- else if (eq .name "podcasts-apple") -}} {{- else if (eq .name "podcasts-google") -}} From 35d298ae55c75c810099ca1badfe27cfdcb9441e Mon Sep 17 00:00:00 2001 From: Ay0 Date: Sun, 9 Aug 2020 21:24:24 +0100 Subject: [PATCH 05/58] added support for a background image on the homepage --- assets/scss/_main.scss | 7 +++++++ exampleSite/config.toml | 3 +++ layouts/_default/baseof.html | 2 ++ layouts/index.html | 6 ++++++ 4 files changed, 18 insertions(+) diff --git a/assets/scss/_main.scss b/assets/scss/_main.scss index f568cc5..580af77 100644 --- a/assets/scss/_main.scss +++ b/assets/scss/_main.scss @@ -330,3 +330,10 @@ hr { text-decoration: none; z-index: 100000; } + +.background-image { + background-repeat: no-repeat; + background-attachment: fixed; + background-size: cover; + background-position: center center; +} \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index da7a50f..07c2c40 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -60,6 +60,9 @@ disableHugoGeneratorInject = false homeSubtitle = "Hello Friend NG" + # Set a background for the homepage + # background_image = "assets/images/background.jpg" + # Prefix of link to the git commit detail page. GitInfo must be enabled. # gitUrl = "" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 007539e..ec42a61 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,7 +4,9 @@ {{ partial "head.html" . }} + {{ block "body" . }} + {{ end }}
{{ partial "header.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 574c689..b7ee112 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,3 +1,9 @@ +{{ define "body" }} + +{{ end }} + {{ define "main" }}
From 9ef27a53b1b01075c6fe8ec84ee2aa235f2ca916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marti=C3=B1o=20Rivera=20Dourado?= Date: Wed, 12 Aug 2020 16:58:49 +0200 Subject: [PATCH 06/58] Add Galician translation and flag --- data/langFlags.yaml | 2 ++ i18n/gl.toml | 36 ++++++++++++++++++++++++++++++++++++ layouts/partials/head.html | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 i18n/gl.toml diff --git a/data/langFlags.yaml b/data/langFlags.yaml index d4d1be7..cda2411 100644 --- a/data/langFlags.yaml +++ b/data/langFlags.yaml @@ -9,3 +9,5 @@ nl: nl pt-br: br ru: ru tr: tr +ml: in +gl: es-ga diff --git a/i18n/gl.toml b/i18n/gl.toml new file mode 100644 index 0000000..21e0e89 --- /dev/null +++ b/i18n/gl.toml @@ -0,0 +1,36 @@ +# Translations for Galician +# https://gohugo.io/content-management/multilingual/#translation-of-strings + +# Generic +# +[translations] +other = "Traducións" + +[postAvailable] +other = "Tamén dispoñible en" + + +# 404.html +# +[archives] +other = "Arquivos" + +[home] +other = "Inicio" + +[notFound] +other = "Vaia, non se atopou a páxina..." + + +# posts/single.html +# +[readingTime] +one = "Un minuto" +other = "{{ .Count }} minutos" + +[tableOfContents] +other = "Táboa de contidos" + +[wordCount] +one = "Unha Palabra" +other = "{{ .Count }} Palabras" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9385125..f02233b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -19,7 +19,7 @@ {{ end }} - {{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }} From 44fe085e8fa6fdac0021f529ef3dcbcaf5f12649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marti=C3=B1o=20Rivera=20Dourado?= Date: Thu, 13 Aug 2020 09:10:42 +0200 Subject: [PATCH 07/58] Add ORCID social icon --- docs/svgs.md | 1 + layouts/partials/svg.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/svgs.md b/docs/svgs.md index e63e9d5..8807930 100644 --- a/docs/svgs.md +++ b/docs/svgs.md @@ -25,6 +25,7 @@ - [matrix](https://simpleicons.org/?q=matrix) - [medium](https://simpleicons.org/?q=medium) - [mixcloud](https://simpleicons.org/?q=mixcloud) +- [orcid](https://simpleicons.org/?q=orcid) - [linkedin](https://feathericons.com/?query=linked) - [pinterest](https://simpleicons.org/?q=pinterest) - [podcasts-apple](https://simpleicons.org/?q=podcast) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index c5266b7..0a13b71 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -52,6 +52,8 @@ {{- else if (eq .name "mixcloud") -}} +{{- else if (eq .name "orcid") -}} + {{- else if (eq .name "pinterest") }} {{- else if (eq .name "podcasts-apple") -}} From 43167f1c86f2720dca72bfbbcd206100dcbd105e Mon Sep 17 00:00:00 2001 From: wrparker Date: Tue, 25 Aug 2020 18:59:02 -0500 Subject: [PATCH 08/58] Add google scholar to social icons. --- docs/svgs.md | 1 + layouts/partials/svg.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/svgs.md b/docs/svgs.md index e63e9d5..51e510d 100644 --- a/docs/svgs.md +++ b/docs/svgs.md @@ -15,6 +15,7 @@ - [github](https://feathericons.com/?query=github) - [gitlab](https://feathericons.com/?query=gitlab) - [goodreads](https://simpleicons.org/?q=goodreads) +- [googlescholar](https://simpleicons.org/?q=googlescholar) - [hackerone](https://simpleicons.org/?q=hackerone) - [hackerrank](https://simpleicons.org/?q=hackerrank) - [instagram](https://feathericons.com/?query=instagram) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index c5266b7..0a44579 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -28,6 +28,8 @@ {{- else if (eq .name "goodreads") -}} +{{- else if (eq .name "googlescholar") -}} + {{- else if (eq .name "gpg") -}} {{- else if (eq .name "hackerone") -}} From 90a80366a1dc7ce983481429174032431c1e23d7 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Wed, 26 Aug 2020 13:49:16 +0200 Subject: [PATCH 09/58] Add LastMod time in article info Add the date of the last modification to the line with the publish date --- layouts/posts/single.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 35899b6..5313009 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -75,6 +75,7 @@ {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .Date.Local }}{{ end }} + {{ if .LastMod }} (Last updated: {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .LastMod.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .LastMod.Local }}){{ end }}

{{- if .GitInfo }} From 1f4f662472bc2d396ddcaf2eb63224d98e89d222 Mon Sep 17 00:00:00 2001 From: Djordje Atlialp Date: Wed, 2 Sep 2020 10:11:31 +0200 Subject: [PATCH 10/58] Add documentation for footer override --- exampleSite/config.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index da7a50f..8a8585f 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -54,6 +54,7 @@ disableHugoGeneratorInject = false dateformNumTime = "2006-01-02 15:04 -0700" # Metadata mostly used in document's head + # description = "Nice theme for homepages and blogs" keywords = "" images = [""] @@ -61,30 +62,44 @@ disableHugoGeneratorInject = false homeSubtitle = "Hello Friend NG" # Prefix of link to the git commit detail page. GitInfo must be enabled. + # # gitUrl = "" # Set disableReadOtherPosts to true in order to hide the links to other posts. + # disableReadOtherPosts = false # Sharing buttons + # # There are a lot of buttons preconfigured. If you want to change them, # generate the buttons here: https://sharingbuttons.io # and add them into your own `layouts/partials/sharing-buttons.html` + # enableSharingButtons = true # Integrate Javascript files or stylesheets by adding the url to the external assets or by # linking local files with their path relative to the static folder, e.g. "css/styles.css" + # customCSS = [] customJS = [] # Toggle this option need to rebuild SCSS, requires extended version of Hugo + # justifyContent = false # Set "text-align: justify" to .post-content. # Default theme "light" or "dark" + # defaultTheme = "dark" themeColor = "#252627" + # Custom footer + # If you want, you can easily override the default footer with your own content. + # + # footerLeft = "Powered by Hugo" + # footerRight = "Made with ❤ by Djordje Atlialp" + # Colors for favicons + # [params.favicon.color] mask = "#252627" msapplication = "#252627" @@ -101,6 +116,7 @@ disableHugoGeneratorInject = false # logoCursorAnimate = "2s" # Uncomment this if you want a portrait on your start page + # # [params.portrait] # path = "/img/image.jpg" # alt = "Portrait" From 0b19d7bb63a019dc1bf794c93e532e3e70e8fa7c Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:47:33 +0000 Subject: [PATCH 11/58] English translation for Last updated --- i18n/en.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/en.toml b/i18n/en.toml index 467981c..03c0444 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -34,3 +34,6 @@ other = "Table of Contents" [wordCount] one = "One Word" other = "{{ .Count }} Words" + +[lastModified] +other = "Last updated" From bb656bf7f24586bf47d8f01d151f475ac5c64729 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:48:46 +0000 Subject: [PATCH 12/58] German translation for Last Updated --- i18n/de.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/de.toml b/i18n/de.toml index 2f0317b..7ef99a2 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -34,3 +34,6 @@ other = "Inhaltsverzeichnis" [wordCount] one = "Ein Wort" other = "{{ .Count }} Wörter" + +[lastModified] +other = "Letzte Aktualisierung" From 59ce0927609e1dfcff9ce73ab55ae962c734c0ea Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:49:36 +0000 Subject: [PATCH 13/58] Spanish translation for Last Updated --- i18n/es.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/es.toml b/i18n/es.toml index 1643ec7..1dce9bb 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -34,3 +34,6 @@ other = "Tabla de Contenido" [wordCount] one = "Una Palabra" other = "{{ .Count }} Palabras" + +[lastModified] +other = "Ultima actualización" From 88ad6b5062f3c5a9555c853b63248cc4d85cfba6 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:50:16 +0000 Subject: [PATCH 14/58] French translation Last Updated --- i18n/fr.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/fr.toml b/i18n/fr.toml index 9ea342e..1ba6fe9 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -34,3 +34,6 @@ other = "Table des matières" [wordCount] one = "Un Mot" other = "{{ .Count }} Mots" + +[lastModified] +other = "Mise à jour" From 1a4df7058f4b9c20c177b54af88f5ab41ccf4bf6 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:51:36 +0000 Subject: [PATCH 15/58] Last Updated --- i18n/hi.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i18n/hi.toml b/i18n/hi.toml index aa84bf9..6486c73 100644 --- a/i18n/hi.toml +++ b/i18n/hi.toml @@ -33,4 +33,7 @@ other = "अनुक्रमणिका" [wordCount] one = "एक शब्द" -other = "{{ .Count }} शब्द" \ No newline at end of file +other = "{{ .Count }} शब्द" + +[lastModified] +other = "आखरी अपडेट" From b77f822736e1550e8a9433898c6f1ef4ef76401a Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:52:26 +0000 Subject: [PATCH 16/58] Last updated --- i18n/it.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/it.toml b/i18n/it.toml index 6a730e9..f78a5a0 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -34,3 +34,6 @@ other = "Contenuti" [wordCount] one = "Una parola" other = "{{ .Count }} parole" + +[lastModified] +other = "Ultimo aggiornamento" From f0f5525a73d66d8b357c99889ff39efb4a5d9e5a Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:54:37 +0000 Subject: [PATCH 17/58] Last updated - translation needed --- i18n/lmo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/lmo.toml b/i18n/lmo.toml index 64d6a97..7616dda 100644 --- a/i18n/lmo.toml +++ b/i18n/lmo.toml @@ -34,3 +34,6 @@ other = "Contegnuu" [wordCount] one = "Ona parolla" other = "{{ .Count }} paroll" + +[lastModified] +other = "Last update" From 207c1f0fa0d95ca31eb91408e011d3b63f2693d8 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:55:47 +0000 Subject: [PATCH 18/58] Last updated --- i18n/ml.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/ml.toml b/i18n/ml.toml index 0eea4f6..a6aa087 100644 --- a/i18n/ml.toml +++ b/i18n/ml.toml @@ -34,3 +34,6 @@ other = "ഉള്ളടക്ക പട്ടിക" [wordCount] one = "ഒരു വാക്ക്" other = "{{ .Count }} വാക്കുകൾ" + +[lastModified] +other = "അവസാനമായി പുതുക്കിയത്" From b698dd03c9dff38d0535b89392304173c6b17b3c Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:56:26 +0000 Subject: [PATCH 19/58] Last updated --- i18n/pt-br.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i18n/pt-br.toml b/i18n/pt-br.toml index 25a6f6c..b53cbcc 100644 --- a/i18n/pt-br.toml +++ b/i18n/pt-br.toml @@ -33,4 +33,7 @@ other = "Índice" [wordCount] one = "Uma Palavra" -other = "{{ .Count }} Palavras" \ No newline at end of file +other = "{{ .Count }} Palavras" + +[lastModified] +other = "Última actualização" From 3510b3d019d5506cadb57979a0a17ef5b5afd419 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:57:21 +0000 Subject: [PATCH 20/58] Last updated --- i18n/ru.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/ru.toml b/i18n/ru.toml index 2b75f94..2f16ec4 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -38,3 +38,6 @@ one = "{{ .Count }} слово" few = "{{ .Count }} слова" many = "{{ .Count }} слов" other = "{{ .Count }} слов" + +[lastModified] +other = "Последнее обновление" From 25e2e72bad7f7bdfe8c11ef9d46d85d817bc4891 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 19:58:00 +0000 Subject: [PATCH 21/58] Last updated --- i18n/tr.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/tr.toml b/i18n/tr.toml index 4b50e98..df7af32 100644 --- a/i18n/tr.toml +++ b/i18n/tr.toml @@ -34,3 +34,6 @@ other = "İçindekiler" [wordCount] one = "One Kelime" other = "{{ .Count }} Kelime" + +[lastModified] +other = "Son güncelleme" From 29023e89f950291bd8f299a70f7b7889c1eda191 Mon Sep 17 00:00:00 2001 From: TheGroundZero <2406013+TheGroundZero@users.noreply.github.com> Date: Sat, 5 Sep 2020 20:01:49 +0000 Subject: [PATCH 22/58] Use translated "Last updated" --- layouts/posts/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 5313009..b6c0c3d 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -75,7 +75,7 @@ {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .Date.Local }}{{ end }} - {{ if .LastMod }} (Last updated: {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .LastMod.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .LastMod.Local }}){{ end }} + {{ if .LastMod }} ({{ i18n "lastModified" }}: {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .LastMod.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .LastMod.Local }}){{ end }}

{{- if .GitInfo }} From 96057eb09d2cff605b6974457cff170abd95b91d Mon Sep 17 00:00:00 2001 From: Djordje Atlialp Date: Sun, 6 Sep 2020 09:56:00 +0200 Subject: [PATCH 23/58] Fix last mod date --- layouts/posts/single.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/layouts/posts/single.html b/layouts/posts/single.html index b6c0c3d..631bb36 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -74,8 +74,21 @@ - {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .Date.Local }}{{ end }} - {{ if .LastMod }} ({{ i18n "lastModified" }}: {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .LastMod.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .LastMod.Local }}){{ end }} + {{ if .Site.Params.dateformNumTime }} + {{ dateFormat .Site.Params.dateformNumTime .Date.Local }} + {{ else }} + {{ dateFormat "2006-01-02 15:04" .Date.Local }} + {{ end }} + + {{ if .Lastmod }} + {{ if not (eq .Lastmod .Date )}} + {{ if .Site.Params.dateformNumTime }} + ({{ i18n "lastModified" }}: {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local }}) + {{ else }} + ({{ i18n "lastModified" }}: {{ dateFormat "2006-01-02 15:04" .Lastmod.Local }}) + {{ end }} + {{ end }} + {{ end }}

{{- if .GitInfo }} From e3402457805c0df65b96833f15579c4153c17700 Mon Sep 17 00:00:00 2001 From: Djordje Atlialp Date: Sun, 6 Sep 2020 10:59:11 +0200 Subject: [PATCH 24/58] Display categories in posts --- README.md | 2 +- exampleSite/config.toml | 2 +- layouts/_default/single.html | 14 ++++---------- layouts/partials/categories.html | 9 +++++++++ layouts/partials/tags.html | 9 +++++++++ layouts/posts/single.html | 14 ++------------ 6 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 layouts/partials/categories.html create mode 100644 layouts/partials/tags.html diff --git a/README.md b/README.md index 6437df9..812599b 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ paginate = 10 dateform = "Jan 2, 2006" dateformShort = "Jan 2" dateformNum = "2006-01-02" - dateformNumTime = "2006-01-02 15:04 -0700" + dateformNumTime = "2006-01-02 15:04" # Subtitle for home homeSubtitle = "A simple and beautiful blog" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8a8585f..9de6227 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -51,7 +51,7 @@ disableHugoGeneratorInject = false dateform = "Jan 2, 2006" dateformShort = "Jan 2" dateformNum = "2006-01-02" - dateformNumTime = "2006-01-02 15:04 -0700" + dateformNumTime = "2006-01-02 15:04" # Metadata mostly used in document's head # diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5275c6b..c5c04c0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,14 +14,14 @@

{{ .Title | markdownify }}

- {{- if .Params.toc }} + {{ if .Params.toc }}

- {{- end }} + {{ end }} {{ with .Params.Cover }} @@ -35,14 +35,8 @@
{{ end }} From 79d0488087e845de80d35b099b968737d83fc8c7 Mon Sep 17 00:00:00 2001 From: Djordje Atlialp Date: Thu, 14 Jan 2021 10:55:00 +0100 Subject: [PATCH 56/58] Add automatic dark/light theme switching based on os --- README.md | 7 ++----- assets/js/theme.js | 27 --------------------------- assets/scss/_buttons.scss | 8 +++----- assets/scss/_header.scss | 6 +++--- assets/scss/_list.scss | 2 +- assets/scss/_main.scss | 10 +++++----- assets/scss/_menu.scss | 8 +++----- assets/scss/_single.scss | 4 ++-- assets/scss/_tables.scss | 7 ++++--- assets/scss/_variables.scss | 2 ++ exampleSite/config.toml | 5 ----- layouts/_default/baseof.html | 2 +- layouts/index.html | 2 +- layouts/partials/header.html | 2 -- layouts/partials/javascript.html | 3 +-- layouts/partials/theme-icon.html | 5 ----- 16 files changed, 28 insertions(+), 72 deletions(-) delete mode 100644 assets/js/theme.js delete mode 100644 layouts/partials/theme-icon.html diff --git a/README.md b/README.md index ea04599..ea8d3b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Hello Friend NG -![Hello Friend NG](https://dsh.re/2bd45) +![Hello Friend NG](https://dsh.re/d914c) ## General informations @@ -27,7 +27,7 @@ This theme was highly inspired by the [hello-friend](https://github.com/panr/hug --- ## Features -- Theming: **dark/light mode**, depending on your preferences (dark is default, but you can change it) +- Theming: **dark/light mode**, depending on your system preferences - Great reading experience thanks to [**Inter UI font**](https://rsms.me/inter/), made by [Rasmus Andersson](https://rsms.me/about/) - Nice code highlighting thanks to [**PrismJS**](https://prismjs.com) - An easy way to modify the theme with Hugo tooling @@ -86,9 +86,6 @@ paginate = 10 keywords = "homepage, blog" images = [""] - # Default theme "light" or "dark" - defaultTheme = "dark" - [taxonomies] category = "blog" tag = "tags" diff --git a/assets/js/theme.js b/assets/js/theme.js deleted file mode 100644 index 699baf6..0000000 --- a/assets/js/theme.js +++ /dev/null @@ -1,27 +0,0 @@ -// Toggle theme - -const theme = window.localStorage && window.localStorage.getItem("theme"); -const themeToggle = document.querySelector(".theme-toggle"); -const isDark = theme === "dark"; -var metaThemeColor = document.querySelector("meta[name=theme-color]"); - -if (theme !== null) { - document.body.classList.toggle("dark-theme", isDark); - isDark - ? metaThemeColor.setAttribute("content", "#1b1c1d") - : metaThemeColor.setAttribute("content", "#fafafa"); -} - -themeToggle.addEventListener("click", () => { - document.body.classList.toggle("dark-theme"); - - window.localStorage && - window.localStorage.setItem( - "theme", - document.body.classList.contains("dark-theme") ? "dark" : "light" - ); - - document.body.classList.contains("dark-theme") - ? metaThemeColor.setAttribute("content", "#1b1c1d") - : metaThemeColor.setAttribute("content", "#fafafa"); -}); diff --git a/assets/scss/_buttons.scss b/assets/scss/_buttons.scss index 32a086f..73e72a4 100644 --- a/assets/scss/_buttons.scss +++ b/assets/scss/_buttons.scss @@ -23,20 +23,18 @@ a.button { cursor: pointer; outline: none; - .dark-theme & { + @media (prefers-color-scheme: dark) { background: $dark-background-secondary; color: inherit; } - /* variants */ - &.outline { background: transparent; border-color: $light-background-secondary; box-shadow: none; padding: 8px 18px; - .dark-theme & { + @media (prefers-color-scheme: dark) { border-color: $dark-background-secondary; color: inherit; } @@ -91,7 +89,7 @@ a.button { cursor: pointer; outline: none; - .dark-theme & { + @media (prefers-color-scheme: dark) { background: $dark-background-secondary; color: inherit; } diff --git a/assets/scss/_header.scss b/assets/scss/_header.scss index 358db39..fe0af42 100644 --- a/assets/scss/_header.scss +++ b/assets/scss/_header.scss @@ -1,13 +1,13 @@ .header { - background: #fafafa; + background: $light-background-header; display: flex; align-items: center; justify-content: center; position: relative; padding: 20px; - .dark-theme & { - background: #1b1c1d; + @media (prefers-color-scheme: dark) { + background: $dark-background-header; } &__right { diff --git a/assets/scss/_list.scss b/assets/scss/_list.scss index 2be9738..c77b0f9 100644 --- a/assets/scss/_list.scss +++ b/assets/scss/_list.scss @@ -12,7 +12,7 @@ &:not(:last-of-type) { border-bottom: 1px solid $light-border-color; - .dark-theme & { + @media (prefers-color-scheme: dark) { border-color: $dark-border-color; } } diff --git a/assets/scss/_main.scss b/assets/scss/_main.scss index e1c51a3..e59a4d5 100644 --- a/assets/scss/_main.scss +++ b/assets/scss/_main.scss @@ -35,7 +35,7 @@ body { font-size: 1rem; } - &.dark-theme { + @media (prefers-color-scheme: dark) { background-color: $dark-background; color: $dark-color; } @@ -175,7 +175,7 @@ figure { em, i, strong { color: black; - .dark-theme & { + @media (prefers-color-scheme: dark) { color: white; } } @@ -190,7 +190,7 @@ code { border-radius: 5px; font-size: 0.95rem; - .dark-theme & { + @media (prefers-color-scheme: dark) { background: $dark-background-secondary; } } @@ -214,7 +214,7 @@ pre { padding: 0; font-size: inherit; - .dark-theme & { + @media (prefers-color-scheme: dark) { color: inherit; } } @@ -290,7 +290,7 @@ hr { background: $light-border-color; height: 1px; - .dark-theme & { + @media (prefers-color-scheme: dark) { background: $dark-border-color; } } diff --git a/assets/scss/_menu.scss b/assets/scss/_menu.scss index 17ba5ae..5fc75fb 100644 --- a/assets/scss/_menu.scss +++ b/assets/scss/_menu.scss @@ -1,11 +1,9 @@ .menu { - background: #fafafa; - border-right: 1px solid; - margin-right: 18px; + background: $light-background-header; z-index: 9999; - .dark-theme & { - background: #1b1c1d; + @media (prefers-color-scheme: dark) { + background: $dark-background-header; } @media #{$media-size-phone} { diff --git a/assets/scss/_single.scss b/assets/scss/_single.scss index 5efb20d..dd478a9 100644 --- a/assets/scss/_single.scss +++ b/assets/scss/_single.scss @@ -118,7 +118,7 @@ letter-spacing: 0.1em; z-index: 1; - .dark-theme & { + @media (prefers-color-scheme: dark) { background: $dark-background; color: $dark-color-secondary; } @@ -160,7 +160,7 @@ cursor: pointer; appearance: none; - .dark-theme & { + @media (prefers-color-scheme: dark) { background: $dark-background-secondary; } diff --git a/assets/scss/_tables.scss b/assets/scss/_tables.scss index c7a398e..986ee41 100644 --- a/assets/scss/_tables.scss +++ b/assets/scss/_tables.scss @@ -11,7 +11,7 @@ padding: 12px 15px; border: 1px solid $light-table-color; - .dark-theme & { + @media (prefers-color-scheme: dark) { border: 1px solid $dark-table-color; } } @@ -22,7 +22,7 @@ color: $light-color; text-align: left; - .dark-theme & { + @media (prefers-color-scheme: dark) { background-color: $dark-table-color; color: $dark-color; } @@ -32,7 +32,8 @@ tbody { tr { border: 1px solid $light-table-color; - .dark-theme & { + + @media (prefers-color-scheme: dark) { border: 1px solid $dark-table-color; } } diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss index 4d5ef44..c1367cd 100644 --- a/assets/scss/_variables.scss +++ b/assets/scss/_variables.scss @@ -3,6 +3,7 @@ /* Light theme color */ $light-background: #fff; $light-background-secondary: #eaeaea; +$light-background-header: #fafafa; $light-color: #222; $light-color-secondary: #999; $light-border-color: #dcdcdc; @@ -11,6 +12,7 @@ $light-table-color: #dcdcdc; /* Dark theme colors */ $dark-background: #232425; $dark-background-secondary: #3b3d42; +$dark-background-header: #1b1c1d; $dark-color: #a9a9b3; $dark-color-secondary: #b3b3bd; $dark-border-color: #4e4e57; diff --git a/exampleSite/config.toml b/exampleSite/config.toml index aebf2f4..c64cbfc 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -100,11 +100,6 @@ disableHugoGeneratorInject = false # justifyContent = false # Set "text-align: justify" to .post-content. - # Default theme "light" or "dark" - # - defaultTheme = "dark" - themeColor = "#1b1c1d" - # Custom footer # If you want, you can easily override the default footer with your own content. # diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 4f6d2e5..2c80de9 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,7 +5,7 @@ {{ block "body" . }} - + {{ end }}
diff --git a/layouts/index.html b/layouts/index.html index a9399d6..a81639f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ {{ define "body" }} - + {{ end }} {{ define "main" }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 74b1631..b77a7fb 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,8 +12,6 @@ {{ end }} - - {{ partial "theme-icon.html" . }} diff --git a/layouts/partials/javascript.html b/layouts/partials/javascript.html index 02bdd8d..7b5f3a0 100644 --- a/layouts/partials/javascript.html +++ b/layouts/partials/javascript.html @@ -1,8 +1,7 @@ {{ $main := resources.Get "js/main.js" }} {{ $menu := resources.Get "js/menu.js" }} {{ $prism := resources.Get "js/prism.js" }} -{{ $theme := resources.Get "js/theme.js" }} -{{ $secureJS := slice $main $menu $prism $theme | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }} +{{ $secureJS := slice $main $menu $prism | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }} {{- if .Site.GoogleAnalytics }} diff --git a/layouts/partials/theme-icon.html b/layouts/partials/theme-icon.html deleted file mode 100644 index c72a3fc..0000000 --- a/layouts/partials/theme-icon.html +++ /dev/null @@ -1,5 +0,0 @@ - - - From 0caf93bb5692b503d7373acf80135de99b1c5b57 Mon Sep 17 00:00:00 2001 From: Djordje Atlialp Date: Thu, 14 Jan 2021 10:57:31 +0100 Subject: [PATCH 57/58] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ea8d3b7..451d223 100644 --- a/README.md +++ b/README.md @@ -137,8 +137,6 @@ Example: ### Code highlighting -Supported languages: [Take a look here](https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+abap+actionscript+ada+apacheconf+apl+applescript+c+arff+asciidoc+asm6502+csharp+autohotkey+autoit+bash+basic+batch+bison+brainfuck+bro+cpp+aspnet+arduino+cil+coffeescript+clojure+ruby+csp+css-extras+d+dart+diff+markup-templating+docker+eiffel+elixir+elm+lua+erb+erlang+fsharp+flow+fortran+gcode+gedcom+gherkin+git+glsl+gml+go+graphql+groovy+less+handlebars+haskell+haxe+hcl+http+hpkp+hsts+ichigojam+icon+inform7+ini+io+j+java+scala+php+javastacktrace+jolie+n4js+markdown+json+julia+keyman+kotlin+latex+crystal+scheme+liquid+lisp+livescript+lolcode+makefile+django+matlab+mel+mizar+monkey+n1ql+typescript+nand2tetris-hdl+nasm+nginx+nim+nix+nsis+objectivec+ocaml+opencl+oz+parigp+parser+pascal+perl+php-extras+sql+powershell+processing+prolog+properties+protobuf+scss+puppet+pure+python+q+qore+r+jsx+renpy+reason+vala+rest+rip+roboconf+textile+rust+plsql+sass+stylus+smalltalk+smarty+soy+sas+twig+swift+yaml+tcl+haml+toml+tt2+pug+tsx+visual-basic+vbnet+velocity+verilog+vhdl+vim+wasm+wiki+xeora+xojo+xquery+tap) - By default the theme is using PrismJS to color your code syntax. All you need to do is to wrap you code like this:
@@ -181,6 +179,6 @@ If you like my work and if you think this project is worth to support it, just <
 
 ## Licence
 
-Copyright © 2019-2020 Djordje Atlialp
+Copyright © 2019-2021 Djordje Atlialp
 
 The theme is released under the MIT License. Check the [original theme license](https://github.com/rhazdon/hugo-theme-hello-friend-ng/blob/master/LICENSE.md) for additional licensing information.

From 723b15afbb13b6776ba8574c5fc21d04648a67b2 Mon Sep 17 00:00:00 2001
From: Djordje Atlialp 
Date: Fri, 15 Jan 2021 08:45:39 +0100
Subject: [PATCH 58/58] Update commento params

---
 exampleSite/config.toml   | 21 +++++++++++----------
 layouts/posts/single.html |  4 ++--
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index c64cbfc..46394ad 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -86,16 +86,6 @@ disableHugoGeneratorInject = false
   customCSS = []
   customJS  = []
 
-  # Commento is more than just a comments widget you can embed — 
-  # it’s a return to the roots of the internet. 
-  # An internet without the tracking and invasions of privacy. 
-  # An internet that is simple and lightweight. 
-  # An internet that is focused on interesting discussions, not ads. 
-  # A better internet.
-  # Uncomment this to enable Commento.
-  # 
-  # commentoUrl = ""
-
   # Toggle this option need to rebuild SCSS, requires extended version of Hugo
   #
   justifyContent = false  # Set "text-align: justify" to .post-content.
@@ -124,6 +114,17 @@ disableHugoGeneratorInject = false
     # Set to a valid CSS time value to change the animation duration, "0s" to disable.
     # logoCursorAnimate  = "2s"
 
+  # Commento is more than just a comments widget you can embed — 
+  # it’s a return to the roots of the internet. 
+  # An internet without the tracking and invasions of privacy. 
+  # An internet that is simple and lightweight. 
+  # An internet that is focused on interesting discussions, not ads. 
+  # A better internet.
+  # Uncomment this to enable Commento.
+  #
+  # [params.commento]
+  #   url = ""
+
   # Uncomment this if you want a portrait on your start page
   #
   # [params.portrait]
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index 88605f0..f75f83b 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -150,8 +150,8 @@
       {{ end }}
     {{ end }}
 
-    {{ if .Site.Params.CommentoUrl }}
-      
+    {{ if .Site.Params.Commento.Url }}
+      
       
{{ end }}