From 42dd9eff84d67a5614ca27dce7c492baa76834a4 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Wed, 3 Apr 2024 23:37:00 +1100 Subject: [PATCH] Readability updates (#2134) This PR updates the headings to avoid thin font weights and low constrast ratios.
Before After
![image](https://github.com/rstacruz/cheatsheets/assets/74385/b7313b99-0376-49c1-84cd-e3476b2c84ff) ![image](https://github.com/rstacruz/cheatsheets/assets/74385/c2aec010-9976-4543-910b-dd9112995846)
![image](https://github.com/rstacruz/cheatsheets/assets/74385/e214d4a5-9a20-4a86-abc8-3261fc418192) ![image](https://github.com/rstacruz/cheatsheets/assets/74385/71a91afc-aa7b-4b8b-adf2-30a976c4a324)
--- astro.config.mjs | 13 +- package.json | 5 +- pnpm-lock.yaml | 264 +++++++++++++++++- postcss.config.js | 6 + src/components/BaseLayout.astro | 8 +- src/components/V2017/CarbonBox.astro | 2 +- src/components/V2017Home/PageListItem.astro | 2 - src/components/V2017Sheet.astro | 46 ++- src/config.ts | 4 + src/pages/404.astro | 28 +- src/pages/index.astro | 30 +- src/sass/2017/base/prism_line_highlight.scss | 77 +++++ src/sass/2017/components/h2-section.scss | 34 +-- src/sass/2017/components/h3-section-list.scss | 33 +-- src/sass/2017/components/h3-section.scss | 90 +----- src/sass/2017/markdown/headings.scss | 4 - src/sass/2017/markdown/table.scss | 9 +- src/sass/2017/variables.scss | 4 +- src/sass/full.scss | 122 ++++---- src/scripts/v2017/behaviors_2/anchors.js | 3 +- src/styles/CommonStyles.ts | 3 + tailwind.config.mjs | 53 ++++ test/index.e2e.ts | 8 +- 23 files changed, 623 insertions(+), 225 deletions(-) create mode 100644 postcss.config.js create mode 100644 src/sass/2017/base/prism_line_highlight.scss create mode 100644 src/styles/CommonStyles.ts create mode 100644 tailwind.config.mjs diff --git a/astro.config.mjs b/astro.config.mjs index 2824b76ea1c..dfa38ff79a0 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,9 @@ import partytown from '@astrojs/partytown' /* * https://astro.build/config */ +import tailwind from '@astrojs/tailwind' + +// https://astro.build/config export default defineConfig({ site: 'https://devhints.io', build: { @@ -16,8 +19,14 @@ export default defineConfig({ server: { host: true } /* access from https://192.168.x.x/ */, - integrations: [partytown({ config: { forward: ['dataLayer.push'] } })], - + integrations: [ + partytown({ + config: { + forward: ['dataLayer.push'] + } + }), + tailwind() + ], markdown: { // Syntax highlighting is handled by render() syntaxHighlight: false diff --git a/package.json b/package.json index 8763764f761..9fc3a425334 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,10 @@ }, "dependencies": { "@astrojs/partytown": "^2.0.2", + "@astrojs/tailwind": "^5.1.0", "@astrojs/ts-plugin": "^1.3.1", "@fontsource/cousine": "^5.0.15", + "@fontsource/manrope": "^5.0.19", "@mapbox/rehype-prism": "^0.8.0", "@playwright/test": "^1.38.1", "@rstacruz/rehype-sectionize": "^0.7.0", @@ -32,6 +34,7 @@ "@typescript-eslint/parser": "^7.2.0", "astro": "^4.0.3", "autocompleter": "^9.1.0", + "clsx": "^2.1.0", "concurrently": "^8.2.1", "eslint": "^8.52.0", "eslint-config-prettier": "^9.0.0", @@ -49,9 +52,9 @@ "prismjs": "1.29.0", "rehype-parse": "^9.0.0", "rehype-stringify": "^10.0.0", - "sanitize.css": "13.0.0", "sass": "^1.69.1", "snarkdown": "^2.0.0", + "tailwindcss": "^3.4.3", "tsx": "^4.7.1", "unified": "^11.0.3", "vitest": "^1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0302418c85e..2afa09a192d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,12 +8,18 @@ dependencies: '@astrojs/partytown': specifier: ^2.0.2 version: 2.0.4 + '@astrojs/tailwind': + specifier: ^5.1.0 + version: 5.1.0(astro@4.5.4)(tailwindcss@3.4.3) '@astrojs/ts-plugin': specifier: ^1.3.1 version: 1.6.0 '@fontsource/cousine': specifier: ^5.0.15 version: 5.0.19 + '@fontsource/manrope': + specifier: ^5.0.19 + version: 5.0.19 '@mapbox/rehype-prism': specifier: ^0.8.0 version: 0.8.0 @@ -38,6 +44,9 @@ dependencies: autocompleter: specifier: ^9.1.0 version: 9.1.2 + clsx: + specifier: ^2.1.0 + version: 2.1.0 concurrently: specifier: ^8.2.1 version: 8.2.2 @@ -89,15 +98,15 @@ dependencies: rehype-stringify: specifier: ^10.0.0 version: 10.0.0 - sanitize.css: - specifier: 13.0.0 - version: 13.0.0 sass: specifier: ^1.69.1 version: 1.72.0 snarkdown: specifier: ^2.0.0 version: 2.0.0 + tailwindcss: + specifier: ^3.4.3 + version: 3.4.3 tsx: specifier: ^4.7.1 version: 4.7.1 @@ -118,6 +127,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /@alloc/quick-lru@5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + dev: false + /@ampproject/remapping@2.3.0: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} @@ -177,6 +191,21 @@ packages: prismjs: 1.29.0 dev: false + /@astrojs/tailwind@5.1.0(astro@4.5.4)(tailwindcss@3.4.3): + resolution: {integrity: sha512-BJoCDKuWhU9FT2qYg+fr6Nfb3qP4ShtyjXGHKA/4mHN94z7BGcmauQK23iy+YH5qWvTnhqkd6mQPQ1yTZTe9Ig==} + peerDependencies: + astro: ^3.0.0 || ^4.0.0 + tailwindcss: ^3.0.24 + dependencies: + astro: 4.5.4(sass@1.72.0)(typescript@5.4.2) + autoprefixer: 10.4.19(postcss@8.4.35) + postcss: 8.4.35 + postcss-load-config: 4.0.2(postcss@8.4.35) + tailwindcss: 3.4.3 + transitivePeerDependencies: + - ts-node + dev: false + /@astrojs/telemetry@3.0.4: resolution: {integrity: sha512-A+0c7k/Xy293xx6odsYZuXiaHO0PL+bnDoXOc47sGDF5ffIKdKQGRPFl2NMlCF4L0NqN4Ynbgnaip+pPF0s7pQ==} engines: {node: '>=18.14.1'} @@ -691,6 +720,10 @@ packages: resolution: {integrity: sha512-pvVlYm3a7rwi3OVJpHMf2fuP8SM0Zb95pCgCxM+i4HvAWybz+/BS0cfrqedLk35MsR6oHsUgI4pCYDVeq+PwXw==} dev: false + /@fontsource/manrope@5.0.19: + resolution: {integrity: sha512-5AbXsYyl9pwc60VnfWcWoq7gNggaByqINfD/hTBUrvqpm2AzZTqqpkQzfff3SMWR6mJIXQjBgrn/OzR9wPkcdg==} + dev: false + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -1411,6 +1444,10 @@ packages: engines: {node: '>=12'} dev: false + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: false + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -1423,6 +1460,10 @@ packages: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} dev: false + /arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} + dev: false + /argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -1631,6 +1672,22 @@ packages: resolution: {integrity: sha512-L4DJ2UIsIy/YrTchKHHfyQRng2p8m9xpari1uHYZ/5DynQombeshF73uVQbrtdLxLSlK0R7ObhpnbPBkI8j8xA==} dev: false + /autoprefixer@10.4.19(postcss@8.4.35): + resolution: {integrity: sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.23.0 + caniuse-lite: 1.0.30001600 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.35 + postcss-value-parser: 4.2.0 + dev: false + /available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -1876,6 +1933,11 @@ packages: upper-case: 1.1.3 dev: false + /camelcase-css@2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + dev: false + /camelcase@4.1.0: resolution: {integrity: sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==} engines: {node: '>=4'} @@ -1895,6 +1957,10 @@ packages: resolution: {integrity: sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==} dev: false + /caniuse-lite@1.0.30001600: + resolution: {integrity: sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==} + dev: false + /capture-stack-trace@1.0.2: resolution: {integrity: sha512-X/WM2UQs6VMHUtjUDnZTRI+i1crWteJySFzr9UpGoQa4WQffXVTTXuekjl7TjZRlcF2XfjgITT0HxZ9RnxeT0w==} engines: {node: '>=0.10.0'} @@ -2187,6 +2253,11 @@ packages: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: false + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: false + /comment-json@2.4.2: resolution: {integrity: sha512-T+iXox779qsqneMYx/x5BZyz4xjCeQRmuNVzz8tko7qZUs3MlzpA3RAs+O1XsgcKToNBMIvfVzafGOeiU7RggA==} engines: {node: '>= 6'} @@ -2417,6 +2488,7 @@ packages: /deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} + requiresBuild: true dev: false /deep-is@0.1.4: @@ -2484,6 +2556,10 @@ packages: dequal: 2.0.3 dev: false + /didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + dev: false + /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3147,6 +3223,10 @@ packages: mime-types: 2.1.35 dev: false + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + dev: false + /fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} requiresBuild: true @@ -4229,6 +4309,11 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: false + /jiti@1.21.0: + resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} + hasBin: true + dev: false + /js-beautify@1.15.1: resolution: {integrity: sha512-ESjNzSlt/sWE8sciZH8kBF8BPlwXPwhR6pWKAw8bw4Bwj+iZcnKW6ONWUutJ7eObuBZQpiIb8S7OYspWrKt7rA==} engines: {node: '>=14'} @@ -4444,6 +4529,20 @@ packages: yargs: 14.2.3 dev: false + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: false + + /lilconfig@3.1.1: + resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} + engines: {node: '>=14'} + dev: false + + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: false + /listify@1.0.3: resolution: {integrity: sha512-083swF7iH7bx8666zdzBColpgEuy46HjN3r1isD4zV6Ix7FuHfb/2/WVnl4CH8hjuoWeFF7P5KkKNXUnJCFEJg==} engines: {node: '>= 0.4'} @@ -5150,6 +5249,14 @@ packages: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: false + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: false + /nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -5214,6 +5321,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + dev: false + /normalize-url@4.5.1: resolution: {integrity: sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==} engines: {node: '>=8'} @@ -5246,6 +5358,16 @@ packages: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: false + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: false + + /object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + dev: false + /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: false @@ -5585,6 +5707,11 @@ packages: engines: {node: '>=8.6'} dev: false + /pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + dev: false + /pify@3.0.0: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} @@ -5595,6 +5722,11 @@ packages: engines: {node: '>=6'} dev: false + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + dev: false + /pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -5631,6 +5763,55 @@ packages: engines: {node: '>= 0.4'} dev: false + /postcss-import@15.1.0(postcss@8.4.35): + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.35 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + dev: false + + /postcss-js@4.0.1(postcss@8.4.35): + resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.4.21 + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.35 + dev: false + + /postcss-load-config@4.0.2(postcss@8.4.35): + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 3.1.1 + postcss: 8.4.35 + yaml: 2.4.1 + dev: false + + /postcss-nested@6.0.1(postcss@8.4.35): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.35 + postcss-selector-parser: 6.0.16 + dev: false + /postcss-selector-parser@6.0.16: resolution: {integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==} engines: {node: '>=4'} @@ -5639,6 +5820,10 @@ packages: util-deprecate: 1.0.2 dev: false + /postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + dev: false + /postcss@8.4.35: resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} engines: {node: ^10 || ^12 || >=14} @@ -5837,6 +6022,12 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: false + /read-cache@1.0.0: + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + dependencies: + pify: 2.3.0 + dev: false + /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -6208,10 +6399,6 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: false - /sanitize.css@13.0.0: - resolution: {integrity: sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA==} - dev: false - /sass-formatter@0.7.9: resolution: {integrity: sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==} dependencies: @@ -6637,6 +6824,7 @@ packages: /strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: false /strip-json-comments@3.1.1: @@ -6650,6 +6838,20 @@ packages: js-tokens: 8.0.3 dev: false + /sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + commander: 4.1.1 + glob: 10.3.10 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + dev: false + /suf-log@2.5.3: resolution: {integrity: sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==} dependencies: @@ -6699,6 +6901,37 @@ packages: tslib: 2.6.2 dev: false + /tailwindcss@3.4.3: + resolution: {integrity: sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.0 + lilconfig: 2.1.0 + micromatch: 4.0.5 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.0.0 + postcss: 8.4.35 + postcss-import: 15.1.0(postcss@8.4.35) + postcss-js: 4.0.1(postcss@8.4.35) + postcss-load-config: 4.0.2(postcss@8.4.35) + postcss-nested: 6.0.1(postcss@8.4.35) + postcss-selector-parser: 6.0.16 + resolve: 1.22.8 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + dev: false + /tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} requiresBuild: true @@ -6761,6 +6994,19 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: false + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: false + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: false + /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: false @@ -6847,6 +7093,10 @@ packages: typescript: 5.4.2 dev: false + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: false + /tsconfck@3.0.3(typescript@5.4.2): resolution: {integrity: sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==} engines: {node: ^18 || >=20} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 00000000000..2b75bd8a7e5 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +} diff --git a/src/components/BaseLayout.astro b/src/components/BaseLayout.astro index 43627879c60..cd148164ceb 100644 --- a/src/components/BaseLayout.astro +++ b/src/components/BaseLayout.astro @@ -1,7 +1,11 @@ --- -import '../sass/full.scss' +import 'hint.css' +import '~/sass/full.scss' +import '~/sass/2017/base/prism_line_highlight.scss' + import '@fontsource/cousine/400.css' import '@fontsource/cousine/700.css' +import '@fontsource/manrope/800.css' import GoogleAnalytics from '~/analytics/GoogleAnalytics.astro' import { googleAnalytics } from '~/config' @@ -11,7 +15,7 @@ export type Props = { } const props = Astro.props as Props -const analyticsEnabled = import.meta.env.PROD || true +const analyticsEnabled = googleAnalytics.enabled --- diff --git a/src/components/V2017/CarbonBox.astro b/src/components/V2017/CarbonBox.astro index 3b91064c1e2..61f9569ed1b 100644 --- a/src/components/V2017/CarbonBox.astro +++ b/src/components/V2017/CarbonBox.astro @@ -1,6 +1,6 @@ --- import { carbon } from '~/config' -const useCarbon = import.meta.env.PROD +const useCarbon = carbon.enabled ---