diff --git a/.github/labeller.yml b/.github/labeller.yml index 0d55a674c..9e9e6ea0b 100644 --- a/.github/labeller.yml +++ b/.github/labeller.yml @@ -1,6 +1,7 @@ i18n: - - i18n/* + - changed-files: + - any-glob-to-any-file: i18n/* documentation: - - "*.md" - - exampleSite/content/* + - changed-files: + - any-glob-to-any-file: "**/*.md" diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 300172c4b..181655bde 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -19,7 +19,7 @@ jobs: fetch-depth: 0 - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@v3 with: hugo-version: "latest" extended: true @@ -29,7 +29,7 @@ jobs: run: hugo --minify --themesDir ../.. --buildDrafts --baseURL https://jpanther.github.io/congo/ - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 if: ${{ github.ref == 'refs/heads/stable' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 8fb77bf9f..c52986cc1 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Label - uses: actions/labeler@v4 + uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeller.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 38d469768..49d875319 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: days-before-stale: 120 days-before-close: 30 diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 51067c93d..5636cf60b 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@v3 with: hugo-version: "latest" extended: true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..1bc6419e8 --- /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 15acaface..7b975db1d 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/CHANGELOG.md b/CHANGELOG.md index a44994b83..8d38ee32b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,25 +8,80 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added +- Umami Analytics support ([#832](https://github.com/jpanther/congo/pull/832)) +- Theme parameter to set a default HTML theme colour ([#849](https://github.com/jpanther/congo/pull/849)) +- New icon for `bluesky` ([#851](https://github.com/jpanther/congo/pull/851)) + +## [2.8.2] - 2024-04-17 + +### Added + +- Tamil translation ([#830](https://github.com/jpanther/congo/pull/830)) +- Vietnamese translation ([#845](https://github.com/jpanther/congo/pull/845)) +- Swedish translation ([#852](https://github.com/jpanther/congo/pull/852)) + +### Changed + +- Upgrade to KaTeX v0.16.10 ([#839](https://github.com/jpanther/congo/pull/839)) +- Upgrade to Typography v0.5.12 ([#841](https://github.com/jpanther/congo/pull/841), [#860](https://github.com/jpanther/congo/pull/860)) +- Upgrade to Tailwind v3.4.3 ([#843](https://github.com/jpanther/congo/pull/843)) + +### Fixed + +- Background color inconsistent on mobile when dark mode enabled ([#796](https://github.com/jpanther/congo/issues/796)) + +## [2.8.1] - 2024-03-09 + +### Changed + +- Upgrade to ChartJS v4.4.2 ([#817](https://github.com/jpanther/congo/pull/817)) +- Upgrade to Mermaid v10.9.0 ([#825](https://github.com/jpanther/congo/pull/825)) + +### Fixed + +- Table of Contents missing left border detail ([#794](https://github.com/jpanther/congo/issues/794)) +- `x-twitter` option missing when using sharing links ([#809](https://github.com/jpanther/congo/issues/809)) +- Chinese default config contains incorrect `author` block name ([#807](https://github.com/jpanther/congo/pull/807)) +- Links in articles are prefixed with a blank space ([#813](https://github.com/jpanther/congo/pull/813)) +- HTML tables would not fill the container width on desktop ([#826](https://github.com/jpanther/congo/issues/826)) + +## [2.8.0] - 2024-01-22 + +### Added + - Quicklink support ([#646](https://github.com/jpanther/congo/pull/646)) - Automatic support for WebP images ([#693](https://github.com/jpanther/congo/pull/693)) - Warning when building if links to Markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691)) - Ability to share articles to Telegram and Line ([#719](https://github.com/jpanther/congo/pull/719)) -- New icon for `line` ([#719](https://github.com/jpanther/congo/pull/719)) +- New icons for `line`, `google-scholar`, `mendeley` and `weibo` ([#719](https://github.com/jpanther/congo/pull/719), [#755](https://github.com/jpanther/congo/pull/755), [#756](https://github.com/jpanther/congo/pull/756)) +- Weibo sharing links ([#756](https://github.com/jpanther/congo/pull/756)) +- Support for Tailwind '950' colour variants ([#751](https://github.com/jpanther/congo/pull/751)) +- Table of contents will now scroll if taller than the browser height ([#733](https://github.com/jpanther/congo/pull/733)) +- External URL article stubs now auto-redirect if leaf pages are generated ([#778](https://github.com/jpanther/congo/pull/778)) +- Korean translation ([#731](https://github.com/jpanther/congo/pull/731)) +- Chinese translation of Example site and Docs ([#776](https://github.com/jpanther/congo/pull/776)) ### Changed - ⚠️ Hugo extended version is now required when building sites - ⚠️ Author params block in language configuration has been moved to `params.author` ([#704](https://github.com/jpanther/congo/pull/704)) - Refactored image logic into a new `picture.html` partial ([#693](https://github.com/jpanther/congo/pull/693)) +- Upgrade to ChartJS v4.4.1 ([#736](https://github.com/jpanther/congo/pull/736)) +- Upgrade to Tailwind v3.4.1 ([#737](https://github.com/jpanther/congo/pull/737), [#752](https://github.com/jpanther/congo/pull/752), [#759](https://github.com/jpanther/congo/pull/759), [#774](https://github.com/jpanther/congo/pull/774)) +- Upgrade to Mermaid v10.7.0 ([#782](https://github.com/jpanther/congo/pull/782)) +- Updated Japanese translation ([#750](https://github.com/jpanther/congo/pull/750)) ### Fixed - Hamburger menu is not dismissed when links are clicked ([#705](https://github.com/jpanther/congo/pull/705)) +- KaTeX, table and code elements wider than the page are not formatted correctly ([#753](https://github.com/jpanther/congo/pull/753)) +- 'ß' character is output at the top of articles ([#764](https://github.com/jpanther/congo/pull/764)) +- Article metadata element is output when there is no metadata to display ([#786](https://github.com/jpanther/congo/pull/786)) +- Header elements not vertically centered when using locale switcher ([#788](https://github.com/jpanther/congo/pull/788)) ### Removed -- Fathom Analytics custom domain parameter as this is no longer supported by Fathom +- Fathom Analytics custom domain parameter, as this is no longer supported by Fathom ## [2.7.6] - 2023-11-26 @@ -825,7 +880,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Advanced customisation using simple Tailwind colour definitions and styles - Fully documented -[Unreleased]: https://github.com/jpanther/congo/compare/v2.7.6...HEAD +[Unreleased]: https://github.com/jpanther/congo/compare/v2.8.2...HEAD +[2.8.2]: https://github.com/jpanther/congo/compare/v2.8.1...v2.8.2 +[2.8.1]: https://github.com/jpanther/congo/compare/v2.8.0...v2.8.1 +[2.8.0]: https://github.com/jpanther/congo/compare/v2.7.6...v2.8.0 [2.7.6]: https://github.com/jpanther/congo/compare/v2.7.5...v2.7.6 [2.7.5]: https://github.com/jpanther/congo/compare/v2.7.4...v2.7.5 [2.7.4]: https://github.com/jpanther/congo/compare/v2.7.3...v2.7.4 diff --git a/README.md b/README.md index 4786ae4be..d1d772a65 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Congo is designed to be a powerful, lightweight theme for [Hugo](https://gohugo. - Heading anchors, Tables of Contents, Code copy, Buttons, Badges and more - HTML and Emoji support in articles 🎉 - SEO friendly with links for sharing to social media -- Fathom Analytics and Google Analytics support +- Fathom Analytics, Plausible Analytics, Umami Analytics and Google Analytics support - RSS feeds, Favicons and comments support - Advanced customisation using simple Tailwind colour definitions and styles - Optimised for performance and accessibility with perfect Lighthouse scores diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 8b8868aa4..c5fd308e6 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1,6 +1,6 @@ -/*! Congo v2.7.6 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v2.8.2 | MIT License | https://github.com/jpanther/congo */ -/*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com */ +/*! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com */ /* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) @@ -32,9 +32,11 @@ 4. Use the user's configured `sans` font-family by default. 5. Use the user's configured `sans` font-feature-settings by default. 6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS */ -html { +html, +:host { line-height: 1.5; /* 1 */ -webkit-text-size-adjust: 100%; @@ -44,12 +46,14 @@ html { -o-tab-size: 4; tab-size: 4; /* 3 */ - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ font-feature-settings: normal; /* 5 */ font-variation-settings: normal; /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ } /* @@ -121,8 +125,10 @@ strong { } /* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. */ code, @@ -131,8 +137,12 @@ samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ - font-size: 1em; + font-feature-settings: normal; /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ } /* @@ -201,6 +211,8 @@ textarea { /* 1 */ line-height: inherit; /* 1 */ + letter-spacing: inherit; + /* 1 */ color: inherit; /* 1 */ margin: 0; @@ -224,9 +236,9 @@ select { */ button, -[type='button'], -[type='reset'], -[type='submit'] { +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { -webkit-appearance: button; /* 1 */ background-color: transparent; @@ -482,6 +494,10 @@ video { --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; } ::backdrop { @@ -532,6 +548,10 @@ video { --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; } .prose { @@ -587,7 +607,7 @@ video { list-style-type: decimal; margin-top: 1.25em; margin-bottom: 1.25em; - padding-left: 1.625em; + padding-inline-start: 1.625em; } .prose :where(ol[type="A"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { @@ -630,7 +650,7 @@ video { list-style-type: disc; margin-top: 1.25em; margin-bottom: 1.25em; - padding-left: 1.625em; + padding-inline-start: 1.625em; } .prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker { @@ -659,12 +679,12 @@ video { font-weight: 500; font-style: italic; color: var(--tw-prose-quotes); - border-left-width: 0.25rem; - border-left-color: var(--tw-prose-quote-borders); + border-inline-start-width: 0.25rem; + border-inline-start-color: var(--tw-prose-quote-borders); quotes: "\201C""\201D""\2018""\2019"; margin-top: 1.6em; margin-bottom: 1.6em; - padding-left: 1em; + padding-inline-start: 1em; } .prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::before { @@ -741,6 +761,11 @@ video { margin-bottom: 2em; } +.prose :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} + .prose :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { font-weight: 600; font-family: inherit; @@ -749,9 +774,9 @@ video { font-size: 0.9rem; border-radius: 0.25rem; padding-top: 0.1875em; - padding-right: 0.375em; + padding-inline-end: 0.375em; padding-bottom: 0.1875em; - padding-left: 0.375em; + padding-inline-start: 0.375em; background-color: rgba(var(--color-neutral-200), 1); padding: 0.1rem 0.4rem; } @@ -811,9 +836,9 @@ video { margin-bottom: 1.7142857em; border-radius: 0.375rem; padding-top: 0.8571429em; - padding-right: 1.1428571em; + padding-inline-end: 1.1428571em; padding-bottom: 0.8571429em; - padding-left: 1.1428571em; + padding-inline-start: 1.1428571em; } .prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { @@ -839,7 +864,7 @@ video { .prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) { width: 100%; table-layout: auto; - text-align: left; + text-align: start; margin-top: 2em; margin-bottom: 2em; font-size: 0.875em; @@ -855,9 +880,9 @@ video { color: var(--tw-prose-headings); font-weight: 600; vertical-align: bottom; - padding-right: 0.5714286em; + padding-inline-end: 0.5714286em; padding-bottom: 0.5714286em; - padding-left: 0.5714286em; + padding-inline-start: 0.5714286em; } .prose :where(tbody tr):not(:where([class~="not-prose"],[class~="not-prose"] *)) { @@ -940,22 +965,17 @@ video { margin-bottom: 0; } -.prose :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) { - margin-top: 2em; - margin-bottom: 2em; -} - .prose :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { margin-top: 0.5em; margin-bottom: 0.5em; } .prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { - padding-left: 0.375em; + padding-inline-start: 0.375em; } .prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { - padding-left: 0.375em; + padding-inline-start: 0.375em; } .prose :where(.prose > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) { @@ -991,7 +1011,7 @@ video { .prose :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { margin-top: 0.5em; - padding-left: 1.625em; + padding-inline-start: 1.625em; } .prose :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { @@ -1011,26 +1031,26 @@ video { } .prose :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { - padding-left: 0; + padding-inline-start: 0; } .prose :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { - padding-right: 0; + padding-inline-end: 0; } .prose :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) { padding-top: 0.5714286em; - padding-right: 0.5714286em; + padding-inline-end: 0.5714286em; padding-bottom: 0.5714286em; - padding-left: 0.5714286em; + padding-inline-start: 0.5714286em; } .prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { - padding-left: 0; + padding-inline-start: 0; } .prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { - padding-right: 0; + padding-inline-end: 0; } .prose :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) { @@ -1094,32 +1114,32 @@ body:has(#menu-controller:checked) { /* RTL support */ -:is([dir="rtl"] .prose blockquote) { +.prose blockquote:where([dir="rtl"], [dir="rtl"] *) { border-left-width: 0px; border-right-width: 4px; padding-right: 1rem; } -:is([dir="rtl"] .prose ul > li),:is([dir="rtl"] -.prose ol > li) { +.prose ul > li:where([dir="rtl"], [dir="rtl"] *), +.prose ol > li:where([dir="rtl"], [dir="rtl"] *) { margin-right: 1.75rem; padding-left: 0px; padding-right: 0.5rem; } -:is([dir="rtl"] .prose ol > li):before,:is([dir="rtl"] -.prose ul > li):before { +.prose ol > li:where([dir="rtl"], [dir="rtl"] *):before, +.prose ul > li:where([dir="rtl"], [dir="rtl"] *):before { left: auto; right: 0.25rem; } -:is([dir="rtl"] .prose thead td:first-child),:is([dir="rtl"] -.prose thead th:first-child) { +.prose thead td:first-child:where([dir="rtl"], [dir="rtl"] *), +.prose thead th:first-child:where([dir="rtl"], [dir="rtl"] *) { padding-right: 0px; } -:is([dir="rtl"] .prose thead td:last-child),:is([dir="rtl"] -.prose thead th:last-child) { +.prose thead td:last-child:where([dir="rtl"], [dir="rtl"] *), +.prose thead th:last-child:where([dir="rtl"], [dir="rtl"] *) { padding-left: 0px; } @@ -1131,6 +1151,12 @@ body:has(#menu-controller:checked) { /* Table of Contents */ +.toc { + max-height: 100vh; + overflow-y: auto; + padding-bottom: 50px; +} + .toc ul, .toc li { list-style-type: none; @@ -1149,12 +1175,12 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-neutral-700), var(--tw-text-opacity)); } -:is(.dark .toc a) { +.toc a:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-400), var(--tw-text-opacity)); } -:is([dir="rtl"] .toc ul > li) { +.toc ul > li:where([dir="rtl"], [dir="rtl"] *) { margin-right: 0px; } @@ -1196,7 +1222,7 @@ body:has(#menu-controller:checked) { opacity: 0.9; } -:is(.dark .copy-button) { +.copy-button:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-neutral-600), var(--tw-bg-opacity)); --tw-text-opacity: 1; @@ -1211,10 +1237,10 @@ body:has(#menu-controller:checked) { background-color: rgba(var(--color-primary-100), var(--tw-bg-opacity)); } -:is(.dark .copy-button:hover),:is(.dark -.copy-button:focus),:is(.dark -.copy-button:active),:is(.dark -.copy-button:active:hover) { +.copy-button:hover:is(.dark *), +.copy-button:focus:is(.dark *), +.copy-button:active:is(.dark *), +.copy-button:active:hover:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-600), var(--tw-bg-opacity)); } @@ -1225,6 +1251,33 @@ body:has(#menu-controller:checked) { opacity: 0.05; } +/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */ + +.katex-display { + overflow: auto hidden; +} + +/* Fix long tables breaking out of article on mobile */ + +table { + display: block; + overflow: auto; +} + +@media (min-width: 768px) { + table { + display: table; + } +} + +/* Fix long inline code sections breaking out of article on mobile */ + +code { + word-wrap: break-word; + /* All browsers since IE 5.5+ */ + overflow-wrap: break-word; +} + /* -- Chroma Highlight -- */ /* Background */ @@ -1239,7 +1292,7 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-neutral-700), var(--tw-text-opacity)); } -:is(.dark .chroma) { +.chroma:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-neutral-700), var(--tw-bg-opacity)); --tw-text-opacity: 1; @@ -1275,8 +1328,8 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-neutral-600), var(--tw-text-opacity)); } -:is(.dark .chroma .lnt),:is(.dark -.chroma .ln) { +.chroma .lnt:is(.dark *), +.chroma .ln:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-300), var(--tw-text-opacity)); } @@ -1299,7 +1352,7 @@ body:has(#menu-controller:checked) { background-color: rgba(var(--color-primary-100), var(--tw-bg-opacity)); } -:is(.dark .chroma .hl) { +.chroma .hl:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity)); } @@ -1338,16 +1391,16 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-primary-600), var(--tw-text-opacity)); } -:is(.dark .chroma .k),:is(.dark -.chroma .kd),:is(.dark -.chroma .kn),:is(.dark -.chroma .kp),:is(.dark -.chroma .kr),:is(.dark -.chroma .nc),:is(.dark -.chroma .fm),:is(.dark -.chroma .nn),:is(.dark -.chroma .vc),:is(.dark -.chroma .o) { +.chroma .k:is(.dark *), +.chroma .kd:is(.dark *), +.chroma .kn:is(.dark *), +.chroma .kp:is(.dark *), +.chroma .kr:is(.dark *), +.chroma .nc:is(.dark *), +.chroma .fm:is(.dark *), +.chroma .nn:is(.dark *), +.chroma .vc:is(.dark *), +.chroma .o:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-primary-300), var(--tw-text-opacity)); } @@ -1360,7 +1413,7 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-secondary-400), var(--tw-text-opacity)); } -:is(.dark .chroma .kc) { +.chroma .kc:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-secondary-500), var(--tw-text-opacity)); } @@ -1402,17 +1455,17 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-secondary-400), var(--tw-text-opacity)); } -:is(.dark .chroma .kt),:is(.dark -.chroma .nv),:is(.dark -.chroma .vi),:is(.dark -.chroma .vm),:is(.dark -.chroma .m),:is(.dark -.chroma .mb),:is(.dark -.chroma .mf),:is(.dark -.chroma .mh),:is(.dark -.chroma .mi),:is(.dark -.chroma .il),:is(.dark -.chroma .mo) { +.chroma .kt:is(.dark *), +.chroma .nv:is(.dark *), +.chroma .vi:is(.dark *), +.chroma .vm:is(.dark *), +.chroma .m:is(.dark *), +.chroma .mb:is(.dark *), +.chroma .mf:is(.dark *), +.chroma .mh:is(.dark *), +.chroma .mi:is(.dark *), +.chroma .il:is(.dark *), +.chroma .mo:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-secondary-600), var(--tw-text-opacity)); } @@ -1433,10 +1486,10 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-secondary-900), var(--tw-text-opacity)); } -:is(.dark .chroma .n),:is(.dark -.chroma .nd),:is(.dark -.chroma .ni),:is(.dark -.chroma .nl) { +.chroma .n:is(.dark *), +.chroma .nd:is(.dark *), +.chroma .ni:is(.dark *), +.chroma .nl:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-secondary-200), var(--tw-text-opacity)); } @@ -1463,12 +1516,12 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-secondary-800), var(--tw-text-opacity)); } -:is(.dark .chroma .na),:is(.dark -.chroma .nb),:is(.dark -.chroma .bp),:is(.dark -.chroma .nx),:is(.dark -.chroma .py),:is(.dark -.chroma .nt) { +.chroma .na:is(.dark *), +.chroma .nb:is(.dark *), +.chroma .bp:is(.dark *), +.chroma .nx:is(.dark *), +.chroma .py:is(.dark *), +.chroma .nt:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-secondary-300), var(--tw-text-opacity)); } @@ -1487,9 +1540,9 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-secondary-400), var(--tw-text-opacity)); } -:is(.dark .chroma .no),:is(.dark -.chroma .ne),:is(.dark -.chroma .vg) { +.chroma .no:is(.dark *), +.chroma .ne:is(.dark *), +.chroma .vg:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-secondary-500), var(--tw-text-opacity)); } @@ -1501,7 +1554,7 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-secondary-600), var(--tw-text-opacity)); } -:is(.dark .chroma .nf) { +.chroma .nf:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-secondary-500), var(--tw-text-opacity)); } @@ -1558,22 +1611,22 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-primary-800), var(--tw-text-opacity)); } -:is(.dark .chroma .l),:is(.dark -.chroma .ld),:is(.dark -.chroma .s),:is(.dark -.chroma .sa),:is(.dark -.chroma .sb),:is(.dark -.chroma .sc),:is(.dark -.chroma .dl),:is(.dark -.chroma .sd),:is(.dark -.chroma .s2),:is(.dark -.chroma .sh),:is(.dark -.chroma .si),:is(.dark -.chroma .sx),:is(.dark -.chroma .s1),:is(.dark -.chroma .gi),:is(.dark -.chroma .go),:is(.dark -.chroma .gp) { +.chroma .l:is(.dark *), +.chroma .ld:is(.dark *), +.chroma .s:is(.dark *), +.chroma .sa:is(.dark *), +.chroma .sb:is(.dark *), +.chroma .sc:is(.dark *), +.chroma .dl:is(.dark *), +.chroma .sd:is(.dark *), +.chroma .s2:is(.dark *), +.chroma .sh:is(.dark *), +.chroma .si:is(.dark *), +.chroma .sx:is(.dark *), +.chroma .s1:is(.dark *), +.chroma .gi:is(.dark *), +.chroma .go:is(.dark *), +.chroma .gp:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-primary-400), var(--tw-text-opacity)); } @@ -1586,7 +1639,7 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-secondary-400), var(--tw-text-opacity)); } -:is(.dark .chroma .se) { +.chroma .se:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-secondary-500), var(--tw-text-opacity)); } @@ -1602,8 +1655,8 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-primary-800), var(--tw-text-opacity)); } -:is(.dark .chroma .sr),:is(.dark -.chroma .ss) { +.chroma .sr:is(.dark *), +.chroma .ss:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-primary-400), var(--tw-text-opacity)); } @@ -1616,7 +1669,7 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-primary-400), var(--tw-text-opacity)); } -:is(.dark .chroma .ow) { +.chroma .ow:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-primary-600), var(--tw-text-opacity)); } @@ -1644,12 +1697,12 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-neutral-500), var(--tw-text-opacity)); } -:is(.dark .chroma .c),:is(.dark -.chroma .cm),:is(.dark -.chroma .c1),:is(.dark -.chroma .cs),:is(.dark -.chroma .cp),:is(.dark -.chroma .cpf) { +.chroma .c:is(.dark *), +.chroma .cm:is(.dark *), +.chroma .c1:is(.dark *), +.chroma .cs:is(.dark *), +.chroma .cp:is(.dark *), +.chroma .cpf:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-400), var(--tw-text-opacity)); } @@ -1663,7 +1716,7 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-neutral-500), var(--tw-text-opacity)); } -:is(.dark .chroma .ch) { +.chroma .ch:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-400), var(--tw-text-opacity)); } @@ -1760,10 +1813,6 @@ body:has(#menu-controller:checked) { top: 5rem; } -.top-8 { - top: 2rem; -} - .top-\[100vh\] { top: 100vh; } @@ -1962,22 +2011,14 @@ body:has(#menu-controller:checked) { height: 3rem; } -.h-2 { - height: 0.5rem; -} - -.h-24 { - height: 6rem; -} - -.h-36 { - height: 9rem; -} - .h-8 { height: 2rem; } +.h-auto { + height: auto; +} + .h-full { height: 100%; } @@ -2610,7 +2651,7 @@ body:has(#menu-controller:checked) { transition-duration: 150ms; } -:is(.dark .dark\:prose-invert) { +.dark\:prose-invert:is(.dark *) { --tw-prose-body: var(--tw-prose-invert-body); --tw-prose-headings: var(--tw-prose-invert-headings); --tw-prose-lead: var(--tw-prose-invert-lead); @@ -2631,16 +2672,16 @@ body:has(#menu-controller:checked) { --tw-prose-td-borders: var(--tw-prose-invert-td-borders); } -:is(.dark .dark\:prose-invert) :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) { +.dark\:prose-invert:is(.dark *) :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) { text-decoration-color: rgba(var(--color-neutral-600), 1); } -:is(.dark .dark\:prose-invert) :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { +.dark\:prose-invert:is(.dark *) :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { color: rgba(var(--color-neutral-200), 1); background-color: rgba(var(--color-neutral-700), 1); } -:is(.dark .dark\:prose-invert) :where(mark):not(:where([class~="not-prose"],[class~="not-prose"] *)) { +.dark\:prose-invert:is(.dark *) :where(mark):not(:where([class~="not-prose"],[class~="not-prose"] *)) { background-color: rgba(var(--color-secondary-400), 1); } @@ -2776,189 +2817,151 @@ body:has(#menu-controller:checked) { opacity: 1; } -:is([dir="ltr"] .ltr\:right-0) { - right: 0px; -} - -:is([dir="ltr"] .ltr\:block) { - display: block; -} - -:is([dir="ltr"] .ltr\:inline) { +.dark\:inline:is(.dark *) { display: inline; } -:is([dir="ltr"] .ltr\:hidden) { - display: none; -} - -:is([dir="rtl"] .rtl\:left-0) { - left: 0px; -} - -:is([dir="rtl"] .rtl\:block) { - display: block; -} - -:is([dir="rtl"] .rtl\:inline) { - display: inline; -} - -:is([dir="rtl"] .rtl\:hidden) { - display: none; -} - -:is(.dark .dark\:inline) { - display: inline; -} - -:is(.dark .dark\:flex) { +.dark\:flex:is(.dark *) { display: flex; } -:is(.dark .dark\:hidden) { +.dark\:hidden:is(.dark *) { display: none; } -:is(.dark .dark\:border-neutral-600) { +.dark\:border-neutral-600:is(.dark *) { --tw-border-opacity: 1; border-color: rgba(var(--color-neutral-600), var(--tw-border-opacity)); } -:is(.dark .dark\:border-neutral-700) { +.dark\:border-neutral-700:is(.dark *) { --tw-border-opacity: 1; border-color: rgba(var(--color-neutral-700), var(--tw-border-opacity)); } -:is(.dark .dark\:border-primary-600) { +.dark\:border-primary-600:is(.dark *) { --tw-border-opacity: 1; border-color: rgba(var(--color-primary-600), var(--tw-border-opacity)); } -:is(.dark .dark\:bg-neutral-600) { +.dark\:bg-neutral-600:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-neutral-600), var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-neutral-700) { +.dark\:bg-neutral-700:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-neutral-700), var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-neutral-800) { +.dark\:bg-neutral-800:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-neutral-800), var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-neutral-800\/50) { +.dark\:bg-neutral-800\/50:is(.dark *) { background-color: rgba(var(--color-neutral-800), 0.5); } -:is(.dark .dark\:bg-neutral-900\/50) { +.dark\:bg-neutral-900\/50:is(.dark *) { background-color: rgba(var(--color-neutral-900), 0.5); } -:is(.dark .dark\:bg-primary-400) { +.dark\:bg-primary-400:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-400), var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-primary-800) { +.dark\:bg-primary-800:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-800), var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-primary-900) { +.dark\:bg-primary-900:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity)); } -:is(.dark .dark\:text-neutral) { +.dark\:text-neutral:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral), var(--tw-text-opacity)); } -:is(.dark .dark\:text-neutral-100) { +.dark\:text-neutral-100:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-100), var(--tw-text-opacity)); } -:is(.dark .dark\:text-neutral-300) { +.dark\:text-neutral-300:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-300), var(--tw-text-opacity)); } -:is(.dark .dark\:text-neutral-400) { +.dark\:text-neutral-400:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-400), var(--tw-text-opacity)); } -:is(.dark .dark\:text-neutral-500) { +.dark\:text-neutral-500:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-500), var(--tw-text-opacity)); } -:is(.dark .dark\:text-neutral-800) { +.dark\:text-neutral-800:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-800), var(--tw-text-opacity)); } -:is(.dark .dark\:text-primary-400) { +.dark\:text-primary-400:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-primary-400), var(--tw-text-opacity)); } -:is(.dark .dark\:hover\:border-primary-600:hover) { +.dark\:hover\:border-primary-600:hover:is(.dark *) { --tw-border-opacity: 1; border-color: rgba(var(--color-primary-600), var(--tw-border-opacity)); } -:is(.dark .dark\:hover\:\!bg-primary-700:hover) { +.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; } -:is(.dark .dark\:hover\:bg-primary-400:hover) { +.dark\:hover\:bg-primary-400:hover:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-400), var(--tw-bg-opacity)); } -:is(.dark .dark\:hover\:bg-primary-900:hover) { +.dark\:hover\:bg-primary-900:hover:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity)); } -:is(.dark .dark\:hover\:text-neutral-800:hover) { +.dark\:hover\:text-neutral-800:hover:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-800), var(--tw-text-opacity)); } -:is(.dark .dark\:hover\:text-primary-400:hover) { +.dark\:hover\:text-primary-400:hover:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-primary-400), var(--tw-text-opacity)); } -:is(.dark .dark\:focus\:bg-primary-900:focus) { +.dark\:focus\:bg-primary-900:focus:is(.dark *) { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity)); } -:is(.dark .group:hover .dark\:group-hover\:text-neutral-700) { +.group:hover .dark\:group-hover\:text-neutral-700:is(.dark *) { --tw-text-opacity: 1; color: rgba(var(--color-neutral-700), var(--tw-text-opacity)); } -:is(.dark .group:hover .dark\:group-hover\:text-primary-400) { +.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 print { - .print\:hidden { - display: none; - } -} - @media (min-width: 640px) { .sm\:mb-0 { margin-bottom: 0px; @@ -3099,3 +3102,41 @@ body:has(#menu-controller:checked) { width: 20%; } } + +.ltr\:right-0:where([dir="ltr"], [dir="ltr"] *) { + right: 0px; +} + +.ltr\:block:where([dir="ltr"], [dir="ltr"] *) { + display: block; +} + +.ltr\:inline:where([dir="ltr"], [dir="ltr"] *) { + display: inline; +} + +.ltr\:hidden:where([dir="ltr"], [dir="ltr"] *) { + display: none; +} + +.rtl\:left-0:where([dir="rtl"], [dir="rtl"] *) { + left: 0px; +} + +.rtl\:block:where([dir="rtl"], [dir="rtl"] *) { + display: block; +} + +.rtl\:inline:where([dir="rtl"], [dir="rtl"] *) { + display: inline; +} + +.rtl\:hidden:where([dir="rtl"], [dir="rtl"] *) { + display: none; +} + +@media print { + .print\:hidden { + display: none; + } +} diff --git a/assets/css/main.css b/assets/css/main.css index d23b285eb..d89244e22 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1,4 +1,4 @@ -/*! Congo v2.7.6 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v2.8.2 | MIT License | https://github.com/jpanther/congo */ @tailwind base; @tailwind components; @@ -59,6 +59,12 @@ body:has(#menu-controller:checked) { } /* Table of Contents */ +.toc { + max-height: 100vh; + overflow-y: auto; + padding-bottom: 50px; +} + .toc ul, .toc li { @apply list-none px-0 leading-snug; @@ -96,6 +102,22 @@ body:has(#menu-controller:checked) { @apply absolute -z-10 opacity-5; } +/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */ +.katex-display { + overflow: auto hidden; +} + +/* Fix long tables breaking out of article on mobile */ +table { + @apply block overflow-auto md:table; +} + +/* Fix long inline code sections breaking out of article on mobile */ +code { + word-wrap: break-word; /* All browsers since IE 5.5+ */ + @apply break-words; +} + /* -- Chroma Highlight -- */ /* Background */ .chroma { diff --git a/assets/css/schemes/avocado.css b/assets/css/schemes/avocado.css index 911e895de..b9cb77e23 100644 --- a/assets/css/schemes/avocado.css +++ b/assets/css/schemes/avocado.css @@ -12,6 +12,7 @@ --color-neutral-700: 68, 64, 60; --color-neutral-800: 41, 37, 36; --color-neutral-900: 28, 25, 23; + --color-neutral-950: 12, 10, 9; /* Lime */ --color-primary-50: 247, 254, 231; --color-primary-100: 236, 252, 203; @@ -23,6 +24,7 @@ --color-primary-700: 77, 124, 15; --color-primary-800: 63, 98, 18; --color-primary-900: 54, 83, 20; + --color-primary-950: 26, 46, 5; /* Emerald */ --color-secondary-50: 236, 253, 245; --color-secondary-100: 209, 250, 229; @@ -34,4 +36,5 @@ --color-secondary-700: 4, 120, 87; --color-secondary-800: 6, 95, 70; --color-secondary-900: 6, 78, 59; + --color-secondary-950: 2, 44, 34; } diff --git a/assets/css/schemes/cherry.css b/assets/css/schemes/cherry.css index 14567e6df..2d647298b 100644 --- a/assets/css/schemes/cherry.css +++ b/assets/css/schemes/cherry.css @@ -12,6 +12,7 @@ --color-neutral-700: 64, 64, 64; --color-neutral-800: 38, 38, 38; --color-neutral-900: 23, 23, 23; + --color-neutral-950: 10, 10, 10; /* Rose */ --color-primary-50: 255, 241, 242; --color-primary-100: 255, 228, 230; @@ -23,6 +24,7 @@ --color-primary-700: 190, 18, 60; --color-primary-800: 159, 18, 57; --color-primary-900: 136, 19, 55; + --color-primary-950: 76, 5, 25; /* Green */ --color-secondary-50: 240, 253, 244; --color-secondary-100: 220, 252, 231; @@ -34,4 +36,5 @@ --color-secondary-700: 21, 128, 61; --color-secondary-800: 22, 101, 52; --color-secondary-900: 20, 83, 45; + --color-secondary-950: 5, 46, 22; } diff --git a/assets/css/schemes/congo.css b/assets/css/schemes/congo.css index 375ef7b38..8b18d0a52 100644 --- a/assets/css/schemes/congo.css +++ b/assets/css/schemes/congo.css @@ -12,6 +12,7 @@ --color-neutral-700: 63, 63, 70; --color-neutral-800: 39, 39, 42; --color-neutral-900: 24, 24, 27; + --color-neutral-950: 3, 7, 18; /* Violet */ --color-primary-50: 245, 243, 255; --color-primary-100: 237, 233, 254; @@ -23,6 +24,7 @@ --color-primary-700: 109, 40, 217; --color-primary-800: 91, 33, 182; --color-primary-900: 76, 29, 149; + --color-primary-950: 46, 16, 101; /* Fuchsia */ --color-secondary-50: 253, 244, 255; --color-secondary-100: 250, 232, 255; @@ -34,4 +36,5 @@ --color-secondary-700: 162, 28, 175; --color-secondary-800: 134, 25, 143; --color-secondary-900: 112, 26, 117; + --color-secondary-950: 74, 4, 78; } diff --git a/assets/css/schemes/fire.css b/assets/css/schemes/fire.css index ed69d5cb5..01efdb99b 100644 --- a/assets/css/schemes/fire.css +++ b/assets/css/schemes/fire.css @@ -12,6 +12,7 @@ --color-neutral-700: 68, 64, 60; --color-neutral-800: 41, 37, 36; --color-neutral-900: 28, 25, 23; + --color-neutral-950: 12, 10, 9; /* Orange */ --color-primary-50: 255, 247, 237; --color-primary-100: 255, 237, 213; @@ -23,6 +24,7 @@ --color-primary-700: 194, 65, 12; --color-primary-800: 154, 52, 18; --color-primary-900: 124, 45, 18; + --color-primary-950: 69, 10, 10; /* Rose */ --color-secondary-50: 255, 241, 242; --color-secondary-100: 255, 228, 230; @@ -34,4 +36,5 @@ --color-secondary-700: 190, 18, 60; --color-secondary-800: 159, 18, 57; --color-secondary-900: 136, 19, 55; + --color-secondary-950: 76, 5, 25; } diff --git a/assets/css/schemes/ocean.css b/assets/css/schemes/ocean.css index 1644570d9..32e8138c8 100644 --- a/assets/css/schemes/ocean.css +++ b/assets/css/schemes/ocean.css @@ -12,6 +12,7 @@ --color-neutral-700: 51, 65, 85; --color-neutral-800: 30, 41, 59; --color-neutral-900: 15, 23, 42; + --color-neutral-950: 2, 6, 23; /* Blue */ --color-primary-50: 239, 246, 255; --color-primary-100: 219, 234, 254; @@ -23,6 +24,7 @@ --color-primary-700: 29, 78, 216; --color-primary-800: 30, 64, 175; --color-primary-900: 30, 58, 138; + --color-primary-950: 23, 37, 8; /* Cyan */ --color-secondary-50: 236, 254, 255; --color-secondary-100: 207, 250, 254; @@ -34,4 +36,5 @@ --color-secondary-700: 14, 116, 144; --color-secondary-800: 21, 94, 117; --color-secondary-900: 22, 78, 99; + --color-secondary-950: 8, 51, 69; } diff --git a/assets/css/schemes/sapphire.css b/assets/css/schemes/sapphire.css index fce9d916c..94632b18c 100644 --- a/assets/css/schemes/sapphire.css +++ b/assets/css/schemes/sapphire.css @@ -12,6 +12,7 @@ --color-neutral-700: 51, 65, 85; --color-neutral-800: 30, 41, 59; --color-neutral-900: 15, 23, 42; + --color-neutral-950: 10, 10, 10; /* Indigo */ --color-primary-50: 238, 242, 255; --color-primary-100: 224, 231, 255; @@ -23,6 +24,7 @@ --color-primary-700: 67, 56, 202; --color-primary-800: 55, 48, 163; --color-primary-900: 49, 46, 129; + --color-primary-950: 30, 27, 75; /* Pink */ --color-secondary-50: 253, 242, 248; --color-secondary-100: 252, 231, 243; @@ -34,4 +36,5 @@ --color-secondary-700: 190, 24, 93; --color-secondary-800: 157, 23, 77; --color-secondary-900: 131, 24, 67; + --color-secondary-950: 80, 7, 36; } diff --git a/assets/css/schemes/slate.css b/assets/css/schemes/slate.css index 54831e86e..4f73ee702 100644 --- a/assets/css/schemes/slate.css +++ b/assets/css/schemes/slate.css @@ -12,6 +12,7 @@ --color-neutral-700: 55, 65, 81; --color-neutral-800: 31, 41, 55; --color-neutral-900: 17, 24, 39; + --color-neutral-950: 17, 24, 39; /* Slate */ --color-primary-50: 248, 250, 252; --color-primary-100: 241, 245, 249; @@ -23,6 +24,7 @@ --color-primary-700: 51, 65, 85; --color-primary-800: 30, 41, 59; --color-primary-900: 15, 23, 42; + --color-primary-950: 2, 6, 23; /* Gray */ --color-secondary-50: 249, 250, 251; --color-secondary-100: 243, 244, 246; @@ -34,4 +36,5 @@ --color-secondary-700: 55, 65, 81; --color-secondary-800: 31, 41, 55; --color-secondary-900: 17, 24, 39; + --color-secondary-950: 10, 10, 10; } diff --git a/assets/icons/bluesky.svg b/assets/icons/bluesky.svg new file mode 100644 index 000000000..07bbec0e1 --- /dev/null +++ b/assets/icons/bluesky.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/google-scholar.svg b/assets/icons/google-scholar.svg new file mode 100644 index 000000000..1862f5409 --- /dev/null +++ b/assets/icons/google-scholar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/mendeley.svg b/assets/icons/mendeley.svg new file mode 100644 index 000000000..dbd2ed86c --- /dev/null +++ b/assets/icons/mendeley.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/weibo.svg b/assets/icons/weibo.svg new file mode 100644 index 000000000..aa2956224 --- /dev/null +++ b/assets/icons/weibo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/js/appearance.js b/assets/js/appearance.js index dd5ad69d1..32cd39cb2 100644 --- a/assets/js/appearance.js +++ b/assets/js/appearance.js @@ -39,6 +39,7 @@ if (document.documentElement.getAttribute("data-auto-appearance") === "true") { } window.addEventListener("DOMContentLoaded", (event) => { + setThemeColor(); var switchers = document.querySelectorAll("[id^='appearance-switcher']"); switchers.forEach((switcher) => { switcher.addEventListener("click", () => { diff --git a/assets/js/menu.js b/assets/js/menu.js index ec43bfcd3..4d674e299 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 a1a89ad21..014d4ce08 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 4a47ba58f..5add49844 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 `
0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?sn(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?sn(l.text):null,c=Ut(t[2],"size"),m=null;r=!!c.isBlank||(m=c.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Ut(p.body[0],"textord");u=on[Number(d.text)]}}else p=Ut(p,"textord"),u=on[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:m,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:nn,mathmlBuilder:an}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ut(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ut(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:nn,mathmlBuilder:an});var ln=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Ut(e.base,"horizBrace")):n=Ut(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Gt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:ln,mathmlBuilder:function(e,t){var r=Ft(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Ut(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Ut(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,m.sub1,a.height-.8*m.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*m.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(c,"right")||"mord";return Ke.makeSpan([T],[c,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=Nt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var kn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=Nt(e,t)||"italic";return n!==kn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=Nt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==kn[r.type]&&r.setAttribute("mathvariant",a),r}});var Sn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Mn.hasOwnProperty(e.text)){var r=Mn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(Sn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",Sn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Mn.hasOwnProperty(e.text)){if(Sn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var zn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[zn(),new Tt.MathNode("mtd",[It(e.body,t)]),zn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var An={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tn={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Cn=function(e,t){var r=e.font;return r?An[r]?t.withTextFontFamily(An[r]):Tn[r]?t.withTextFontWeight(Tn[r]):t.withTextFontShape(Bn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Cn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Cn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=Nn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i