From 1033afcac237ed6a5c8557dab219184332f3924f Mon Sep 17 00:00:00 2001 From: moonleg <93369181+moonleg@users.noreply.github.com> Date: Fri, 29 Oct 2021 16:34:03 +0200 Subject: [PATCH 01/14] Add danish translation (#611) --- i18n/da.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 i18n/da.yaml diff --git a/i18n/da.yaml b/i18n/da.yaml new file mode 100644 index 0000000..03b0abe --- /dev/null +++ b/i18n/da.yaml @@ -0,0 +1,28 @@ +- id: prev_page + translation: "Forrige Side" + +- id: next_page + translation: "Næste Side" + +- id: read_time + translation: + one: "1 min" + other: "{{ .Count }} min" + +- id: toc + translation: "Indholdsfortegnelse" + +- id: translations + translation: "Oversættelser" + +- id: home + translation: "Start" + +- id: edit_post + translation: "Rediger" + +- id: code_copy + translation: "kopier" + +- id: code_copied + translation: "kopieret!" From d81b87938bd6a6c7812f63a40871c6e7516b126e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 30 Oct 2021 13:33:15 +0530 Subject: [PATCH 02/14] Fix `params.fuseOpts` being ignored by Fuse.js by implementing a map of lower case to camel case parameters fixes: #556 --- assets/js/fastsearch.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/assets/js/fastsearch.js b/assets/js/fastsearch.js index 586941b..ea11022 100644 --- a/assets/js/fastsearch.js +++ b/assets/js/fastsearch.js @@ -26,7 +26,21 @@ window.onload = function () { 'content' ] }; - if (params.fuseOpts) options = params.fuseOpts; + if (params.fuseOpts) { + options = { + isCaseSensitive: params.fuseOpts.iscasesensitive ? params.fuseOpts.iscasesensitive : false, + includeScore: params.fuseOpts.includescore ? params.fuseOpts.includescore : false, + includeMatches: params.fuseOpts.includematches ? params.fuseOpts.includematches : false, + minMatchCharLength: params.fuseOpts.minmatchcharlength ? params.fuseOpts.minmatchcharlength : 1, + shouldSort: params.fuseOpts.shouldsort ? params.fuseOpts.shouldsort : true, + findAllMatches: params.fuseOpts.findallmatches ? params.fuseOpts.findallmatches : false, + keys: params.fuseOpts.keys ? params.fuseOpts.keys : ['title', 'permalink', 'summary', 'content'], + location: params.fuseOpts.location ? params.fuseOpts.location : 0, + threshold: params.fuseOpts.threshold ? params.fuseOpts.threshold : 0.4, + distance: params.fuseOpts.distance ? params.fuseOpts.distance : 100, + ignoreLocation: params.fuseOpts.ignorelocation ? params.fuseOpts.ignorelocation : true + } + } fuse = new Fuse(data, options); // build the index from the json file } } else { From 5f1d92493b95551911c03a762a1fa178bf232448 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 30 Oct 2021 13:57:22 +0530 Subject: [PATCH 03/14] Avoid caching search input between navigation --- layouts/_default/search.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 5ac2a24..2349587 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -21,7 +21,8 @@ From 2c6ae04a023c77d9385286e65684d8a639e1df8f Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Sat, 30 Oct 2021 10:28:42 -0400 Subject: [PATCH 04/14] Social-icons: Add Polywork icon. (#545) * Social-icons: Add Polywork icon. fixes #487 Thanks to https://icon-sets.iconify.design/simple-icons/polywork/ and Simple Icons Collaborators (where the SVG came from) * minor updates to svg Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com> --- layouts/partials/svg.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index f4e35ed..e3e7583 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -313,6 +313,12 @@ d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018" style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" /> +{{- else if (eq $icon_name "polywork") -}} + {{- else if (eq $icon_name "qq") -}} From b8c7df1ef95cd6248a05c03e6cdc4e5dff5d8d65 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 30 Oct 2021 19:40:11 +0530 Subject: [PATCH 05/14] Allow setting cutom meta `theme-color` and `msapplication-TileColor` fixes: #577 Usage: In Site Params: Params: assets: theme_color: color msapplication_TileColor: color --- 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 7f5bcb1..300a841 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -101,8 +101,8 @@ - + + {{- /* Generator */}} {{ hugo.Generator }} From 76ea33c89c04490b93a1147955dd930d49b4a00a Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 30 Oct 2021 20:01:35 +0530 Subject: [PATCH 06/14] Check if `menu` exists before using scroll position logic --- layouts/partials/footer.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 391c65a..8dee328 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -25,9 +25,11 @@