From 249f18d853eddc3733e7ad14a74da4f9df6796ab Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Sun, 30 May 2021 18:20:35 +0600 Subject: [PATCH 01/40] Add OpenGraph Headers Signed-off-by: hossainemruz --- layouts/_default/baseof.html | 1 + layouts/index.html | 1 + layouts/partials/opengraph.html | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 layouts/partials/opengraph.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f733092..5d4ec9f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,6 +4,7 @@ {{ .Page.Title }} {{- partial "header.html" . -}} + {{ template "_internal/opengraph.html" . }} {{ block "header" . }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 9a5d5dd..9b03e5a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,6 +13,7 @@ {{- partial "header.html" . -}} + {{- partial "opengraph.html" . -}} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 0000000..3559eea --- /dev/null +++ b/layouts/partials/opengraph.html @@ -0,0 +1,12 @@ +{{ $title := (index site.Data site.Language.Lang).site.openGraph.title | default site.Title }} +{{ $type := (index site.Data site.Language.Lang).site.openGraph.type | default "website" }} +{{ $description := (index site.Data site.Language.Lang).site.openGraph.description | default (index site.Data site.Language.Lang).site.description }} +{{ $image := (index site.Data site.Language.Lang).site.openGraph.image | default (index site.Data site.Language.Lang).author.image }} +{{ $url := (index site.Data site.Language.Lang).site.openGraph.url | default site.BaseURL }} + + + + + + + From e7cc9bcbe89369093187f9792ef1f09085414358 Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Sun, 30 May 2021 18:23:56 +0600 Subject: [PATCH 02/40] Revert "Add OpenGraph Headers" This reverts commit 249f18d853eddc3733e7ad14a74da4f9df6796ab. Signed-off-by: hossainemruz --- layouts/_default/baseof.html | 1 - layouts/index.html | 1 - layouts/partials/opengraph.html | 12 ------------ 3 files changed, 14 deletions(-) delete mode 100644 layouts/partials/opengraph.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5d4ec9f..f733092 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,7 +4,6 @@ {{ .Page.Title }} {{- partial "header.html" . -}} - {{ template "_internal/opengraph.html" . }} {{ block "header" . }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 9b03e5a..9a5d5dd 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,7 +13,6 @@ {{- partial "header.html" . -}} - {{- partial "opengraph.html" . -}} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html deleted file mode 100644 index 3559eea..0000000 --- a/layouts/partials/opengraph.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ $title := (index site.Data site.Language.Lang).site.openGraph.title | default site.Title }} -{{ $type := (index site.Data site.Language.Lang).site.openGraph.type | default "website" }} -{{ $description := (index site.Data site.Language.Lang).site.openGraph.description | default (index site.Data site.Language.Lang).site.description }} -{{ $image := (index site.Data site.Language.Lang).site.openGraph.image | default (index site.Data site.Language.Lang).author.image }} -{{ $url := (index site.Data site.Language.Lang).site.openGraph.url | default site.BaseURL }} - - - - - - - From 0884fb6fc6fe725ce19464562262d459be15defb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 May 2021 12:24:54 +0000 Subject: [PATCH 03/40] Update and run autoprefixer (#331) Co-authored-by: hossainemruz Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- package-lock.json | 67 +++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 42 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index e771383..721a6cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "1.0.0", "license": "MIT", "devDependencies": { - "autoprefixer": "^10.2.5", + "autoprefixer": "^10.2.6", "postcss": "^8.3.0", "postcss-cli": "^8.3.1" } @@ -195,15 +195,15 @@ } }, "node_modules/autoprefixer": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.5.tgz", - "integrity": "sha512-7H4AJZXvSsn62SqZyJCP+1AWwOuoYpUfK6ot9vm0e87XD6mT8lDywc9D9OTJPMULyGcvmIxzTAMeG2Cc+YX+fA==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.6.tgz", + "integrity": "sha512-8lChSmdU6dCNMCQopIf4Pe5kipkAGj/fvTMslCsih0uHpOrXOPUEVOmYMMqmw3cekQkSD7EhIeuYl5y0BLdKqg==", "dev": true, "dependencies": { - "browserslist": "^4.16.3", - "caniuse-lite": "^1.0.30001196", + "browserslist": "^4.16.6", + "caniuse-lite": "^1.0.30001230", "colorette": "^1.2.2", - "fraction.js": "^4.0.13", + "fraction.js": "^4.1.1", "normalize-range": "^0.1.2", "postcss-value-parser": "^4.1.0" }, @@ -212,6 +212,13 @@ }, "engines": { "node": "^10 || ^12 || >=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.1.0" } }, "node_modules/binary-extensions": { @@ -264,10 +271,14 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001228", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz", - "integrity": "sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==", - "dev": true + "version": "1.0.30001230", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz", + "integrity": "sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } }, "node_modules/chalk": { "version": "4.1.1", @@ -453,12 +464,16 @@ } }, "node_modules/fraction.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.0.tgz", - "integrity": "sha512-o9lSKpK0TDqDwTL24Hxqi6I99s942l6TYkfl6WvGWgLOIFz/YonSGKfiSeMadoiNvTfqnfOa9mjb5SGVbBK9/w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz", + "integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==", "dev": true, "engines": { "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" } }, "node_modules/fs-extra": { @@ -1272,15 +1287,15 @@ "dev": true }, "autoprefixer": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.5.tgz", - "integrity": "sha512-7H4AJZXvSsn62SqZyJCP+1AWwOuoYpUfK6ot9vm0e87XD6mT8lDywc9D9OTJPMULyGcvmIxzTAMeG2Cc+YX+fA==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.6.tgz", + "integrity": "sha512-8lChSmdU6dCNMCQopIf4Pe5kipkAGj/fvTMslCsih0uHpOrXOPUEVOmYMMqmw3cekQkSD7EhIeuYl5y0BLdKqg==", "dev": true, "requires": { - "browserslist": "^4.16.3", - "caniuse-lite": "^1.0.30001196", + "browserslist": "^4.16.6", + "caniuse-lite": "^1.0.30001230", "colorette": "^1.2.2", - "fraction.js": "^4.0.13", + "fraction.js": "^4.1.1", "normalize-range": "^0.1.2", "postcss-value-parser": "^4.1.0" } @@ -1320,9 +1335,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001228", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz", - "integrity": "sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==", + "version": "1.0.30001230", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz", + "integrity": "sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==", "dev": true }, "chalk": { @@ -1477,9 +1492,9 @@ } }, "fraction.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.0.tgz", - "integrity": "sha512-o9lSKpK0TDqDwTL24Hxqi6I99s942l6TYkfl6WvGWgLOIFz/YonSGKfiSeMadoiNvTfqnfOa9mjb5SGVbBK9/w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz", + "integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==", "dev": true }, "fs-extra": { diff --git a/package.json b/package.json index fe4210d..e07943b 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "homepage": "https://github.com/hossainemruz/toha#readme", "devDependencies": { - "autoprefixer": "^10.2.5", + "autoprefixer": "^10.2.6", "postcss": "^8.3.0", "postcss-cli": "^8.3.1" } From d9df1053e19d3a3c3fcd0babd12b2306cb919cc0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 May 2021 12:25:48 +0000 Subject: [PATCH 04/40] Update and run autoprefixer (#332) Co-authored-by: hossainemruz Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> From 4a0aa4758ad5ed0dedd0c3c818d3818b76eff16f Mon Sep 17 00:00:00 2001 From: Emruz Hossain Date: Sun, 30 May 2021 18:32:00 +0600 Subject: [PATCH 05/40] Add OpenGraph Headers (#333) Signed-off-by: hossainemruz --- layouts/_default/baseof.html | 1 + layouts/index.html | 1 + layouts/partials/opengraph.html | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 layouts/partials/opengraph.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f733092..5d4ec9f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,6 +4,7 @@ {{ .Page.Title }} {{- partial "header.html" . -}} + {{ template "_internal/opengraph.html" . }} {{ block "header" . }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 9a5d5dd..9b03e5a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,6 +13,7 @@ {{- partial "header.html" . -}} + {{- partial "opengraph.html" . -}} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 0000000..3559eea --- /dev/null +++ b/layouts/partials/opengraph.html @@ -0,0 +1,12 @@ +{{ $title := (index site.Data site.Language.Lang).site.openGraph.title | default site.Title }} +{{ $type := (index site.Data site.Language.Lang).site.openGraph.type | default "website" }} +{{ $description := (index site.Data site.Language.Lang).site.openGraph.description | default (index site.Data site.Language.Lang).site.description }} +{{ $image := (index site.Data site.Language.Lang).site.openGraph.image | default (index site.Data site.Language.Lang).author.image }} +{{ $url := (index site.Data site.Language.Lang).site.openGraph.url | default site.BaseURL }} + + + + + + + From e86f574acacacc5e4186a00598d4fbc6af7f7278 Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Sun, 30 May 2021 18:43:27 +0600 Subject: [PATCH 06/40] Use absURL for image in OpenGraph header Signed-off-by: hossainemruz --- layouts/partials/opengraph.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index 3559eea..808c26c 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -8,5 +8,5 @@ - + From 892fe83255c2ea775c99e60482dfdeea7919da85 Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Sun, 30 May 2021 18:49:06 +0600 Subject: [PATCH 07/40] Use absURL for image in OpenGraph header Signed-off-by: hossainemruz --- layouts/partials/opengraph.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index 808c26c..2163e49 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -8,5 +8,5 @@ - + From 6f8280a65678cd7811e1bd46098da5b6cdf94497 Mon Sep 17 00:00:00 2001 From: Emruz Hossain Date: Tue, 1 Jun 2021 22:54:45 +0600 Subject: [PATCH 08/40] Fix importing user CSS (#338) Signed-off-by: hossainemruz --- layouts/_default/list.html | 3 +++ layouts/_default/search.html | 3 +++ layouts/_default/single.html | 3 +++ layouts/index.html | 3 +++ layouts/partials/header.html | 4 ---- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1e8ac50..8367014 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,9 @@ {{ define "header" }} + + + {{ end }} {{ define "navbar" }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html index e4f7414..42620da 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -1,6 +1,9 @@ {{ define "header" }} + + + {{ end }} {{ define "navbar" }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 907818d..7c57187 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,6 +6,9 @@ /> + + + {{ end }} {{ define "navbar" }} diff --git a/layouts/index.html b/layouts/index.html index 9b03e5a..a688a82 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -25,6 +25,9 @@ + + + {{ if site.GoogleAnalytics }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f979cd4..a762817 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -20,7 +20,6 @@ - @@ -31,6 +30,3 @@ - - - From b5fe77f8766032629ec72e5544d057b9c443e81f Mon Sep 17 00:00:00 2001 From: Kaligule Date: Wed, 2 Jun 2021 13:22:48 +0200 Subject: [PATCH 09/40] Fix typo in comment (#335) Co-authored-by: Emruz Hossain --- layouts/partials/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a762817..2d126b6 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -28,5 +28,5 @@ - + From 3421c99ebfd73dd40e4fe73ea0e279e0d2ba3a8d Mon Sep 17 00:00:00 2001 From: vlebert <49779177+vlebert@users.noreply.github.com> Date: Thu, 3 Jun 2021 12:09:08 +0200 Subject: [PATCH 10/40] Fix `ressource.Fit` not resizing the image properly Co-authored-by: vlebert --- layouts/partials/cards/project.html | 2 +- layouts/partials/cards/skill.html | 2 +- layouts/partials/helpers/get-author-image.html | 2 +- layouts/partials/sections/home.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/cards/project.html b/layouts/partials/cards/project.html index 93d022d..77cd395 100644 --- a/layouts/partials/cards/project.html +++ b/layouts/partials/cards/project.html @@ -11,7 +11,7 @@ {{ $logoImage:= resources.Get .logo}} {{ if $logoImage }} - {{ $logoImage := $logoImage.Fit "24x24" }} + {{ $logoImage = $logoImage.Fit "24x24" }} {{ .name }} {{ end }} diff --git a/layouts/partials/cards/skill.html b/layouts/partials/cards/skill.html index 1cf229f..cba5529 100644 --- a/layouts/partials/cards/skill.html +++ b/layouts/partials/cards/skill.html @@ -7,7 +7,7 @@ {{/* svg don't support "Fit" operation */}} {{ if ne $logoImage.MediaType.SubType "svg" }} - {{ $logoImage := $logoImage.Fit "24x24" }} + {{ $logoImage = $logoImage.Fit "24x24" }} {{ end }} {{ .name }} diff --git a/layouts/partials/helpers/get-author-image.html b/layouts/partials/helpers/get-author-image.html index 439bafc..914a5ed 100644 --- a/layouts/partials/helpers/get-author-image.html +++ b/layouts/partials/helpers/get-author-image.html @@ -21,7 +21,7 @@ {{/* apply image processing. don't use "Fit" in svg because its not supported */}} {{ $authorImage:= resources.Get $authorImage}} {{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }} - {{ $authorImage := $authorImage.Fit "120x120" }} + {{ $authorImage = $authorImage.Fit "120x120" }} {{ end }} {{/* return the author image link */}} diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index 6ab4cba..4420c85 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -26,7 +26,7 @@ {{ $authorImage = $author.image }} {{ end }} {{ $authorImage := resources.Get $authorImage }} -{{ $authorImage := $authorImage.Fit "148x148" }} +{{ $authorImage = $authorImage.Fit "148x148" }} {{/* get file that matches the filename as specified as src="" in shortcode */}} {{ $src := resources.Get $backgroundImage }} From 88a081402518c72344245a0fcb81dfa93d662e21 Mon Sep 17 00:00:00 2001 From: vlebert <49779177+vlebert@users.noreply.github.com> Date: Fri, 4 Jun 2021 06:30:22 +0200 Subject: [PATCH 11/40] Fix some french translations (#343) * resize skillcards by CSS instead of JS * Revert "resize skillcards by CSS instead of JS" This reverts commit 169e0599e9ff771c1cf58c03fb799c42aac65092. * french translation Co-authored-by: vlebert --- i18n/fr.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i18n/fr.toml b/i18n/fr.toml index 97c17cb..8565dd5 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -3,7 +3,7 @@ other = "Accueil" [posts] -other = "Des postes" +other = "Articles" [toc_heading] other = "Table des matières" @@ -89,8 +89,8 @@ other = "Montrer moins" # [comments_by] # other = "comments powered by" -# [read] -# other = "Read" +[read] +other = "Lire" # [project_star] # other = "Star" From 08a09d5c7145b3b22902fe2ae742a53070ad24be Mon Sep 17 00:00:00 2001 From: Kaligule Date: Sat, 5 Jun 2021 19:58:26 +0200 Subject: [PATCH 12/40] Disable logo by default + add logo only if the user provide it * Disable logo by default, allow to enable with params.logo.enable * Don't default logo into theme logo Signed-off-by: hossainemruz * add missing comma Signed-off-by: hossainemruz * Remove unnecessary changes Signed-off-by: hossainemruz Co-authored-by: Johannes Lippmann Co-authored-by: hossainemruz --- layouts/partials/header.html | 31 ++++++++--------- layouts/partials/navigators/navbar-2.html | 41 ++++++++++++++--------- layouts/partials/navigators/navbar.html | 40 +++++++++++++--------- static/js/navbar.js | 15 ++++++--- 4 files changed, 75 insertions(+), 52 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 2d126b6..7568437 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,18 +1,3 @@ -{{/* default favicon */}} -{{ $favicon := "/images/favicon.png" }} - -{{/* if favicon is provided in the config, then use that */}} -{{ if site.Params.logo.favicon }} - {{ $favicon = site.Params.logo.favicon }} -{{ end }} - -{{/* resize the favicon. don't resize svg because it is not supported */}} -{{ $favicon := resources.Get $favicon }} -{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }} - {{ $favicon = $favicon.Resize "42x" }} -{{ end }} -{{ $favicon = $favicon.RelPermalink}} - @@ -28,5 +13,17 @@ - - + +{{/* add favicon only if the site author has provided the the favicon */}} +{{ if site.Params.logo.favicon }} + {{ $favicon := site.Params.logo.favicon }} + + {{/* resize the favicon. don't resize svg because it is not supported */}} + {{ $favicon = resources.Get $favicon }} + {{ if and $favicon (ne $favicon.MediaType.SubType "svg") }} + {{ $favicon = $favicon.Resize "42x" }} + {{ end }} + {{ $favicon = $favicon.RelPermalink}} + + +{{end}} diff --git a/layouts/partials/navigators/navbar-2.html b/layouts/partials/navigators/navbar-2.html index 86b4626..c129f6e 100644 --- a/layouts/partials/navigators/navbar-2.html +++ b/layouts/partials/navigators/navbar-2.html @@ -1,28 +1,31 @@ -{{/* default logos */}} -{{ $mainLogo := "/images/main-logo.png" }} -{{ $invertedLogo := "/images/inverted-logo.png" }} +{{/* by default, don't use any logo */}} +{{ $mainLogo := "" }} +{{ $invertedLogo := "" }} -{{/* if custom logo has been provided in the config file, then use them */}} +{{/* if custom logo has been provided, use them */}} {{ if site.Params.logo.main }} {{ $mainLogo = site.Params.logo.main }} {{ end }} - {{ if site.Params.logo.inverted }} {{ $invertedLogo = site.Params.logo.inverted }} {{ end }} {{/* resize the logos. don't resize svg because it is not supported */}} -{{ $mainLogo := resources.Get $mainLogo}} -{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} - {{ $mainLogo = $mainLogo.Resize "42x" }} +{{ if $mainLogo }} + {{ $mainLogo = resources.Get $mainLogo}} + {{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} + {{ $mainLogo = $mainLogo.Resize "42x" }} + {{ end }} + {{ $mainLogo = $mainLogo.RelPermalink}} {{ end }} -{{ $mainLogo = $mainLogo.RelPermalink}} -{{ $invertedLogo := resources.Get $invertedLogo}} -{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg") }} - {{ $invertedLogo = $invertedLogo.Resize "42x" }} +{{ if $invertedLogo }} + {{ $invertedLogo = resources.Get $invertedLogo}} + {{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}} + {{ $invertedLogo = $invertedLogo.Resize "42x" }} + {{ end }} + {{ $invertedLogo = $invertedLogo.RelPermalink}} {{ end }} -{{ $invertedLogo = $invertedLogo.RelPermalink}} diff --git a/layouts/partials/navigators/navbar.html b/layouts/partials/navigators/navbar.html index df29cdc..ed6cff9 100644 --- a/layouts/partials/navigators/navbar.html +++ b/layouts/partials/navigators/navbar.html @@ -7,11 +7,11 @@ {{ $blogEnabled = true }} {{ end }} -{{/* default logos */}} -{{ $mainLogo := "/images/main-logo.png" }} -{{ $invertedLogo := "/images/inverted-logo.png" }} +{{/* by default, don't use any logo */}} +{{ $mainLogo := "" }} +{{ $invertedLogo := "" }} -{{/* if custom logo is used, them */}} +{{/* if custom logo has been provided, use them */}} {{ if site.Params.logo.main }} {{ $mainLogo = site.Params.logo.main }} {{ end }} @@ -20,17 +20,21 @@ {{ end }} {{/* resize the logos. don't resize svg because it is not supported */}} -{{ $mainLogo := resources.Get $mainLogo}} -{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} - {{ $mainLogo = $mainLogo.Resize "42x" }} +{{ if $mainLogo }} + {{ $mainLogo = resources.Get $mainLogo}} + {{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} + {{ $mainLogo = $mainLogo.Resize "42x" }} + {{ end }} + {{ $mainLogo = $mainLogo.RelPermalink}} {{ end }} -{{ $mainLogo = $mainLogo.RelPermalink}} -{{ $invertedLogo := resources.Get $invertedLogo}} -{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}} - {{ $invertedLogo = $invertedLogo.Resize "42x" }} +{{ if $invertedLogo }} + {{ $invertedLogo = resources.Get $invertedLogo}} + {{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}} + {{ $invertedLogo = $invertedLogo.Resize "42x" }} + {{ end }} + {{ $invertedLogo = $invertedLogo.RelPermalink}} {{ end }} -{{ $invertedLogo = $invertedLogo.RelPermalink}} {{ $customMenus := site.Params.customMenus }} {{ if (index site.Data site.Language.Lang).site.customMenus }} @@ -45,7 +49,9 @@ diff --git a/static/js/navbar.js b/static/js/navbar.js index 929c74b..1d5ca97 100644 --- a/static/js/navbar.js +++ b/static/js/navbar.js @@ -16,8 +16,12 @@ $('#navbar-toggler').addClass('navbar-light'); // get the main logo from hidden img tag - let mainLogo = document.getElementById("main-logo").getAttribute("src"); - $('#logo').attr("src", mainLogo); + let mainLogo = document.getElementById("main-logo") + if (mainLogo !== null) { + let logoURL = mainLogo.getAttribute("src"); + $('#logo').attr("src", logoURL); + } + } else { $('#top-navbar').removeClass('final-navbar shadow'); $('#top-navbar').addClass('initial-navbar'); @@ -26,8 +30,11 @@ $('#navbar-toggler').addClass('navbar-dark'); // get the inverted logo from hidden img tag - let invertedLogo = document.getElementById("inverted-logo").getAttribute("src"); - $('#logo').attr("src", invertedLogo); + let invertedLogo = document.getElementById("inverted-logo") + if (invertedLogo !== null) { + let logoURL = invertedLogo.getAttribute("src"); + $('#logo').attr("src", logoURL); + } } }); From 65a429b664af0eca1f376dc3a9e77dbc39959b18 Mon Sep 17 00:00:00 2001 From: vlebert <49779177+vlebert@users.noreply.github.com> Date: Sat, 5 Jun 2021 20:14:32 +0200 Subject: [PATCH 13/40] Use CSS to fix Skill cards height instead JS (#342) * resize skillcards by CSS instead of JS * Revert "resize skillcards by CSS instead of JS" This reverts commit 169e0599e9ff771c1cf58c03fb799c42aac65092. * resize skillcards by CSS instead of JS Co-authored-by: vlebert Co-authored-by: Emruz Hossain --- static/css/sections/skills.css | 1 + static/js/home.js | 28 +++------------------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/static/css/sections/skills.css b/static/css/sections/skills.css index 374d3c6..211da14 100644 --- a/static/css/sections/skills.css +++ b/static/css/sections/skills.css @@ -19,6 +19,7 @@ .skills-section .card { margin-top: 0.5rem; margin-bottom: 0.5rem; + height: 100%; } .skills-section .card .card-body { diff --git a/static/js/home.js b/static/js/home.js index fe93469..91fc725 100644 --- a/static/js/home.js +++ b/static/js/home.js @@ -63,28 +63,6 @@ var projectCards; } } - // ==================== Adjust height of the skills card ============= - function adjustSkillCardsHeight() { - if (!isMobile) { // no need to adjust height for mobile devices - // primary skills - var skillCards = document.getElementById("primary-skills"); - if (skillCards != null) { - var cardElems = skillCards.getElementsByClassName("card"); - var maxHeight = 0; - for (let i = 0; i < cardElems.length; i++) { - if (cardElems.item(i).clientHeight > maxHeight) { - maxHeight = cardElems.item(i).clientHeight; - } - } - for (let i = 0; i < cardElems.length; i++) { - cardElems.item(i).setAttribute("style", "min-height: " + maxHeight + "px;"); - } - } - } - } - $(window).on("load", function () { - adjustSkillCardsHeight(); - }); // ================== Project cards ===================== // Add click action on project category selector buttons @@ -331,17 +309,17 @@ var projectCards; this.parentElement.classList.toggle("col-sm-12"); if (this.children["SmallImage"].hasAttribute("active")) { let mainLogo = this.children["LargeImage"].getAttribute("Style"); - this.children["LargeImage"].setAttribute("active",true); + this.children["LargeImage"].setAttribute("active", true); this.children["SmallImage"].removeAttribute("active"); this.setAttribute("Style", mainLogo); } else { let mainLogo = this.children["SmallImage"].getAttribute("Style"); - this.children["SmallImage"].setAttribute("active",true); + this.children["SmallImage"].setAttribute("active", true); this.children["LargeImage"].removeAttribute("active"); this.setAttribute("Style", mainLogo); } - + if (this.children["caption"] != undefined) { this.children["caption"].classList.toggle("hidden"); } From 929a78837ae2ded97714472980557f18ffef2acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Hern=C3=A1ndez?= Date: Sun, 6 Jun 2021 11:56:06 +0200 Subject: [PATCH 14/40] Fix horizontal scrollbar (#347) * Fixed scrollbar problems related to about section. * Fixed scrollbar problems related to skill section. * Making h1 fonts a little bit smaller on small devices. Co-authored-by: Emruz Hossain --- static/css/layouts/main.css | 13 +++++++++++++ static/css/sections/about.css | 21 +++++++++++++++++++++ static/css/sections/skills.css | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/static/css/layouts/main.css b/static/css/layouts/main.css index e028f3f..467bd4e 100644 --- a/static/css/layouts/main.css +++ b/static/css/layouts/main.css @@ -432,16 +432,29 @@ mark { code { padding: 0px; } + + h1 { + font-size: 2.2rem; + } } /* iPhoneX, iPhone 6,7,8 */ @media only screen and (max-width: 375px) { + h1 { + font-size: 2rem; + } } /* Galaxy S5, Moto G4 */ @media only screen and (max-width: 360px) { + h1 { + font-size: 1.8rem; + } } /* iPhone 5 or before */ @media only screen and (max-width: 320px) { + h1 { + font-size: 1.5rem; + } } diff --git a/static/css/sections/about.css b/static/css/sections/about.css index 4f7b1e5..71d4b17 100644 --- a/static/css/sections/about.css +++ b/static/css/sections/about.css @@ -496,11 +496,24 @@ .about-section.container { max-width: 100%; } + + .circular-progress { + width: 135px; + height: 135px; + } } /* Small devices (landscape phones, 576px and up) */ @media only screen and (max-width: 576px) { + .circular-progress { + width: 150px; + height: 150px; + } + + .circular-progress .circular-progress-value { + font-size: 1rem; + } } /* iPhoneX, iPhone 6,7,8 */ @@ -513,4 +526,12 @@ /* iPhone 5 or before */ @media only screen and (max-width: 320px) { + .col-6 { + flex: auto; + max-width: 100%; + } + + .social-link { + flex-wrap: wrap; + } } diff --git a/static/css/sections/skills.css b/static/css/sections/skills.css index 211da14..ea692ad 100644 --- a/static/css/sections/skills.css +++ b/static/css/sections/skills.css @@ -58,7 +58,7 @@ padding-right: 0; } .skills-section .container { - max-width: 100%; + max-width: 95%; } } From 61e5a341710b18934198cb05efa50992a033cfb1 Mon Sep 17 00:00:00 2001 From: Emruz Hossain Date: Sun, 6 Jun 2021 21:43:34 +0600 Subject: [PATCH 15/40] Fix Prev/Next navigator was not pointing to the actual prev/next article (#348) Signed-off-by: hossainemruz --- layouts/partials/helpers/get-pages.html | 10 +++ .../navigators/next-prev-navigator.html | 62 ++++++++++--------- 2 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 layouts/partials/helpers/get-pages.html diff --git a/layouts/partials/helpers/get-pages.html b/layouts/partials/helpers/get-pages.html new file mode 100644 index 0000000..8e06483 --- /dev/null +++ b/layouts/partials/helpers/get-pages.html @@ -0,0 +1,10 @@ +{{ $pages:= slice}} +{{ range . }} + {{ if .HasChildren }} + {{ $nestedPages:=partial "helpers/get-pages.html" .Children }} + {{ $pages = $pages | append $nestedPages }} + {{ else }} + {{ $pages = $pages | append .Page }} + {{ end }} +{{ end }} +{{ return $pages}} diff --git a/layouts/partials/navigators/next-prev-navigator.html b/layouts/partials/navigators/next-prev-navigator.html index f87c369..3738c67 100644 --- a/layouts/partials/navigators/next-prev-navigator.html +++ b/layouts/partials/navigators/next-prev-navigator.html @@ -1,33 +1,39 @@ +{{ $curPage := . }} +{{ $prevPage := "" }} +{{ $nextPage := "" }} + + +{{ $pages := partial "helpers/get-pages.html" site.Menus.sidebar }} + + +{{ $idx := 0 }} +{{ range $pages }} + {{ if eq .RelPermalink $curPage.RelPermalink }} + {{ $prevPage = index $pages (sub $idx 1) }} + {{ $nextPage = index $pages (add $idx 1) }} + {{ end }} + {{ $idx = add $idx 1 }} +{{ end }} +
-{{ $currentPage := . }} -{{ range (where site.RegularPages.ByDate "Type" "in" site.Params.mainSections )}} - {{ if eq .RelPermalink $currentPage.RelPermalink }} - {{ if .Next }} - {{ if (in site.Params.mainSections .Next.Type) }} - From 9004e7c423befaa4a6007561797c99b738a57313 Mon Sep 17 00:00:00 2001 From: vlebert <49779177+vlebert@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:14:22 +0200 Subject: [PATCH 16/40] Add greeting subtitle (#350) * resize skillcards by CSS instead of JS * Revert "resize skillcards by CSS instead of JS" This reverts commit 169e0599e9ff771c1cf58c03fb799c42aac65092. * french translation * add an optionnal greeting subtitle Co-authored-by: vlebert --- layouts/partials/sections/home.html | 3 +++ static/css/sections/home.css | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index 4420c85..27ddd31 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -110,6 +110,9 @@ alt="Author Image" />

{{ $author.greeting }} {{ $name }}

+ {{ if $author.subtitle }} +

{{ $author.subtitle }}

+ {{ end }}