From 64156145138d6a1a2e8436d6062e297f272542d5 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 26 Dec 2023 11:22:55 +1100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=A8=20Code=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/labeller.yml | 8 +- .prettierignore | 8 ++ .prettierrc | 2 +- assets/js/menu.js | 4 +- assets/js/quicklink.js | 1 - assets/js/search.js | 1 + data/sharing.json | 2 +- .../content/docs/content-examples/index.ja.md | 2 +- .../content/docs/getting-started/index.ja.md | 2 +- .../docs/version-2/upgrade/index.ja.md | 5 +- .../content/samples/markdown/index.de.md | 4 +- .../content/samples/markdown/index.es.md | 4 +- .../content/samples/markdown/index.ja.md | 8 +- exampleSite/content/samples/markdown/index.md | 2 +- exampleSite/content/users/index.es.md | 2 +- exampleSite/content/users/index.ja.md | 2 +- exampleSite/content/users/index.md | 2 +- exampleSite/layouts/partials/home/custom.html | 7 +- i18n/cs.yaml | 2 +- layouts/_default/_markup/render-image.html | 8 +- layouts/_default/_markup/render-link.html | 1 + layouts/_default/baseof.html | 2 +- layouts/_default/index.json | 3 +- layouts/partials/analytics.html | 8 +- layouts/partials/article-link.html | 10 +-- layouts/partials/article-meta.html | 2 +- layouts/partials/logo.html | 19 ++--- layouts/partials/pagination.html | 5 -- layouts/partials/picture.html | 76 +++++++++---------- layouts/partials/vendor.html | 30 ++++++-- layouts/shortcodes/figure.html | 1 + layouts/shortcodes/screenshot.html | 1 + static/site.webmanifest | 22 +++++- 33 files changed, 154 insertions(+), 102 deletions(-) create mode 100644 .prettierignore diff --git a/.github/labeller.yml b/.github/labeller.yml index 72983a17..9e9e6ea0 100644 --- a/.github/labeller.yml +++ b/.github/labeller.yml @@ -1,7 +1,7 @@ i18n: -- changed-files: - - any-glob-to-any-file: i18n/* + - changed-files: + - any-glob-to-any-file: i18n/* documentation: -- changed-files: - - any-glob-to-any-file: '**/*.md' + - changed-files: + - any-glob-to-any-file: "**/*.md" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..1bc6419e --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +/assets/css/compiled/ +/assets/lib/ + +/layouts/_default/_markup/*.html +/layouts/shortcodes/figure.html +/layouts/shortcodes/screenshot.html + +/exampleSite/content/docs/version-2/lighthouse.html diff --git a/.prettierrc b/.prettierrc index 15acafac..a617bfaf 100644 --- a/.prettierrc +++ b/.prettierrc @@ -9,7 +9,7 @@ "trailingComma": "es5", "overrides": [ { - "files": ["*.html"], + "files": ["*.html", "layouts/_default/*.json"], "options": { "parser": "go-template" } diff --git a/assets/js/menu.js b/assets/js/menu.js index ec43bfcd..4d674e29 100644 --- a/assets/js/menu.js +++ b/assets/js/menu.js @@ -2,5 +2,5 @@ Closes the hamburger menu when a link is clicked. */ function close_menu() { - document.getElementById('menu-controller').checked=false -} \ No newline at end of file + document.getElementById("menu-controller").checked = false; +} diff --git a/assets/js/quicklink.js b/assets/js/quicklink.js index a1a89ad2..014d4ce0 100644 --- a/assets/js/quicklink.js +++ b/assets/js/quicklink.js @@ -1,4 +1,3 @@ window.addEventListener("load", () => { quicklink.listen(); }); - diff --git a/assets/js/search.js b/assets/js/search.js index 4a47ba58..5add4984 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -133,6 +133,7 @@ function executeQuery(term) { let resultsHTML = ""; if (results.length > 0) { + // prettier-ignore resultsHTML = results.map(function (value, key) { return `