From 8c197127bffceeee01639ad9790350505b3648e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 3 Jun 2024 23:30:48 +0100 Subject: [PATCH 01/27] v2.71.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b318803b0..0caf183ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.70.0", + "version": "2.71.0", "description": "Blowfish theme for Hugo.", "scripts": { "postinstall": "vendor-copy", From 1884bcce5558cc588c3f3d95035eebec1bd97db9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 05:17:49 +0000 Subject: [PATCH 02/27] =?UTF-8?q?=F0=9F=93=8C=20Bump=20prettier=20from=203?= =?UTF-8?q?.2.5=20to=203.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf194df91..b82593e89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hugo-blowfish-theme", - "version": "2.70.0", + "version": "2.71.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hugo-blowfish-theme", - "version": "2.70.0", + "version": "2.71.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -25,7 +25,7 @@ "lite-youtube-embed": "^0.3.2", "mermaid": "^10.9.1", "packery": "^2.1.2", - "prettier": "^3.2.5", + "prettier": "^3.3.0", "prettier-plugin-go-template": "^0.0.15", "prettier-plugin-tailwindcss": "^0.5.14", "puppeteer": "^22.10.0", @@ -3312,9 +3312,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.0.tgz", + "integrity": "sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index 0caf183ae..323c2f6cf 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "lite-youtube-embed": "^0.3.2", "mermaid": "^10.9.1", "packery": "^2.1.2", - "prettier": "^3.2.5", + "prettier": "^3.3.0", "prettier-plugin-go-template": "^0.0.15", "prettier-plugin-tailwindcss": "^0.5.14", "puppeteer": "^22.10.0", From c901c00097e9416ddaeca32a1757d41528888d3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 05:17:58 +0000 Subject: [PATCH 03/27] =?UTF-8?q?=F0=9F=93=8C=20Bump=20prettier-plugin-tai?= =?UTF-8?q?lwindcss=20from=200.5.14=20to=200.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.14 to 0.6.1. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.14...v0.6.1) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf194df91..f66c051d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hugo-blowfish-theme", - "version": "2.70.0", + "version": "2.71.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hugo-blowfish-theme", - "version": "2.70.0", + "version": "2.71.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -27,7 +27,7 @@ "packery": "^2.1.2", "prettier": "^3.2.5", "prettier-plugin-go-template": "^0.0.15", - "prettier-plugin-tailwindcss": "^0.5.14", + "prettier-plugin-tailwindcss": "^0.6.1", "puppeteer": "^22.10.0", "rimraf": "^5.0.7", "tailwindcss": "^3.4.3", @@ -3342,9 +3342,9 @@ } }, "node_modules/prettier-plugin-tailwindcss": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.14.tgz", - "integrity": "sha512-Puaz+wPUAhFp8Lo9HuciYKM2Y2XExESjeT+9NQoVFXZsPPnc9VYss2SpxdQ6vbatmt8/4+SN0oe0I1cPDABg9Q==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.1.tgz", + "integrity": "sha512-AnbeYZu0WGj+QgKciUgdMnRxrqcxltleZPgdwfA5104BHM3siBLONN/HLW1yS2HvzSNkzpQ/JAj+LN0jcJO+0w==", "dev": true, "engines": { "node": ">=14.21.3" diff --git a/package.json b/package.json index 0caf183ae..2cd966b12 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "packery": "^2.1.2", "prettier": "^3.2.5", "prettier-plugin-go-template": "^0.0.15", - "prettier-plugin-tailwindcss": "^0.5.14", + "prettier-plugin-tailwindcss": "^0.6.1", "puppeteer": "^22.10.0", "rimraf": "^5.0.7", "tailwindcss": "^3.4.3", From 703946d02330a200691c5615d04889842c5f13bc Mon Sep 17 00:00:00 2001 From: nunocoracao <3803196+nunocoracao@users.noreply.github.com> Date: Thu, 6 Jun 2024 06:05:04 +0000 Subject: [PATCH 04/27] Update Hugo supported version --- config.toml | 2 +- release-versions/hugo-latest.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 4a157531d..e20c89863 100644 --- a/config.toml +++ b/config.toml @@ -2,4 +2,4 @@ [module.hugoVersion] extended = true min = "0.87.0" -max = "0.126.3" +max = "0.127.0" diff --git a/release-versions/hugo-latest.txt b/release-versions/hugo-latest.txt index 928f13de9..df74356c4 100644 --- a/release-versions/hugo-latest.txt +++ b/release-versions/hugo-latest.txt @@ -1 +1 @@ -v0.126.3 +v0.127.0 From 9c5b68fb22566a58320c2d39cdc56d8fdd44df67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sat, 8 Jun 2024 12:20:26 +0100 Subject: [PATCH 05/27] fix https://github.com/nunocoracao/blowfish/issues/1521 --- assets/js/zen-mode.js | 86 +++++++++++++------------ exampleSite/config/_default/params.toml | 2 +- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/assets/js/zen-mode.js b/assets/js/zen-mode.js index 62ccc6653..0da48428d 100644 --- a/assets/js/zen-mode.js +++ b/assets/js/zen-mode.js @@ -1,57 +1,59 @@ function _toogleZenMode(zendModeButton) { - // Nodes selection - const body = document.querySelector('body'); - const tocRight = document.querySelector('.toc-right'); - const tocInside = document.querySelector('.toc-inside'); - const articleContent = document.querySelector('.article-content'); - const header = document.querySelector('#single_header'); + // Nodes selection + const body = document.querySelector('body'); + const tocRight = document.querySelector('.toc-right'); + const tocInside = document.querySelector('.toc-inside'); + const articleContent = document.querySelector('.article-content'); + const header = document.querySelector('#single_header'); - // Add semantic class into body tag - body.classList.toggle('zen-mode-enable'); + // Add semantic class into body tag + body.classList.toggle('zen-mode-enable'); - // Show/Hide 'toc right' and 'toc inside' + // Show/Hide 'toc right' and 'toc inside' + if (tocRight) tocRight.classList.toggle('lg:block'); + if (tocInside) tocInside.classList.toggle('lg:hidden'); - // Change width of article content - articleContent.classList.toggle('max-w-fit'); - articleContent.classList.toggle('max-w-prose'); - - // Read i18n title from data-attributes - const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable'); - const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable'); - - if (body.classList.contains('zen-mode-enable')) { - // Persist configuration - //localStorage.setItem('blowfish-zen-mode-enabled', 'true'); - - // Change title to enable - zendModeButton.setAttribute('title', titleI18nEnable) - // Auto-scroll to title article - window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90); - } else { - //localStorage.setItem('blowfish-zen-mode-enabled', 'false'); - zendModeButton.setAttribute('title', titleI18nDisable); - document.querySelector('body').scrollIntoView(); - } + // Change width of article content + articleContent.classList.toggle('max-w-fit'); + articleContent.classList.toggle('max-w-prose'); + + // Read i18n title from data-attributes + const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable'); + const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable'); + + if (body.classList.contains('zen-mode-enable')) { + // Persist configuration + //localStorage.setItem('blowfish-zen-mode-enabled', 'true'); + + // Change title to enable + zendModeButton.setAttribute('title', titleI18nEnable) + // Auto-scroll to title article + window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90); + } else { + //localStorage.setItem('blowfish-zen-mode-enabled', 'false'); + zendModeButton.setAttribute('title', titleI18nDisable); + document.querySelector('body').scrollIntoView(); + } } function _registerZendModeButtonClick(zendModeButton) { - zendModeButton.addEventListener('click', function (event) { - event.preventDefault(); + zendModeButton.addEventListener('click', function (event) { + event.preventDefault(); - // Toggle zen-mode - _toogleZenMode(zendModeButton); - }); + // Toggle zen-mode + _toogleZenMode(zendModeButton); + }); } (function init() { - window.addEventListener("DOMContentLoaded", (event) => { - // Register click on 'zen-mode-button' node element - const zendModeButton = document.getElementById('zen-mode-button'); - if(zendModeButton !== null && zendModeButton !== undefined) { - _registerZendModeButtonClick(zendModeButton); - } - }); + window.addEventListener("DOMContentLoaded", (event) => { + // Register click on 'zen-mode-button' node element + const zendModeButton = document.getElementById('zen-mode-button'); + if (zendModeButton !== null && zendModeButton !== undefined) { + _registerZendModeButtonClick(zendModeButton); + } + }); })(); \ No newline at end of file diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 325917e7e..be71adf10 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -67,7 +67,7 @@ smartTOCHideUnfocusedChildren = false showPagination = true invertPagination = false showReadingTime = true - showTableOfContents = true + showTableOfContents = false showRelatedContent = true relatedContentLimit = 6 showTaxonomies = true From be7c4e8a8bf509d647f0e8abb853454b900e73ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sat, 8 Jun 2024 12:24:32 +0100 Subject: [PATCH 06/27] fix https://github.com/nunocoracao/blowfish/issues/1514 --- exampleSite/content/docs/getting-started/index.it.md | 6 +++--- exampleSite/content/docs/getting-started/index.ja.md | 6 +++--- exampleSite/content/docs/getting-started/index.md | 6 +++--- exampleSite/content/docs/getting-started/index.zh-cn.md | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/exampleSite/content/docs/getting-started/index.it.md b/exampleSite/content/docs/getting-started/index.it.md index 04448d738..67919e473 100644 --- a/exampleSite/content/docs/getting-started/index.it.md +++ b/exampleSite/content/docs/getting-started/index.it.md @@ -26,10 +26,10 @@ The config files that ship with Blowfish contain all of the possible settings th ## Basic configuration -Before creating any content, there are a few things you should set for a new installation. Starting in the `config.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content. +Before creating any content, there are a few things you should set for a new installation. Starting in the `hugo.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content. ```toml -# config/_default/config.toml +# config/_default/hugo.toml baseURL = "https://your_domain.com/" languageCode = "en" @@ -40,7 +40,7 @@ The next step is to configure the language settings. Although Blowfish supports Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`. {{< alert >}} -Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`. +Note that the language code in the language config filename should match the `languageCode` setting in `hugo.toml`. {{< /alert >}} ```toml diff --git a/exampleSite/content/docs/getting-started/index.ja.md b/exampleSite/content/docs/getting-started/index.ja.md index b1235bad5..5d8230b9e 100644 --- a/exampleSite/content/docs/getting-started/index.ja.md +++ b/exampleSite/content/docs/getting-started/index.ja.md @@ -26,10 +26,10 @@ The config files that ship with Blowfish contain all of the possible settings th ## Basic configuration -Before creating any content, there are a few things you should set for a new installation. Starting in the `config.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content. +Before creating any content, there are a few things you should set for a new installation. Starting in the `hugo.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content. ```toml -# config/_default/config.toml +# config/_default/hugo.toml baseURL = "https://your_domain.com/" languageCode = "en" @@ -40,7 +40,7 @@ The next step is to configure the language settings. Although Blowfish supports Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`. {{< alert >}} -Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`. +Note that the language code in the language config filename should match the `languageCode` setting in `hugo.toml`. {{< /alert >}} ```toml diff --git a/exampleSite/content/docs/getting-started/index.md b/exampleSite/content/docs/getting-started/index.md index b1235bad5..5d8230b9e 100644 --- a/exampleSite/content/docs/getting-started/index.md +++ b/exampleSite/content/docs/getting-started/index.md @@ -26,10 +26,10 @@ The config files that ship with Blowfish contain all of the possible settings th ## Basic configuration -Before creating any content, there are a few things you should set for a new installation. Starting in the `config.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content. +Before creating any content, there are a few things you should set for a new installation. Starting in the `hugo.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content. ```toml -# config/_default/config.toml +# config/_default/hugo.toml baseURL = "https://your_domain.com/" languageCode = "en" @@ -40,7 +40,7 @@ The next step is to configure the language settings. Although Blowfish supports Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`. {{< alert >}} -Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`. +Note that the language code in the language config filename should match the `languageCode` setting in `hugo.toml`. {{< /alert >}} ```toml diff --git a/exampleSite/content/docs/getting-started/index.zh-cn.md b/exampleSite/content/docs/getting-started/index.zh-cn.md index f7b8ad1d5..0000536df 100644 --- a/exampleSite/content/docs/getting-started/index.zh-cn.md +++ b/exampleSite/content/docs/getting-started/index.zh-cn.md @@ -26,21 +26,21 @@ Blowfish 中的配置文件中包含了主题需要的所有可能的设置选 ## 基础设置 -在刚刚安装完成,创建内容之前,有几个设置需要关注。从 `config.toml` 开始,设置 `baseURL` 和 `languageCode` 参数。`languageCode`参数是用来指定你创作内容的主要语言。 +在刚刚安装完成,创建内容之前,有几个设置需要关注。从 `hugo.toml` 开始,设置 `baseURL` 和 `languageCode` 参数。`languageCode`参数是用来指定你创作内容的主要语言。 ```toml -# config/_default/config.toml +# config/_default/hugo.toml baseURL = "https://your_domain.com/" languageCode = "en" ``` -下一步是设置语言。尽管 Blowfish 支持多语言,但是 `config.toml` 只能配置一个主语言。 +下一步是设置语言。尽管 Blowfish 支持多语言,但是 `hugo.toml` 只能配置一个主语言。 在 `config/_default` 文件夹中找到 `languages.en.toml`。如果你的主语言是英语,你可以直接使用此文件。否则需要重命名为主语言对应的文件名。例如,如果主语言是法语,那么需要将文件命名为 `languages.fr.toml`。 {{< alert >}} -注意:语言配置文件名中的语言代码需要与 `config.toml` 中 `languageCode` 相匹配。 +注意:语言配置文件名中的语言代码需要与 `hugo.toml` 中 `languageCode` 相匹配。 {{< /alert >}} ```toml From 89e048cc11ce063c7a97286b4adf22f24afccb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sat, 8 Jun 2024 12:41:51 +0100 Subject: [PATCH 07/27] fixed configs --- exampleSite/config/_default/params.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index be71adf10..325917e7e 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -67,7 +67,7 @@ smartTOCHideUnfocusedChildren = false showPagination = true invertPagination = false showReadingTime = true - showTableOfContents = false + showTableOfContents = true showRelatedContent = true relatedContentLimit = 6 showTaxonomies = true From 0efede2f1d0f365d31aecb3af714ec5f66d10dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 10 Jun 2024 12:07:42 +0100 Subject: [PATCH 08/27] fix https://github.com/nunocoracao/blowfish/issues/1474 --- assets/css/compiled/main.css | 343 ++++++++++++++++++++++++----------- layouts/_default/baseof.html | 2 +- layouts/partials/toc.html | 36 +++- package-lock.json | 13 ++ package.json | 1 + tailwind.config.js | 3 +- 6 files changed, 286 insertions(+), 112 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 40c6f7c26..d3f8da3aa 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -655,6 +655,13 @@ select { outline:1px auto -webkit-focus-ring-color } +@supports (-moz-appearance:none) { + * { + scrollbar-color:initial; + scrollbar-width:initial + } +} + *, ::before, ::after { --tw-border-spacing-x:0; --tw-border-spacing-y:0; @@ -2213,6 +2220,10 @@ select { overflow:visible } +.overscroll-contain { + overscroll-behavior:contain +} + .scroll-smooth { scroll-behavior:smooth } @@ -3074,6 +3085,118 @@ select { transition-timing-function:linear } +.scrollbar::-webkit-scrollbar-track { + background-color:var(--scrollbar-track); + border-radius:var(--scrollbar-track-radius) +} + +.scrollbar::-webkit-scrollbar-track:hover { + background-color:var(--scrollbar-track-hover, var(--scrollbar-track)) +} + +.scrollbar::-webkit-scrollbar-track:active { + background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track))) +} + +.scrollbar::-webkit-scrollbar-thumb { + background-color:var(--scrollbar-thumb); + border-radius:var(--scrollbar-thumb-radius) +} + +.scrollbar::-webkit-scrollbar-thumb:hover { + background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb)) +} + +.scrollbar::-webkit-scrollbar-thumb:active { + background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb))) +} + +.scrollbar::-webkit-scrollbar-corner { + background-color:var(--scrollbar-corner); + border-radius:var(--scrollbar-corner-radius) +} + +.scrollbar::-webkit-scrollbar-corner:hover { + background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner)) +} + +.scrollbar::-webkit-scrollbar-corner:active { + background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner))) +} + +@supports (-moz-appearance:none) { + .scrollbar { + scrollbar-width:auto; + scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial) + } +} + +.scrollbar::-webkit-scrollbar { + display:block; + width:var(--scrollbar-width, 16px); + height:var(--scrollbar-height, 16px) +} + +.scrollbar-thin::-webkit-scrollbar-track { + background-color:var(--scrollbar-track); + border-radius:var(--scrollbar-track-radius) +} + +.scrollbar-thin::-webkit-scrollbar-track:hover { + background-color:var(--scrollbar-track-hover, var(--scrollbar-track)) +} + +.scrollbar-thin::-webkit-scrollbar-track:active { + background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track))) +} + +.scrollbar-thin::-webkit-scrollbar-thumb { + background-color:var(--scrollbar-thumb); + border-radius:var(--scrollbar-thumb-radius) +} + +.scrollbar-thin::-webkit-scrollbar-thumb:hover { + background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb)) +} + +.scrollbar-thin::-webkit-scrollbar-thumb:active { + background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb))) +} + +.scrollbar-thin::-webkit-scrollbar-corner { + background-color:var(--scrollbar-corner); + border-radius:var(--scrollbar-corner-radius) +} + +.scrollbar-thin::-webkit-scrollbar-corner:hover { + background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner)) +} + +.scrollbar-thin::-webkit-scrollbar-corner:active { + background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner))) +} + +@supports (-moz-appearance:none) { + .scrollbar-thin { + scrollbar-width:thin; + scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial) + } +} + +.scrollbar-thin::-webkit-scrollbar { + display:block; + width:8px; + height:8px +} + +.scrollbar-track-neutral-200 { + --scrollbar-track:rgba(var(--color-neutral-200), 1) !important +} + +.scrollbar-thumb-neutral-400 { + --scrollbar-thumb:rgba(var(--color-neutral-400), 1) !important +} + .\!\[clip\:rect\(0\2c 0\2c 0\2c 0\)\] { clip:rect(0,0,0,0) !important } @@ -4724,6 +4847,102 @@ pre { display:none } +.group:hover .group-hover\:text-primary-300 { + --tw-text-opacity:1; + color:rgba(var(--color-primary-300), var(--tw-text-opacity)) +} + +.group:hover .group-hover\:text-primary-600 { + --tw-text-opacity:1; + color:rgba(var(--color-primary-600), var(--tw-text-opacity)) +} + +.group:hover .group-hover\:underline { + text-decoration-line:underline +} + +.group:hover .group-hover\:decoration-primary-500 { + text-decoration-color:rgba(var(--color-primary-500), 1) +} + +.group:hover .group-hover\:opacity-100 { + opacity:1 +} + +.data-\[twe-carousel-fade\]\:z-0[data-twe-carousel-fade] { + z-index:0 +} + +.data-\[twe-carousel-fade\]\:z-\[1\][data-twe-carousel-fade] { + z-index:1 +} + +.data-\[popper-reference-hidden\]\:hidden[data-popper-reference-hidden] { + display:none +} + +.data-\[twe-carousel-fade\]\:opacity-0[data-twe-carousel-fade] { + opacity:0 +} + +.data-\[twe-carousel-fade\]\:opacity-100[data-twe-carousel-fade] { + opacity:1 +} + +.data-\[twe-carousel-fade\]\:duration-\[600ms\][data-twe-carousel-fade] { + transition-duration:600ms +} + +.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-x-0 { + border-left-width:0px; + border-right-width:0px +} + +.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-x-0 { + border-left-width:0px; + border-right-width:0px +} + +.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-e-0 { + border-inline-end-width:0px +} + +.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-s-0 { + border-inline-start-width:0px +} + +.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-t { + border-top-width:1px +} + +.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-e-0 { + border-inline-end-width:0px +} + +.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-s-0 { + border-inline-start-width:0px +} + +.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-t { + border-top-width:1px +} + +.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-solid { + border-style:solid +} + +.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-solid { + border-style:solid +} + +.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-t-transparent { + border-top-color:transparent +} + +.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-t-transparent { + border-top-color:transparent +} + .hover\:border-transparent:hover { border-color:transparent } @@ -4837,102 +5056,6 @@ pre { outline-color:transparent } -.group:hover .group-hover\:text-primary-300 { - --tw-text-opacity:1; - color:rgba(var(--color-primary-300), var(--tw-text-opacity)) -} - -.group:hover .group-hover\:text-primary-600 { - --tw-text-opacity:1; - color:rgba(var(--color-primary-600), var(--tw-text-opacity)) -} - -.group:hover .group-hover\:underline { - text-decoration-line:underline -} - -.group:hover .group-hover\:decoration-primary-500 { - text-decoration-color:rgba(var(--color-primary-500), 1) -} - -.group:hover .group-hover\:opacity-100 { - opacity:1 -} - -.data-\[twe-carousel-fade\]\:z-0[data-twe-carousel-fade] { - z-index:0 -} - -.data-\[twe-carousel-fade\]\:z-\[1\][data-twe-carousel-fade] { - z-index:1 -} - -.data-\[popper-reference-hidden\]\:hidden[data-popper-reference-hidden] { - display:none -} - -.data-\[twe-carousel-fade\]\:opacity-0[data-twe-carousel-fade] { - opacity:0 -} - -.data-\[twe-carousel-fade\]\:opacity-100[data-twe-carousel-fade] { - opacity:1 -} - -.data-\[twe-carousel-fade\]\:duration-\[600ms\][data-twe-carousel-fade] { - transition-duration:600ms -} - -.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-x-0 { - border-left-width:0px; - border-right-width:0px -} - -.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-x-0 { - border-left-width:0px; - border-right-width:0px -} - -.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-e-0 { - border-inline-end-width:0px -} - -.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-s-0 { - border-inline-start-width:0px -} - -.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-t { - border-top-width:1px -} - -.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-e-0 { - border-inline-end-width:0px -} - -.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-s-0 { - border-inline-start-width:0px -} - -.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-t { - border-top-width:1px -} - -.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-solid { - border-style:solid -} - -.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-solid { - border-style:solid -} - -.group[data-twe-input-focused] .group-data-\[twe-input-focused\]\:border-t-transparent { - border-top-color:transparent -} - -.group[data-twe-input-state-active] .group-data-\[twe-input-state-active\]\:border-t-transparent { - border-top-color:transparent -} - @media (prefers-reduced-motion: reduce) { .motion-reduce\:transition-none { transition-property:none @@ -5094,6 +5217,24 @@ pre { opacity:0.6 } +.dark\:scrollbar-track-neutral-800:is(.dark *) { + --scrollbar-track:rgba(var(--color-neutral-800), 1) !important +} + +.dark\:scrollbar-thumb-neutral-600:is(.dark *) { + --scrollbar-thumb:rgba(var(--color-neutral-600), 1) !important +} + +.group:hover .dark\:group-hover\:text-neutral-700:is(.dark *) { + --tw-text-opacity:1; + color:rgba(var(--color-neutral-700), var(--tw-text-opacity)) +} + +.group:hover .dark\:group-hover\:text-primary-400:is(.dark *) { + --tw-text-opacity:1; + color:rgba(var(--color-primary-400), var(--tw-text-opacity)) +} + .dark\:hover\:\!bg-primary-700:hover:is(.dark *) { --tw-bg-opacity:1 !important; background-color:rgba(var(--color-primary-700), var(--tw-bg-opacity)) !important @@ -5124,16 +5265,6 @@ pre { background-color:rgba(var(--color-primary-900), var(--tw-bg-opacity)) } -.group:hover .dark\:group-hover\:text-neutral-700:is(.dark *) { - --tw-text-opacity:1; - color:rgba(var(--color-neutral-700), var(--tw-text-opacity)) -} - -.group:hover .dark\:group-hover\:text-primary-400:is(.dark *) { - --tw-text-opacity:1; - color:rgba(var(--color-primary-400), var(--tw-text-opacity)) -} - @media (min-width: 640px) { .sm\:mb-0 { margin-bottom:0px diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3aaa9f418..728db4d15 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ {{- partial "head.html" . -}} + class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32 scrollbar scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600"> -{{ if .Site.Params.smartTOC }} {{ end }} + + diff --git a/package-lock.json b/package-lock.json index a04a0d4dc..3a1fce945 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "prettier-plugin-tailwindcss": "^0.6.1", "puppeteer": "^22.10.0", "rimraf": "^5.0.7", + "tailwind-scrollbar": "^3.1.0", "tailwindcss": "^3.4.3", "tw-elements": "2.0.0", "typeit": "^8.8.3", @@ -4027,6 +4028,18 @@ "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" }, + "node_modules/tailwind-scrollbar": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tailwind-scrollbar/-/tailwind-scrollbar-3.1.0.tgz", + "integrity": "sha512-pmrtDIZeHyu2idTejfV59SbaJyvp1VRjYxAjZBH0jnyrPRo6HL1kD5Glz8VPagasqr6oAx6M05+Tuw429Z8jxg==", + "dev": true, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "tailwindcss": "3.x" + } + }, "node_modules/tailwindcss": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", diff --git a/package.json b/package.json index af9c98fb0..eebdc267b 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "prettier-plugin-tailwindcss": "^0.6.1", "puppeteer": "^22.10.0", "rimraf": "^5.0.7", + "tailwind-scrollbar": "^3.1.0", "tailwindcss": "^3.4.3", "tw-elements": "2.0.0", "typeit": "^8.8.3", diff --git a/tailwind.config.js b/tailwind.config.js index 114f1e7d7..bd811f7e1 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -176,6 +176,7 @@ module.exports = { }, plugins: [ require("@tailwindcss/typography"), - require('@tailwindcss/forms') + require('@tailwindcss/forms'), + require('tailwind-scrollbar')({ preferredStrategy: 'pseudoelements' }) ], }; From a59a7e4fbf1018276a94dca0b9b09280e499532b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 10 Jun 2024 17:08:31 +0100 Subject: [PATCH 09/27] polish --- layouts/partials/toc.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 69e37aadf..af08d280f 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1,5 +1,5 @@