From 7392edb1d3db813444d4fe166c9399153aa051a9 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 28 Oct 2020 11:11:13 +0530 Subject: [PATCH 001/617] README: update - rm old Lighthouse report - beautify - update demo image --- README.md | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 7a6f1cd6..4cc2a267 100755 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu ---

- HomeInfo + HomeInfo HomeInfo

@@ -33,21 +33,21 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya ## Features/Mods -- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. -- 3 Modes: - - Regular Mode. - - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) - - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) -- Table of Content Generation (newer implementation). -- Archive of posts. -- Social-Media Share buttons on post. -- Menu location indicator. -- Multilingual support. -- Cover image for each post (with Responsive image support). -- Light/Dark theme ( automatic theme switch a/c to browser theme). -- SEO Friendly. -- Muliple Author support. -- No webpack, nodejs and other depedencies required to edit the theme :) +- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. +- 3 Modes: + - Regular Mode. + - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) + - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) +- Table of Content Generation (newer implementation). +- Archive of posts. +- Social-Media Share buttons on post. +- Menu location indicator. +- Multilingual support. +- Cover image for each post (with Responsive image support). +- Light/Dark theme ( automatic theme switch a/c to browser theme). +- SEO Friendly. +- Muliple Author support. +- No webpack, nodejs and other depedencies required to edit the theme :) Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) @@ -61,9 +61,7 @@ Read this post For More Details => [Social-Icons](https://adityatelange.github.i --- -## LightHouse Report - -LightHouse +## [LightHouse Report](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F) --- From 0887805caf54b19e7204718d8262e09ca08467ba Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 28 Oct 2020 22:41:42 +0530 Subject: [PATCH 002/617] README: update link faq post --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4cc2a267..e2037308 100755 --- a/README.md +++ b/README.md @@ -61,6 +61,12 @@ Read this post For More Details => [Social-Icons](https://adityatelange.github.i --- +## FAQs / How To's + +Read this post For More Details => [How To's Guide](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-how-to/) + +--- + ## [LightHouse Report](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F) --- From 9acbc2c134c2052c54833d9ad63fa048694b9895 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 30 Oct 2020 01:01:48 +0530 Subject: [PATCH 003/617] baseof: use `dir` attribute instead of class and set default dir to `auto` main(css): rm unused class --- assets/css/main.css | 8 -------- layouts/_default/baseof.html | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 68f8a2f1..6fac98b9 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -52,14 +52,6 @@ width: 26px; } -.direction-rtl { - direction: rtl; -} - -.direction-ltr { - direction: ltr; -} - code { direction: ltr; } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index cd999824..f28e12ba 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . }} @@ -15,4 +15,4 @@ {{- partialCached "footer.html" . .Type }} - \ No newline at end of file + From b239f42f6b419c1835ffdaa8286c7fd638a55303 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 30 Oct 2020 01:15:29 +0530 Subject: [PATCH 004/617] Add accesskeys (attribute specifies a shortcut key to activate/focus an element.) c - ToC Open/Close g- Go To Top h - Home (according to current lang) t - Theme toggle more: https://www.w3schools.com/tags/att_global_accesskey.asp --- layouts/_default/single.html | 2 +- layouts/partials/footer.html | 2 +- layouts/partials/header.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b13fb74a..72fe4a5f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -27,7 +27,7 @@
-
{{- i18n "toc" | default "Table of Contents" }}
+
{{- i18n "toc" | default "Table of Contents" }}
{{- partial "toc.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f6d407e2..a3ee83da 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,7 +9,7 @@ · Theme️ PaperMod - + - + {{- partial "extend_footer.html" . -}} {{ if in site.Params.mainSections .Type }} {{- if not .Site.Params.assets.disableFingerprinting }} From 91bc0acfa9212a55299ecd7abf71a99df10d01c4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 6 Dec 2020 22:31:18 +0530 Subject: [PATCH 063/617] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0bb53b5f..c61e396d 100755 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya - Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button). - SEO Friendly. - Muliple Author support. +- Search Page - No webpack, nodejs and other depedencies required to edit the theme :) Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) From 08e58f5f773f935a97ecd0ce32acc62c2bc40ad4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 7 Dec 2020 22:59:51 +0530 Subject: [PATCH 064/617] head: commonize stylesheet resource --- layouts/partials/head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 055701f8..baaf732f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -21,12 +21,12 @@ {{- end}} +{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}} {{- if not .Site.Params.assets.disableFingerprinting }} -{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}} +{{- $stylesheet := $stylesheet | fingerprint -}} {{- else}} -{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}} {{- end}} From db38e156f56ce452f29d248cae3efca6eb865774 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 8 Dec 2020 00:16:11 +0530 Subject: [PATCH 065/617] footer: hljs: add check to not load hljs on archive and search --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 65045f46..e6e894af 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -14,7 +14,7 @@ {{- partial "extend_footer.html" . -}} -{{ if in site.Params.mainSections .Type }} +{{ if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From e252e761f54f1f871630cdcc5416e90de1ec89d6 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 29 Dec 2020 16:03:49 +0530 Subject: [PATCH 096/617] footer: allow disabling HLJS #143 usage => in site config => params: assets: disableHLJS: true per-page in front-matter => disableHLJS: true --- layouts/_default/baseof.html | 2 +- layouts/partials/footer.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 11fb6788..8f17b936 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -18,7 +18,7 @@ {{- block "main" . }} {{- end }} - {{- partialCached "footer.html" . .Type .Layout }} + {{- partialCached "footer.html" . .Type .Layout .Params }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c384c4ed..b34d278a 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -18,7 +18,8 @@ {{- partial "extend_footer.html" . -}} -{{ if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`)) }} +{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} +{{- if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`) (not $isHLJSdisabled)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} {{- else}} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} - + {{- end}} {{- end }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From 09de369d2fa8d379104edaa08901e20f1209333c Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 6 Jan 2021 01:03:49 +0530 Subject: [PATCH 108/617] update fuse.js to v6.4.6 credits: https://github.com/krisk/Fuse/releases/tag/v6.4.6 --- assets/js/fuse.js | 173 +++++++++++++++++++++++----------------------- 1 file changed, 88 insertions(+), 85 deletions(-) diff --git a/assets/js/fuse.js b/assets/js/fuse.js index a037a879..6be05928 100644 --- a/assets/js/fuse.js +++ b/assets/js/fuse.js @@ -1,7 +1,7 @@ /** - * Fuse.js v6.4.3 - Lightweight fuzzy-search (http://fusejs.io) + * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io) * - * Copyright (c) 2020 Kiro Risk (http://kiro.me) + * Copyright (c) 2021 Kiro Risk (http://kiro.me) * All Rights Reserved. Apache Software License 2.0 * * http://www.apache.org/licenses/LICENSE-2.0 @@ -466,6 +466,7 @@ function norm() { var mantissa = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3; var cache = new Map(); + var m = Math.pow(10, mantissa); return { get: function get(value) { var numTokens = value.match(SPACE).length; @@ -474,7 +475,9 @@ return cache.get(numTokens); } - var n = parseFloat((1 / Math.sqrt(numTokens)).toFixed(mantissa)); + var norm = 1 / Math.sqrt(numTokens); // In place of `toFixed(mantissa)`, for faster computation + + var n = parseFloat(Math.round(norm * m) / m); cache.set(numTokens, n); return n; }, @@ -696,42 +699,6 @@ return myIndex; } - function transformMatches(result, data) { - var matches = result.matches; - data.matches = []; - - if (!isDefined(matches)) { - return; - } - - matches.forEach(function (match) { - if (!isDefined(match.indices) || !match.indices.length) { - return; - } - - var indices = match.indices, - value = match.value; - var obj = { - indices: indices, - value: value - }; - - if (match.key) { - obj.key = match.key.src; - } - - if (match.idx > -1) { - obj.refIndex = match.idx; - } - - data.matches.push(obj); - }); - } - - function transformScore(result, data) { - data.score = result.score; - } - function computeScore(pattern) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$errors = _ref.errors, @@ -1503,7 +1470,7 @@ var isMatch = !!indices.length; return { isMatch: isMatch, - score: isMatch ? 1 : 0, + score: isMatch ? 0 : 1, indices: indices }; } @@ -1838,6 +1805,85 @@ return next(query); } + function computeScore$1(results, _ref) { + var _ref$ignoreFieldNorm = _ref.ignoreFieldNorm, + ignoreFieldNorm = _ref$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref$ignoreFieldNorm; + results.forEach(function (result) { + var totalScore = 1; + result.matches.forEach(function (_ref2) { + var key = _ref2.key, + norm = _ref2.norm, + score = _ref2.score; + var weight = key ? key.weight : null; + totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm)); + }); + result.score = totalScore; + }); + } + + function transformMatches(result, data) { + var matches = result.matches; + data.matches = []; + + if (!isDefined(matches)) { + return; + } + + matches.forEach(function (match) { + if (!isDefined(match.indices) || !match.indices.length) { + return; + } + + var indices = match.indices, + value = match.value; + var obj = { + indices: indices, + value: value + }; + + if (match.key) { + obj.key = match.key.src; + } + + if (match.idx > -1) { + obj.refIndex = match.idx; + } + + data.matches.push(obj); + }); + } + + function transformScore(result, data) { + data.score = result.score; + } + + function format(results, docs) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$includeMatches = _ref.includeMatches, + includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches, + _ref$includeScore = _ref.includeScore, + includeScore = _ref$includeScore === void 0 ? Config.includeScore : _ref$includeScore; + + var transformers = []; + if (includeMatches) transformers.push(transformMatches); + if (includeScore) transformers.push(transformScore); + return results.map(function (result) { + var idx = result.idx; + var data = { + item: docs[idx], + refIndex: idx + }; + + if (transformers.length) { + transformers.forEach(function (transformer) { + transformer(result, data); + }); + } + + return data; + }); + } + var Fuse = /*#__PURE__*/function () { function Fuse(docs) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; @@ -2189,52 +2235,9 @@ }]); return Fuse; - }(); // Practical scoring function + }(); - function computeScore$1(results, _ref8) { - var _ref8$ignoreFieldNorm = _ref8.ignoreFieldNorm, - ignoreFieldNorm = _ref8$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref8$ignoreFieldNorm; - results.forEach(function (result) { - var totalScore = 1; - result.matches.forEach(function (_ref9) { - var key = _ref9.key, - norm = _ref9.norm, - score = _ref9.score; - var weight = key ? key.weight : null; - totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm)); - }); - result.score = totalScore; - }); - } - - function format(results, docs) { - var _ref10 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - _ref10$includeMatches = _ref10.includeMatches, - includeMatches = _ref10$includeMatches === void 0 ? Config.includeMatches : _ref10$includeMatches, - _ref10$includeScore = _ref10.includeScore, - includeScore = _ref10$includeScore === void 0 ? Config.includeScore : _ref10$includeScore; - - var transformers = []; - if (includeMatches) transformers.push(transformMatches); - if (includeScore) transformers.push(transformScore); - return results.map(function (result) { - var idx = result.idx; - var data = { - item: docs[idx], - refIndex: idx - }; - - if (transformers.length) { - transformers.forEach(function (transformer) { - transformer(result, data); - }); - } - - return data; - }); - } - - Fuse.version = '6.4.3'; + Fuse.version = '6.4.6'; Fuse.createIndex = createIndex; Fuse.parseIndex = parseIndex; Fuse.config = Config; From 905640ceefd6f547f173feb4afa7d236b45f95b9 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 20:38:00 +0530 Subject: [PATCH 109/617] increase blockquote thickness inside post --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 0282d501..b11468ba 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -210,7 +210,7 @@ .post-content blockquote { margin: 0 0; padding: 0 14px; - border-inline-start: 2px solid var(--primary) + border-inline-start: 3px solid var(--primary) } .post-content hr { From 3b0997fc42e4b0acb4cadd11d54e7d1a60c74670 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 22:52:03 +0530 Subject: [PATCH 110/617] fix margin when hljs was disabled --- assets/css/post-single.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index b11468ba..8a0852b3 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -162,6 +162,10 @@ margin: 0 } +.post-content .highlight { + margin: auto 0 20px +} + .post-content .highlighttable { table-layout: fixed } From bd4a118afa6187d51c42560ea8f1f13b65e46c59 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 22:53:04 +0530 Subject: [PATCH 111/617] rm unnecessay color to box-shadow for anchors --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 8a0852b3..a9d1a155 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -66,7 +66,7 @@ .post-content a, .toc a:hover { - box-shadow: 0 1px 0 var(--primary) + box-shadow: 0 1px 0 } .post-content a code { From 9d478913ec59912e7c0664d1e7c882243debe3d4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 23:35:00 +0530 Subject: [PATCH 112/617] Update README.md replace unseen emoji --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d208291f..afd499c9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya --- -## Features/Mods 🪄 +## Features/Mods 💥 - Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. - 3 Modes: From 4fd4bc5e204cced21e574116140ca423c302f7d3 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 23:08:18 +0530 Subject: [PATCH 113/617] Add info to blank.css --- assets/css/extended/blank.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/css/extended/blank.css b/assets/css/extended/blank.css index e69de29b..a5772953 100644 --- a/assets/css/extended/blank.css +++ b/assets/css/extended/blank.css @@ -0,0 +1,5 @@ +/* +This is just a placeholder blank stylesheet so as to support adding custom styles budled with theme's default styles + +Read https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#bundling-custom-css-with-themes-assets for more info +*/ From 6a897a9e672c93bec263871a110e40b97ccdb39b Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 23:36:01 +0530 Subject: [PATCH 114/617] update LICENSE for 2021 --- LICENSE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 0dc94d5e..85e428e1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2020 nanxiaobei, adityatelange +Copyright (c) 2020 nanxiaobei and adityatelange +Copyright (c) 2021 adityatelange Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 6f397ef591a0163257ccbe3ceb4fc6a0061e2109 Mon Sep 17 00:00:00 2001 From: Muhammad Hanif Date: Mon, 11 Jan 2021 20:43:36 +0700 Subject: [PATCH 115/617] i18n: Add id Bahasa Indonesia (#173) --- i18n/id.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 i18n/id.yaml diff --git a/i18n/id.yaml b/i18n/id.yaml new file mode 100644 index 00000000..0add1217 --- /dev/null +++ b/i18n/id.yaml @@ -0,0 +1,16 @@ +- id: prev_page + translation: "Halaman Sebelumnya" + +- id: next_page + translation: "Halaman Selanjutnya" + +- id: read_time + translation: + one : "1 menit" + other: "{{ .Count }} menit" + +- id: toc + translation: "Daftar Isi" + +- id: translations + translation: "Terjemahan" From e809aef590273d6aa6c16414801f19d8829548a2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 20:01:19 +0530 Subject: [PATCH 116/617] lighten dark's border #5b5d67 -> #333 --- assets/css/theme-vars.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/theme-vars.css b/assets/css/theme-vars.css index 47c061ce..347502f0 100644 --- a/assets/css/theme-vars.css +++ b/assets/css/theme-vars.css @@ -14,7 +14,7 @@ --content: rgba(0, 0, 0, 0.88); --hljs-bg: #1c1d21; --code-bg: #f5f5f5; - --border: #eee + --border: #eee; } @media screen and (max-width:600px) { @@ -32,7 +32,7 @@ --content: rgba(255, 255, 255, 0.64); --hljs-bg: #2e2e33; --code-bg: #37383e; - --border: #5b5d67 + --border: #333; } .list { From 89414d00dc5a08b37e336e38772aaa8dd76f074c Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 20:15:04 +0530 Subject: [PATCH 117/617] add minimal border to post-entry - increases element speration without being noticed cc: #169 --- assets/css/post-entry.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css index 17ad48a2..c06fd4aa 100644 --- a/assets/css/post-entry.css +++ b/assets/css/post-entry.css @@ -45,7 +45,8 @@ padding: var(--gap); background: var(--entry); border-radius: var(--radius); - transition: transform .1s + transition: transform .1s; + border: 1px solid var(--border); } .post-entry:active { From 7a0e1f369c9b6cf7e4158aca2b5e256841faddb3 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 20:31:03 +0530 Subject: [PATCH 118/617] change animation condition from hover to active for share-buttons and terms-tags --- assets/css/post-single.css | 2 +- assets/css/terms.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index a9d1a155..0dce08ca 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -331,7 +331,7 @@ transition: transform .1s } -.share-buttons svg:hover { +.share-buttons svg:active { transform: scale(.96) } diff --git a/assets/css/terms.css b/assets/css/terms.css index 82db4453..7a68cc3d 100644 --- a/assets/css/terms.css +++ b/assets/css/terms.css @@ -12,7 +12,7 @@ transition: transform .1s } -.terms-tags a:hover { +.terms-tags a:active { background: var(--tertiary); transform: scale(.96) } From dd835600104d051ebaf591658939ab131c5ff494 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 21:01:50 +0530 Subject: [PATCH 119/617] go-top-top button cleanup --- assets/css/footer.css | 3 --- layouts/partials/footer.html | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/css/footer.css b/assets/css/footer.css index 87dc7d43..15467ebb 100644 --- a/assets/css/footer.css +++ b/assets/css/footer.css @@ -28,7 +28,6 @@ .top-link { visibility: hidden; - opacity: 0; position: fixed; bottom: 60px; right: 30px; @@ -38,8 +37,6 @@ height: 42px; padding: 12px; border-radius: 64px; - fill: currentColor; - fill-opacity: 80%; transition: visibility .5s, opacity .8s linear } diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3a12866b..4623b3ff 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -11,7 +11,7 @@ From b6a308d331d7ef2f59599203eb3b59890baef8ac Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 13 Jan 2021 23:19:35 +0530 Subject: [PATCH 120/617] Do not smooth scrollIntoView if user has it preferred https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion --- layouts/partials/footer.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 4623b3ff..f5ca45d6 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -38,9 +38,13 @@ anchor.addEventListener("click", function (e) { e.preventDefault(); var id = this.getAttribute("href").substr(1); - document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({ - behavior: "smooth" - }); + if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) { + document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({ + behavior: "smooth" + }); + } else { + document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView(); + } if (id === "top") { history.replaceState(null, null, " "); } else { From 18ae4e559314288780c91ee838fd1b2f92e662f7 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 13 Jan 2021 23:35:54 +0530 Subject: [PATCH 121/617] respect prefers-reduced-motion while animating --- assets/css/post-entry.css | 6 ++++++ assets/css/post-single.css | 6 ++++++ assets/css/profile-mode.css | 6 ++++++ assets/css/search.css | 7 +++++++ assets/css/terms.css | 6 ++++++ 5 files changed, 31 insertions(+) diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css index c06fd4aa..a9d08512 100644 --- a/assets/css/post-entry.css +++ b/assets/css/post-entry.css @@ -53,6 +53,12 @@ transform: scale(.96) } +@media (prefers-reduced-motion) { + .post-entry:active { + transform: none + } +} + .tag-entry .entry-cover { display: none } diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 0dce08ca..5dcb272f 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -335,6 +335,12 @@ transform: scale(.96) } +@media (prefers-reduced-motion) { + .share-buttons svg:active { + transform: none + } +} + h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, diff --git a/assets/css/profile-mode.css b/assets/css/profile-mode.css index d59f7363..52502373 100644 --- a/assets/css/profile-mode.css +++ b/assets/css/profile-mode.css @@ -55,3 +55,9 @@ .button:active { transform: scale(.96) } + +@media (prefers-reduced-motion) { + .button:active { + transform: none + } +} diff --git a/assets/css/search.css b/assets/css/search.css index 275cbe10..df3275c9 100644 --- a/assets/css/search.css +++ b/assets/css/search.css @@ -41,4 +41,11 @@ #searchResults .active { transform: scale(.98); + border: 2px solid var(--tertiary) +} + +@media (prefers-reduced-motion) { + #searchResults .active { + transform: none + } } diff --git a/assets/css/terms.css b/assets/css/terms.css index 7a68cc3d..c20357fa 100644 --- a/assets/css/terms.css +++ b/assets/css/terms.css @@ -16,3 +16,9 @@ background: var(--tertiary); transform: scale(.96) } + +@media (prefers-reduced-motion) { + .terms-tags a:active { + transform: none + } +} From ad44cdda0f5e18c0c605e80eb6e9818fe112de77 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 15 Jan 2021 23:21:13 +0530 Subject: [PATCH 122/617] fix highlight.js loading on section pages --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f5ca45d6..276a76af 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -18,7 +18,7 @@ {{- partial "extend_footer.html" . -}} {{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} -{{- if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`) (not $isHLJSdisabled)) }} +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} {{- else}} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} - + {{- end}} {{- end }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From e02df37142a6415f0906317b8e3f8052823568c2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 19:11:06 +0530 Subject: [PATCH 131/617] Revert "fix wrong load stylesheet and JS on multihost (multilingual) #126" Doesn't work with multilingual config with no specific baseurl This reverts commit ad79fdaf830e9df84a154510d67011c9e6d709a5. --- layouts/partials/footer.html | 4 ++-- layouts/partials/head.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 62118c3c..276a76af 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -21,11 +21,11 @@ {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} - {{- else}} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} - + {{- end}} {{- end }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From 757a3094b2ac56f750e8e4f832816937fdf17c37 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 19:21:59 +0530 Subject: [PATCH 132/617] add drop-shadow to show go-to-top button on code-bg in light mode --- assets/css/footer.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/css/footer.css b/assets/css/footer.css index 2ccb160d..11cc29a6 100644 --- a/assets/css/footer.css +++ b/assets/css/footer.css @@ -40,6 +40,11 @@ transition: visibility .5s, opacity .8s linear } +.top-link, +.top-link svg { + filter: drop-shadow(0px 0px 0px var(--theme)); +} + .footer a:hover, .top-link:hover { color: var(--primary) From 2c9efe204a9bb0b6210367148c5f8579c57e20fd Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:30:44 +0530 Subject: [PATCH 133/617] Update README.md link refs to wiki instead of demo --- README.md | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index afd499c9..019ea58c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ -![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg) -![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod) -[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod) -![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod) - # PaperMod | [Demo](https://adityatelange.github.io/hugo-PaperMod/) ☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive @@ -15,6 +9,12 @@ The [demo site](https://adityatelange.github.io/hugo-PaperMod/) includes a lot o ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with exampleSite as source. +![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg) +![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod) +[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod) +![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod) + ---

@@ -24,19 +24,13 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu --- -## Install/Update 📥 - -Read this post For More Details => [hugo-PaperMod - Installation](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/) - ---- - ## Features/Mods 💥 - Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. - 3 Modes: - - Regular Mode. - - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) - - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) + - [Regular Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode) + - [Home-Info Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode) + - [Profile Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode) - Table of Content Generation (newer implementation). - Archive of posts. - Social Icons (home-info and profile-mode) @@ -48,26 +42,34 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya - Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button). - SEO Friendly. - Muliple Author support. -- Search Page +- Search Page with Fuse.js - No webpack, nodejs and other depedencies required to edit the theme. -Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) +Read this post For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** -Release ChangeLog has info about stuff added: [Releases](https://github.com/adityatelange/hugo-PaperMod/releases) +--- -Huge thanks to contributors for making this theme better 🙌 +## Install/Update 📥 + +Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** --- ## Social-Icons/Share-Icons 🖼️ -Read this post For More Details => [Social-Icons](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-icons/) +Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** --- -## FAQs / How To's 🙋 +## FAQs / How To's Guide 🙋 -Read this post For More Details => [How To's Guide](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-how-to/) +Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** + +--- + +## Release Changelog + +Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** --- @@ -77,7 +79,7 @@ Read this post For More Details => [How To's Guide](https://adityatelange.github ## Special Thanks 🌟 -- [**Highlight.js**](https://github.com/highlightjs/highlight.js) -- [**Fuse.js**](https://github.com/krisk/fuse) -- [**Feather Icons**](https://github.com/feathericons/feather) -- **All Contributors and Supporters** +- [**Highlight.js**](https://github.com/highlightjs/highlight.js) +- [**Fuse.js**](https://github.com/krisk/fuse) +- [**Feather Icons**](https://github.com/feathericons/feather) +- **All Contributors and Supporters** From 0af2e50d893240d1a196063ce89301cf24f82ac7 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:41:54 +0530 Subject: [PATCH 134/617] rm redundant styleing from profile-mode --- assets/css/profile-mode.css | 6 ------ 1 file changed, 6 deletions(-) diff --git a/assets/css/profile-mode.css b/assets/css/profile-mode.css index 64b7b929..3b269596 100644 --- a/assets/css/profile-mode.css +++ b/assets/css/profile-mode.css @@ -17,11 +17,6 @@ padding: 12px 0 } -.profile .profile_inner span { - padding: 10px 0; - font-size: 18px -} - .profile img { display: inline-table; border-radius: 50%; @@ -49,4 +44,3 @@ .button:active { transform: scale(.96) } - From 565c36fdb06b55b1a90fbaf1dee74bb582ffdd08 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 22:00:17 +0530 Subject: [PATCH 135/617] Update README.md correct minor mistakes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 019ea58c..1b13fae1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu ---

- HomeInfo + HomeInfo HomeInfo

@@ -45,7 +45,7 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu - Search Page with Fuse.js - No webpack, nodejs and other depedencies required to edit the theme. -Read this post For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** +Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** --- From f5c554624948742923d3af2af9b6bfd9fe7983a8 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 21 Jan 2021 21:16:44 +0530 Subject: [PATCH 136/617] fix gist colors hide anchor underline for gist --- assets/css/post-single.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index ce7b1d19..1415431c 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -64,7 +64,7 @@ font-size: 12px } -.post-content a, +.post-content a:not(.gist a), .toc a:hover { box-shadow: 0 1px 0 } @@ -127,7 +127,7 @@ } .post-content table th, -.post-content:not(.gist) > table:not(.highlighttable) td { +.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td { min-width: 80px; padding: 12px 8px; line-height: 1.5; @@ -143,7 +143,7 @@ margin: auto 0 } -.post-content:not(.gist) > .highlight, +.post-content .highlight:not(.gist .highlight), .post-content pre { margin: auto 0 20px; background: var(--hljs-bg) !important; From 3167acd32a2a2eb678e399b528b1ef3b9ffc41c5 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 21 Jan 2021 23:31:17 +0530 Subject: [PATCH 137/617] fix code highlight spacing when in a list rm redundant code --- assets/css/post-single.css | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 1415431c..2729dba6 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -145,7 +145,7 @@ .post-content .highlight:not(.gist .highlight), .post-content pre { - margin: auto 0 20px; + margin: 10px auto; background: var(--hljs-bg) !important; border-radius: var(--radius) } @@ -162,10 +162,6 @@ margin: 0 } -.post-content .highlight { - margin: 10px auto -} - .post-content .highlighttable { table-layout: fixed } From a8316f00738d2eef92adc5ddbed5ac01f8755334 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 21 Jan 2021 23:35:38 +0530 Subject: [PATCH 138/617] fix code highlight radius when markup.highlight.lineNos is enabled --- assets/css/post-single.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 2729dba6..9dc3caf0 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -143,6 +143,10 @@ margin: auto 0 } +.post-content .highlight table { + border-radius: var(--radius) +} + .post-content .highlight:not(.gist .highlight), .post-content pre { margin: 10px auto; From 042f4e9254450bf03792b3b1e2f359922a8339c4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 22 Jan 2021 10:51:11 +0530 Subject: [PATCH 139/617] fix code-borders were rounded on desktop but not on mobile devices --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 9dc3caf0..5e8940e3 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -147,7 +147,7 @@ border-radius: var(--radius) } -.post-content .highlight:not(.gist .highlight), +.post-content .highlight:not(table), .post-content pre { margin: 10px auto; background: var(--hljs-bg) !important; From 2c67ae98774bb5e1d0fc6539688f9f29899b19cb Mon Sep 17 00:00:00 2001 From: Corban Mailloux Date: Fri, 22 Jan 2021 01:22:00 -0500 Subject: [PATCH 140/617] Allow page-specific cover settings to win. (#185) check for front-matter's cover.hidden before global config's --- 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 df77d47a..84a322be 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -31,7 +31,7 @@
{{- end}} - {{- $isHidden := ((.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInSingle) | default .Params.cover.hidden )}} + {{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden}} {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} {{- if (.Param "ShowToc") }}
From fc28fa7493024da3a1b83fdf3a82fab196ab237a Mon Sep 17 00:00:00 2001 From: Muhammad Hanif Date: Sat, 23 Jan 2021 17:19:51 +0700 Subject: [PATCH 141/617] Add meta tag for yandex site verification (#187) usage in site config => params: analytics: yandex: SiteVerificationTag: xxxxxxxxxxxxxxxx --- layouts/partials/head.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a54e280e..86e13f55 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -20,6 +20,9 @@ {{- if .Site.Params.analytics.google.SiteVerificationTag }} {{- end}} +{{- if .Site.Params.analytics.yandex.SiteVerificationTag }} + +{{- end}} {{- $common := (resources.Match "css/*.css") | resources.Concat "assets/css/common.css" }} {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} From be1ea5391027469e2330b81390e707b2aae69c57 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 23 Jan 2021 17:03:33 +0530 Subject: [PATCH 142/617] rm selector hiding anchor links on some devices fix: #189 partial revert of f5c554624948742923d3af2af9b6bfd9fe7983a8 --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 5e8940e3..afa6b1d5 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -64,7 +64,7 @@ font-size: 12px } -.post-content a:not(.gist a), +.post-content a, .toc a:hover { box-shadow: 0 1px 0 } From 24afe952b2db311b7d30d309cef9002526fe197a Mon Sep 17 00:00:00 2001 From: Daksh Date: Sat, 23 Jan 2021 17:21:52 +0530 Subject: [PATCH 143/617] Add social icon for snapchat (#188) Credits for icon: https://simpleicons.org/?q=snapchat --- layouts/partials/svg.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 03de65a2..3ca871b7 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -295,6 +295,10 @@ +{{- else if (eq $icon_name "snapchat") -}} + + + {{- else if (eq $icon_name "sourcerer") -}} From b6842db0a5a499446947938ffd1bfbcb7c5debb8 Mon Sep 17 00:00:00 2001 From: Florian Kohrt Date: Sun, 24 Jan 2021 13:22:45 +0100 Subject: [PATCH 144/617] Only show vertical bar if necessary in post-meta (#193) fixes unnecessary "|" shown when post-meta is empty but translations are available --- layouts/_default/single.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 84a322be..3e5a43b3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,7 +12,8 @@ {{- if not (.Param "hideMeta") }}
{{- end }} From bc4d4153dc4eb114c1c4fbca3615d21eac13e7b2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 24 Jan 2021 18:05:00 +0530 Subject: [PATCH 146/617] add hideMeta param to list - same as in single - allows hiding meta in list pages --- layouts/_default/list.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b6ddbfa5..9d805c50 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -44,9 +44,11 @@

{{ .Summary | plainify | htmlUnescape }}...

{{- end }} + {{- if not (.Param "hideMeta") }} + {{- end }} {{- end }} From f7dbf75d5b91cbe97bb82579aad8defa98c42402 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 24 Jan 2021 18:07:17 +0530 Subject: [PATCH 147/617] allow setting ShowReadingTime per-page as well as site-wide --- layouts/_default/single.html | 2 +- layouts/partials/post_meta.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d9761983..84b70d5d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,7 +13,7 @@
{{- partial "post_meta.html" . -}} {{- if .IsTranslated -}} - {{- if or .Params.author $.Site.Params.author $.Site.Params.ShowReadingTime (not .Date.IsZero) }} | {{- end -}} + {{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}} -{{ end }}{{/* end main */}} \ No newline at end of file +{{ end }}{{/* end main */}} From 91a9e1b9bb3fbcdc7b7876d7b1f67348f3ce9355 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 25 Jan 2021 21:10:11 +0530 Subject: [PATCH 161/617] add background to share buttons and tags under single --- assets/css/post-single.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index d321e36a..56d0c761 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -290,8 +290,9 @@ .post-tags a, .share-buttons { - border: 1px solid var(--tertiary); - border-radius: var(--radius) + border-radius: var(--radius); + background: var(--code-bg); + border: 1px solid var(--border) } .post-tags a { From b284ba5799b48a9cd9661ed10cc52c291359c755 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 23 Jan 2021 23:18:33 +0530 Subject: [PATCH 162/617] center align share-buttons --- assets/css/post-single.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 56d0c761..788bb5c5 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -310,9 +310,10 @@ } .share-buttons { - margin-top: var(--gap); + margin: 14px 0; padding-inline-start: var(--radius); display: flex; + justify-content: center; overflow-x: auto } From 2f06f5e4fa8ffcfdea3f3f99f1664babcad0fd5f Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 23 Jan 2021 23:13:47 +0530 Subject: [PATCH 163/617] fill background of table of contents --- assets/css/post-single.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 788bb5c5..f5fa4f42 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -245,12 +245,17 @@ } .toc { - margin-bottom: 40px; + margin: 0 2px 40px 2px; border: 1px solid var(--border); + background: var(--code-bg); border-radius: var(--radius); padding: .4em } +.dark .toc { + background: var(--entry); +} + .toc details summary { cursor: zoom-in; margin-inline-start: 20px From 3c3888f7ad3ade0cc061b0b2c534747295d8ced5 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 27 Jan 2021 23:58:34 +0530 Subject: [PATCH 164/617] add workflow to test PR builds fine --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..5a7bc88e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build + +on: + pull_request: + branches: + - master + - exampleSite + workflow_dispatch: + # manual run + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Git checkout + uses: actions/checkout@v2 + with: + ref: exampleSite + + - name: Get Theme + run: git submodule update --init --recursive + + - name: Update theme to Latest commit + run: git submodule update --remote --merge + + - name: Setup hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + - name: Build + run: hugo --buildDrafts --gc --verbose --minify From 778ee39137dc69e8761c73af7a731ffc51854397 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 28 Jan 2021 00:05:30 +0530 Subject: [PATCH 165/617] init feat Prev Next post links on single post page (#180) usage => in site config add Params: ShowPostNavLinks: true --- assets/css/post-single.css | 44 ++++++++++++++++++++++++++++++++++-- layouts/_default/single.html | 21 +++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index f5fa4f42..c37d1255 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -294,7 +294,8 @@ } .post-tags a, -.share-buttons { +.share-buttons, +.paginav { border-radius: var(--radius); background: var(--code-bg); border: 1px solid var(--border) @@ -310,7 +311,8 @@ background: var(--code-bg) } -.post-tags a:hover { +.post-tags a:hover, +.paginav a:hover { background: var(--border) } @@ -374,3 +376,41 @@ h6:hover .anchor { .post-content table::-webkit-scrollbar-thumb { border-width: 2px; } + +.paginav { + margin: 10px 0; + display: flex; + line-height: 30px; + border-radius: var(--radius); +} + +.paginav a { + padding-inline-start: 14px; + padding-inline-end: 14px; + border-radius: var(--radius); +} + +.paginav .title { + letter-spacing: 1px; + text-transform: uppercase; + font-size: small; + color: var(--secondary); +} + +.paginav .prev, +.paginav .next { + width: 50%; +} + +.paginav span:hover:not(.title) { + box-shadow: 0 1px 0; +} + +.paginav .next { + margin-inline-start: auto; + text-align: right; +} + +[dir="rtl"] .paginav .next { + text-align: left; +} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 84b70d5d..b6298ac7 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -57,6 +57,27 @@ {{- end }} {{- end }} + {{- if .Site.Params.ShowPostNavLinks }} + {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{- if and (gt (len $pages) 1) (in $pages . ) }} + + {{- end }} + {{- end }} {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }} {{- partial "share_icons.html" . }} {{- end }} From 84e208f98d6ff664da5550283e900df2b3144be5 Mon Sep 17 00:00:00 2001 From: Coderslang Master Date: Fri, 29 Jan 2021 19:55:07 +0200 Subject: [PATCH 166/617] Fix missing reciprocal and self-reference hreflang (#211) ref: - https://help.ahrefs.com/en/articles/2631143-missing-reciprocal-hreflang-no-return-tag-error-in-site-audit - https://help.ahrefs.com/en/articles/2754344-what-does-the-self-referencing-hreflang-annotation-missing-issue-in-site-audit-mean --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e733908b..5ba46fe9 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -71,7 +71,7 @@ {{- range .AlternativeOutputFormats -}} {{ end -}} -{{- range .Translations -}} +{{- range .AllTranslations -}} {{ end }} {{- partial "extend_head.html" . -}} From cc4fb703367f3b35c962c708115c708cc580763b Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 28 Jan 2021 20:33:01 +0530 Subject: [PATCH 167/617] rm translateX from post-title in single --- assets/css/post-single.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index c37d1255..017a3e97 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -4,8 +4,7 @@ .post-title { margin-bottom: 2px; - font-size: 40px; - transform: translateX(-2px) + font-size: 40px } .post-description { From a7e0b2f5a995e4575de567229dec59640596f158 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 28 Jan 2021 20:35:45 +0530 Subject: [PATCH 168/617] add check to display post-description in single --- layouts/_default/single.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b6298ac7..55eb38d2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,9 +6,11 @@ {{ .Title }} {{- if .Draft }}
  [draft]
{{- end }} + {{- if .Description }}
{{ .Description }}
+ {{- end }} {{- if not (.Param "hideMeta") }}