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..7b975db1 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { - "plugins": ["prettier-plugin-go-template"], + "plugins": ["prettier-plugin-go-template", "prettier-plugin-tailwindcss"], "goTemplateBracketSpacing": true, "htmlWhitespaceSensitivity": "css", "printWidth": 100, @@ -9,7 +9,7 @@ "trailingComma": "es5", "overrides": [ { - "files": ["*.html"], + "files": ["*.html", "layouts/_default/*.json"], "options": { "parser": "go-template" } diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index ef827f27..0fae5498 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1192,8 +1192,8 @@ body:has(#menu-controller:checked) { .copy-button { visibility: hidden; position: absolute; - top: 0px; right: 0px; + top: 0px; z-index: 10; width: 5rem; cursor: pointer; diff --git a/assets/css/main.css b/assets/css/main.css index ee3a0f89..030d214b 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -67,7 +67,7 @@ body:has(#menu-controller:checked) { .toc ul, .toc li { - @apply px-0 leading-snug list-none; + @apply list-none px-0 leading-snug; } .toc ul ul { @apply ps-4; @@ -90,7 +90,7 @@ body:has(#menu-controller:checked) { @apply visible; } .copy-button { - @apply absolute top-0 right-0 z-10 invisible w-20 py-1 font-mono text-sm cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200; + @apply invisible absolute right-0 top-0 z-10 w-20 cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 py-1 font-mono text-sm text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200; } .copy-button:hover, .copy-button:focus, @@ -122,20 +122,20 @@ code { /* -- Chroma Highlight -- */ /* Background */ .chroma { - @apply py-3 rounded-md bg-neutral-50 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200; + @apply rounded-md bg-neutral-50 py-3 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200; } .chroma pre { - @apply p-0 m-0; + @apply m-0 p-0; } /* LineTable */ .chroma .lntable { - @apply block w-auto m-0 overflow-auto text-base; + @apply m-0 block w-auto overflow-auto text-base; } /* LineNumbersTable */ /* LineNumbers */ .chroma .lnt, .chroma .ln { - @apply px-2 mr-2 text-neutral-600 dark:text-neutral-300; + @apply mr-2 px-2 text-neutral-600 dark:text-neutral-300; } .chroma .lntd { @apply p-0 align-top; @@ -297,7 +297,7 @@ code { } /* CommentHashbang */ .chroma .ch { - @apply italic font-semibold text-neutral-500 dark:text-neutral-400; + @apply font-semibold italic text-neutral-500 dark:text-neutral-400; } /* GenericEmph */ .chroma .ge { 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 `
+
{{ i18n "error.404_error" | emojify }}
+
{{ i18n "list.no_articles" | emojify }}