Readability updates (#2134)
This PR updates the headings to avoid thin font weights and low constrast ratios. <table> <tr> <th>Before</th> <th>After</th> </tr> <tr> <td> ![image](https://github.com/rstacruz/cheatsheets/assets/74385/b7313b99-0376-49c1-84cd-e3476b2c84ff) </td> <td> ![image](https://github.com/rstacruz/cheatsheets/assets/74385/c2aec010-9976-4543-910b-dd9112995846) </td> </tr> <tr> <td> ![image](https://github.com/rstacruz/cheatsheets/assets/74385/e214d4a5-9a20-4a86-abc8-3261fc418192) </td> <td> ![image](https://github.com/rstacruz/cheatsheets/assets/74385/71a91afc-aa7b-4b8b-adf2-30a976c4a324) </td> </tr> </table>
This commit is contained in:
parent
511de900ba
commit
42dd9eff84
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
264
pnpm-lock.yaml
264
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}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
---
|
||||
|
||||
<html lang="en">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
import { carbon } from '~/config'
|
||||
const useCarbon = import.meta.env.PROD
|
||||
const useCarbon = carbon.enabled
|
||||
---
|
||||
|
||||
<div class="HeadlinePub" role="complementary">
|
||||
|
|
|
@ -16,7 +16,5 @@ const url = `/${page.slug}`
|
|||
<span class="title">
|
||||
{page.frontmatter.title ?? page.slug}
|
||||
</span>
|
||||
|
||||
{/* TODO attribute-peg */}
|
||||
</span>
|
||||
</a>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
// import "../sass/critical-sheet.scss";
|
||||
import cx from 'clsx'
|
||||
import snarkdown from 'snarkdown'
|
||||
import { render } from '../lib/render'
|
||||
import type { SheetPage } from '../lib/page'
|
||||
|
@ -14,6 +15,7 @@ import { getJSONLDsForPage } from '~/lib/seo/jsonLd'
|
|||
import SEO from '~/components/SEO/SEO.astro'
|
||||
import NoticeBox from './V2017Sheet/NoticeBox.astro'
|
||||
import { getEditLink } from '~/lib/links'
|
||||
import { typeStyles } from '~/styles/CommonStyles'
|
||||
|
||||
export type Props = {
|
||||
page: SheetPage
|
||||
|
@ -31,9 +33,32 @@ const editUrl = getEditLink(page)
|
|||
const intro: string | null = page.frontmatter.intro
|
||||
? `<p>${snarkdown(page.frontmatter.intro)}</p>`
|
||||
: null
|
||||
|
||||
const styles = {
|
||||
body: cx('V2017Sheet__body max-w-content p-6 md:px-8 mx-auto')
|
||||
}
|
||||
|
||||
const headingStyles = {
|
||||
root: cx(
|
||||
'MainHeading__root',
|
||||
'mt-4 md:pt-8 w-full',
|
||||
'flex flex-col md:flex-row gap-12',
|
||||
'items-center md:items-end'
|
||||
),
|
||||
spacer: cx('MainHeading__spacer', 'mt-12'),
|
||||
h1: cx(
|
||||
'MainHeading__h1',
|
||||
typeStyles.manrope,
|
||||
'text-5xl leading-[1.2] text-zinc-950',
|
||||
'text-center md:text-left',
|
||||
'flex-1'
|
||||
),
|
||||
title: cx('MainHeading__title'),
|
||||
pubbox: cx('MainHeading__pubbox')
|
||||
}
|
||||
---
|
||||
|
||||
<BaseLayout bodyClass="UseCompactHeader HighlightPubFirstLine">
|
||||
<BaseLayout bodyClass="HighlightPubFirstLine">
|
||||
<Fragment slot="head">
|
||||
<SEO {...seoProps} />
|
||||
{
|
||||
|
@ -44,14 +69,19 @@ const intro: string | null = page.frontmatter.intro
|
|||
</Fragment>
|
||||
|
||||
<TopNav page={page} />
|
||||
<div class="body-area">
|
||||
<header class="main-heading -center" role="banner">
|
||||
<h1 class="h1">{title}{' '}<em>cheatsheet</em></h1>
|
||||
<div class={styles.body}>
|
||||
<header class={headingStyles.root} role="banner">
|
||||
<h1 class={headingStyles.h1}>
|
||||
<span class={headingStyles.title}>{title}</span>
|
||||
<span class={headingStyles.suffix}> cheatsheet</span>
|
||||
</h1>
|
||||
|
||||
{/* Publicite */}
|
||||
<div class="pubbox" data-js-no-preview><CarbonBox /></div>
|
||||
<div class={headingStyles.pubbox} data-js-no-preview><CarbonBox /></div>
|
||||
</header>
|
||||
|
||||
<div class={headingStyles.spacer}></div>
|
||||
|
||||
{/* WIP */}
|
||||
{
|
||||
tags.includes('WIP') ? (
|
||||
|
@ -74,12 +104,14 @@ const intro: string | null = page.frontmatter.intro
|
|||
|
||||
{
|
||||
intro ? (
|
||||
<div class="intro-content MarkdownBody">
|
||||
<div class="intro-content text-xl MarkdownBody">
|
||||
<Fragment set:html={intro} />
|
||||
</div>
|
||||
) : null
|
||||
}
|
||||
|
||||
<div class={headingStyles.spacer}></div>
|
||||
|
||||
<main
|
||||
class="post-content MarkdownBody"
|
||||
data-js-main-body
|
||||
|
@ -101,11 +133,9 @@ const intro: string | null = page.frontmatter.intro
|
|||
@import '../sass/2017/markdown/a-em';
|
||||
@import '../sass/2017/markdown/code';
|
||||
@import '../sass/2017/markdown/headings';
|
||||
@import '../sass/2017/markdown/local-anchor';
|
||||
@import '../sass/2017/markdown/p';
|
||||
@import '../sass/2017/markdown/table';
|
||||
@import '../sass/2017/markdown/ul';
|
||||
@import '../sass/2017/components/body-area';
|
||||
@import '../sass/2017/components/h2-section';
|
||||
@import '../sass/2017/components/h3-section';
|
||||
@import '../sass/2017/components/h3-section-list';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const isProd = Boolean(import.meta.env.PROD)
|
||||
|
||||
export const site = {
|
||||
url: 'https://devhints.io',
|
||||
title: 'Devhints.io cheatsheets'
|
||||
|
@ -13,6 +15,7 @@ export const disqus = {
|
|||
} as const
|
||||
|
||||
export const googleAnalytics = {
|
||||
enabled: isProd,
|
||||
measurementId: 'G-N7TC6B227L'
|
||||
} as const
|
||||
|
||||
|
@ -26,6 +29,7 @@ export const urls = {
|
|||
} as const
|
||||
|
||||
export const carbon = {
|
||||
enabled: isProd,
|
||||
// src: 'https://cdn.carbonads.com/carbon.js?serve=CE7IK5QM&placement=devhintsio'
|
||||
src: 'https://pubsrv.devhints.io/carbon.js?serve=CE7IK5QM&placement=devhintsio'
|
||||
} as const
|
||||
|
|
|
@ -1,23 +1,37 @@
|
|||
---
|
||||
import cx from 'clsx'
|
||||
import BaseLayout from '~/components/BaseLayout.astro'
|
||||
import TopNav from '~/components/TopNav.astro'
|
||||
import SearchForm from '~/components/V2017Sheet/SearchForm.astro'
|
||||
|
||||
const t = {
|
||||
title: 'Not found',
|
||||
title: '404',
|
||||
description: "Sorry, we don't have a cheatsheet for this yet. Try searching!",
|
||||
goHome: 'Back to home'
|
||||
}
|
||||
|
||||
const styles = {
|
||||
body: 'V2017Sheet__body max-w-slim p-6 md:px-8 mx-auto'
|
||||
}
|
||||
|
||||
const headingStyles = {
|
||||
root: cx('SiteHeading404__root', 'my-12 mt-[30svh] text-center'),
|
||||
h1: cx('SiteHeading404__h1', `text-5xl font-bold`),
|
||||
tagline: cx('SiteHeading404__tagline', 'mt-4', 'text-2xl')
|
||||
}
|
||||
---
|
||||
|
||||
<BaseLayout title="Not found">
|
||||
<TopNav noEdit noBack />
|
||||
<div class="body-area -slim">
|
||||
<div class="site-header">
|
||||
<h1>{t.title}</h1>
|
||||
<p>{t.description}</p>
|
||||
<div class={styles.body}>
|
||||
<div class={headingStyles.root}>
|
||||
<h1 class={headingStyles.h1}>{t.title}</h1>
|
||||
<p class={headingStyles.tagline}>{t.description}</p>
|
||||
</div>
|
||||
<div>
|
||||
<SearchForm isLive />
|
||||
<p class="action">
|
||||
<div class="mt-8"></div>
|
||||
<p class="text-center">
|
||||
<a class="push-button" href="/">{t.goHome}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -27,7 +41,5 @@ const t = {
|
|||
<style lang="scss" is:global>
|
||||
@import '../sass/2017/utils';
|
||||
@import '../sass/2017/placeholders/push-button';
|
||||
@import '../sass/2017/components/body-area';
|
||||
@import '../sass/2017/components/push-button';
|
||||
@import '../sass/2017/components/site-header';
|
||||
</style>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
import cx from 'clsx'
|
||||
import { getPages } from '~/lib/page'
|
||||
import { getSEOPropsForHome } from '~/lib/seo/seo'
|
||||
import {
|
||||
|
@ -14,6 +15,7 @@ import Announcements from '~/components/V2017Home/Announcements.astro'
|
|||
import SearchForm from '~/components/V2017Sheet/SearchForm.astro'
|
||||
import CarbonBox from '~/components/V2017/CarbonBox.astro'
|
||||
import SEO from '~/components/SEO/SEO.astro'
|
||||
import { typeStyles } from '~/styles/CommonStyles'
|
||||
import { urls } from '~/config'
|
||||
|
||||
const pages = await getPages()
|
||||
|
@ -29,6 +31,16 @@ const t = {
|
|||
seeSomethingMissing: 'See something missing?',
|
||||
requestCheatsheet: 'Request cheatsheet'
|
||||
}
|
||||
|
||||
const styles = {
|
||||
body: 'V2017Sheet__body max-w-slim p-6 md:px-8 mx-auto'
|
||||
}
|
||||
|
||||
const headingStyles = {
|
||||
root: cx('SiteHeading__root', 'my-12 text-center'),
|
||||
h1: cx('SiteHeading__h1', typeStyles.manrope, 'text-5xl text-zinc-950'),
|
||||
tagline: cx('SiteHeading__tagline', 'text-xl', 'mt-4')
|
||||
}
|
||||
---
|
||||
|
||||
<BaseLayout>
|
||||
|
@ -36,18 +48,20 @@ const t = {
|
|||
<SEO {...seoProps} />
|
||||
</Fragment>
|
||||
<TopNav noEdit noBack />
|
||||
<div class="body-area -slim">
|
||||
<div class="site-header" role="banner">
|
||||
<h1>{t.title}</h1>
|
||||
<p set:html={t.tagline} />
|
||||
|
||||
{/* Search */}
|
||||
<div class={styles.body}>
|
||||
<div class={headingStyles.root}>
|
||||
<h1 class={headingStyles.h1}>{t.title}</h1>
|
||||
<p class={headingStyles.tagline} set:html={t.tagline} />
|
||||
</div>
|
||||
<div role="banner">
|
||||
<SearchForm isLive />
|
||||
|
||||
<div class="mt-8"></div>
|
||||
|
||||
{/* Publicite */}
|
||||
<div class="pubbox"><CarbonBox /></div>
|
||||
|
||||
{/* TODO: announcement */}
|
||||
<div class="mt-8"></div>
|
||||
</div>
|
||||
|
||||
<div class="pages-list" role="main">
|
||||
|
@ -93,10 +107,8 @@ const t = {
|
|||
|
||||
<style lang="scss" is:global>
|
||||
@import '../sass/2017/utils';
|
||||
@import '../sass/2017/components/body-area';
|
||||
@import '../sass/2017/components/missing-message';
|
||||
@import '../sass/2017/components/pages-list';
|
||||
@import '../sass/2017/components/push-button';
|
||||
@import '../sass/2017/components/notice-box';
|
||||
@import '../sass/2017/components/site-header';
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
// Based on https://github.com/PrismJS/prism/blob/master@%7B2024-03-01%7D/plugins/line-highlight/prism-line-highlight.css
|
||||
// Corrects `color-adjust` (a deprecated CSS property) to `print-color-adjust`.
|
||||
// See: https://github.com/PrismJS/prism/issues/3768
|
||||
|
||||
pre[data-line] {
|
||||
position: relative;
|
||||
padding: 1em 0 1em 3em;
|
||||
}
|
||||
|
||||
.line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: inherit 0;
|
||||
margin-top: 1em; /* Same as .prism’s padding-top */
|
||||
|
||||
background: hsla(24, 20%, 50%, 0.08);
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
hsla(24, 20%, 50%, 0.1) 70%,
|
||||
hsla(24, 20%, 50%, 0)
|
||||
);
|
||||
|
||||
pointer-events: none;
|
||||
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.line-highlight {
|
||||
/*
|
||||
* This will prevent browsers from replacing the background color with white.
|
||||
* It's necessary because the element is layered on top of the displayed code.
|
||||
*/
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
}
|
||||
|
||||
.line-highlight:before,
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-start);
|
||||
position: absolute;
|
||||
top: 0.4em;
|
||||
left: 0.6em;
|
||||
min-width: 1em;
|
||||
padding: 0 0.5em;
|
||||
background-color: hsla(24, 20%, 50%, 0.4);
|
||||
color: hsl(24, 20%, 95%);
|
||||
font: bold 65%/1.5 sans-serif;
|
||||
text-align: center;
|
||||
vertical-align: 0.3em;
|
||||
border-radius: 999px;
|
||||
text-shadow: none;
|
||||
box-shadow: 0 1px white;
|
||||
}
|
||||
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-end);
|
||||
top: auto;
|
||||
bottom: 0.4em;
|
||||
}
|
||||
|
||||
.line-numbers .line-highlight:before,
|
||||
.line-numbers .line-highlight:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows {
|
||||
pointer-events: all;
|
||||
}
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:before {
|
||||
cursor: pointer;
|
||||
}
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
|
||||
background-color: rgba(128, 128, 128, 0.2);
|
||||
}
|
|
@ -2,24 +2,26 @@
|
|||
* h2 section
|
||||
*/
|
||||
|
||||
/* Hide the first h2 heading */
|
||||
.h2-section {
|
||||
&:first-child:not(.-no-hide) > h2 {
|
||||
display: none;
|
||||
}
|
||||
// Hide first h2 heading
|
||||
@apply [&:first-child>h2]:hidden;
|
||||
|
||||
@media (min-width: 481px) {
|
||||
& + & {
|
||||
margin-top: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide anchors until mouseover */
|
||||
& > .anchor {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&:hover > .anchor {
|
||||
opacity: 1;
|
||||
}
|
||||
// Space between
|
||||
@apply md:mt-16 md:first-of-type:mt-0;
|
||||
}
|
||||
|
||||
.h2-section h2 {
|
||||
@apply font-manrope font-extrabold tracking-[-0.02em];
|
||||
@apply text-3xl text-zinc-950 target:text-mildindigo-600;
|
||||
@apply scroll-mt-6;
|
||||
}
|
||||
|
||||
a.local-anchor {
|
||||
@apply text-2xl ml-2 text-mildindigo-500 opacity-0;
|
||||
@apply hover:opacity-100 focus:opacity-100;
|
||||
@apply hover:no-underline;
|
||||
}
|
||||
|
||||
.h2-section h2:hover a.local-anchor {
|
||||
@apply opacity-100;
|
||||
}
|
||||
|
|
|
@ -4,34 +4,13 @@
|
|||
*/
|
||||
|
||||
.h3-section-list {
|
||||
& {
|
||||
@include section-gutter(margin-left, $multiplier: -1);
|
||||
@include section-gutter(margin-right, $multiplier: -1);
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
column-gap: 0;
|
||||
}
|
||||
@apply px-0 gap-6 lg:gap-8 my-0;
|
||||
// @apply grid grid-cols-3;
|
||||
}
|
||||
|
||||
// Clearfix
|
||||
&::after {
|
||||
content: '';
|
||||
display: table;
|
||||
clear: both;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
// Each section
|
||||
& > .h3-section {
|
||||
@include section-gutter(padding);
|
||||
width: 100%;
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
& > .h3-section {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
.h3-section {
|
||||
@apply w-full break-inside-avoid;
|
||||
@apply pb-12 pt-0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,73 +2,24 @@
|
|||
* H3 section
|
||||
*/
|
||||
|
||||
.h3-section > .body {
|
||||
& > pre,
|
||||
& > .gatsby-highlight > pre {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
& {
|
||||
background: white;
|
||||
box-shadow: $shadow3;
|
||||
}
|
||||
|
||||
/* Collapse/flush */
|
||||
@media (max-width: 480px) {
|
||||
margin: 0 -16px;
|
||||
box-shadow: $shadow2;
|
||||
}
|
||||
|
||||
/* Border radius */
|
||||
@media (min-width: 481px) {
|
||||
& {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
& > :first-child {
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
& > :last-child {
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Heading
|
||||
*/
|
||||
|
||||
.h3-section > .body {
|
||||
@apply bg-white shadow-md-cool;
|
||||
@apply overflow-x-auto;
|
||||
@apply rounded-md [&>*:first-child]:rounded-t-md [&>*:last-child]:rounded-b-md;
|
||||
@apply [&>pre]:m-0 [&>pre]:p-4;
|
||||
}
|
||||
|
||||
.h3-section > h3 {
|
||||
& {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 16px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// Mobile: the padding below h3-section is enough
|
||||
@media (max-width: 768px) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// Horizontal line
|
||||
&::after {
|
||||
margin-left: 24px;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: linear-gradient(to right, rgba($base-a, 0.2), transparent 80%);
|
||||
}
|
||||
@apply border-t-mildindigo-500 border-t-2;
|
||||
@apply text-mildindigo-800;
|
||||
@apply text-xl;
|
||||
@apply pt-4;
|
||||
@apply font-manrope font-extrabold tracking-[-0.02em];
|
||||
@apply mt-0 mb-4 whitespace-nowrap overflow-hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -162,17 +113,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Variant: Prime
|
||||
*/
|
||||
|
||||
.h3-section.-prime > .body {
|
||||
@media (min-width: 481px) {
|
||||
border-radius: 2px;
|
||||
box-shadow: $shadow6;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Variant: Also see :\
|
||||
*/
|
||||
|
@ -226,10 +166,6 @@ ul.-also-see.-also-see.-also-see {
|
|||
display: none;
|
||||
}
|
||||
|
||||
// & > .body > ul > li:hover {
|
||||
// background: rgba($base-b3, 0.1);
|
||||
// }
|
||||
|
||||
& > .body > ul > li > a {
|
||||
@include font-size(1);
|
||||
display: block;
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
font-weight: 200;
|
||||
font-family: $heading-font;
|
||||
margin-top: 0;
|
||||
|
||||
&:target {
|
||||
color: $base-a;
|
||||
}
|
||||
}
|
||||
|
||||
.MarkdownBody h3 {
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
& tr th:last-child,
|
||||
& tr td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
// & tr th:last-child,
|
||||
// & tr td:last-child {
|
||||
// text-align: right;
|
||||
// }
|
||||
|
||||
& td:first-child {
|
||||
white-space: nowrap;
|
||||
|
@ -77,7 +77,6 @@
|
|||
background: $gray-bg;
|
||||
border-radius: 3px;
|
||||
margin-right: 2px;
|
||||
letter-spacing: 0.1em;
|
||||
color: $base-text;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ $monospace-font: cousine, $system-mono;
|
|||
* Base colors
|
||||
*/
|
||||
|
||||
$base-body: #f1f3f5;
|
||||
$base-body: #fafafc;
|
||||
$base-panel: white;
|
||||
$base-head: #111;
|
||||
$base-text: #345;
|
||||
|
@ -45,7 +45,7 @@ $base-mute4: adjust-color($base-mute, $lightness: 8%);
|
|||
$base-mute3: adjust-color($base-mute, $lightness: 16%);
|
||||
|
||||
$body-bg: $base-body;
|
||||
$gray-bg: mix($base-body, $base-panel, 50%);
|
||||
$gray-bg: #f3f5fc;
|
||||
$gray-text: $base-mute;
|
||||
|
||||
$line-color: rgba($base-mute, 0.18);
|
||||
|
|
|
@ -1,50 +1,72 @@
|
|||
// Third-party
|
||||
@import 'sanitize.css';
|
||||
@import 'hint.css';
|
||||
@import 'prismjs/plugins/line-highlight/prism-line-highlight.css';
|
||||
@import './2017/variables';
|
||||
@import './2017/utils/font-size';
|
||||
@import './vendor/modularscale/modularscale';
|
||||
|
||||
// v2017
|
||||
@import './2017/utils';
|
||||
/*
|
||||
* Base
|
||||
*/
|
||||
|
||||
@import './2017/base/base';
|
||||
html,
|
||||
body {
|
||||
background: $base-body;
|
||||
font-family: $body-font;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: $base-text;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
// @import './2017/markdown/a-em';
|
||||
// @import './2017/markdown/code';
|
||||
// @import './2017/markdown/headings';
|
||||
// @import './2017/markdown/local-anchor';
|
||||
// @import './2017/markdown/p';
|
||||
// @import './2017/markdown/table';
|
||||
// @import './2017/markdown/ul';
|
||||
body {
|
||||
@include font-size(0);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@import './2017/components/attribute-peg';
|
||||
// @import './2017/components/announcements-item';
|
||||
// @import './2017/components/announcements-list';
|
||||
// @import './2017/components/back-button'; // in TopNav
|
||||
// @import './2017/components/body-area'; // in index.astro
|
||||
// @import './2017/components/comments-area';
|
||||
// @import './2017/components/comments-details';
|
||||
// @import './2017/components/comments-section';
|
||||
// @import './2017/components/h2-section';
|
||||
// @import './2017/components/h3-section';
|
||||
// @import './2017/components/h3-section-list';
|
||||
// @import './2017/components/headline-pub';
|
||||
// @import './2017/components/hint-mark';
|
||||
// @import './2017/components/home-button';
|
||||
// @import './2017/components/intro-content';
|
||||
// @import './2017/components/main-heading';
|
||||
// @import './2017/components/missing-message';
|
||||
// @import './2017/components/notice-box';
|
||||
// @import './2017/components/page-actions'; // in TopNav
|
||||
// @import './2017/components/pre-footer'; // in [slug].astro
|
||||
// @import './2017/components/push-button';
|
||||
// @import './2017/components/related-posts-area'; // in RelatedPosts
|
||||
// @import './2017/components/related-posts-callout';
|
||||
// @import './2017/components/related-posts-group';
|
||||
// @import './2017/components/related-posts-section';
|
||||
// @import './2017/components/related-post-list';
|
||||
// @import './2017/components/related-post-item';
|
||||
// @import './2017/components/search-box';
|
||||
// @import './2017/components/search-footer';
|
||||
// @import './2017/components/site-header'; // in index.astro
|
||||
// @import './2017/components/top-nav'; // in <TopNav>
|
||||
// @import './2017/components/top-sheet'; // in <FeautredPages>
|
||||
/*
|
||||
* Code
|
||||
*/
|
||||
|
||||
pre,
|
||||
code {
|
||||
font-family: $monospace-font;
|
||||
letter-spacing: -0.03em;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-size: $code-size;
|
||||
}
|
||||
|
||||
/*
|
||||
* Antialias
|
||||
*/
|
||||
|
||||
*:not(pre):not(code) {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/*
|
||||
* Links
|
||||
*/
|
||||
|
||||
a {
|
||||
color: $base-b;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: $base-b7;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: $base-b3;
|
||||
}
|
||||
|
||||
// No tooltips on mobile
|
||||
@media (max-width: 580px) {
|
||||
.hint--bottom {
|
||||
&::before,
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ const DEFAULTS = {
|
|||
// text of anchor
|
||||
text: '#',
|
||||
// append before or after innerText?
|
||||
shouldAppend: false
|
||||
shouldAppend: true
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -32,6 +32,7 @@ export function setupAnchors() {
|
|||
const anchor = document.createElement('a')
|
||||
anchor.setAttribute('href', `#${id}`)
|
||||
anchor.setAttribute('class', className)
|
||||
anchor.setAttribute('aria-hidden', 'true')
|
||||
anchor.innerText = String(text || DEFAULTS.text)
|
||||
|
||||
if (shouldAppend) {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export const typeStyles = {
|
||||
manrope: 'font-manrope font-extrabold tracking-[-0.02em]'
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import resolveConfig from 'tailwindcss/resolveConfig'
|
||||
|
||||
const defaults = resolveConfig({})
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
|
||||
theme: {
|
||||
extend: {
|
||||
spacing: {
|
||||
// max-widths
|
||||
content: '1232px',
|
||||
slim: '740px'
|
||||
},
|
||||
colors: {
|
||||
mildindigo: {
|
||||
50: '#F2F1F8',
|
||||
100: '#E8E7F3',
|
||||
200: '#D0CFE8',
|
||||
300: '#B5B4DA',
|
||||
400: '#9E9CCF',
|
||||
500: '#8784C3',
|
||||
600: '#6F6BB7',
|
||||
700: '#4C4893',
|
||||
800: '#312F60',
|
||||
900: '#191730',
|
||||
950: '#0C0C18'
|
||||
}
|
||||
},
|
||||
|
||||
fontFamily: {
|
||||
manrope: ['Manrope', ...defaults.theme.fontFamily.sans]
|
||||
},
|
||||
|
||||
boxShadow: {
|
||||
'lg-cool': [
|
||||
'0 1px 1px rgb(0 0 80 / 0.05)',
|
||||
'0 1.5px 3px -1px rgb(0 0 80 / 0.15)',
|
||||
'0 4px 6px -1px rgb(0 0 80 / 0.07)',
|
||||
'0 8px 12px -1px rgb(0 0 80 / 0.04)'
|
||||
].join(', '),
|
||||
'md-cool': [
|
||||
'0 0 0 1px rgb(0 0 80 / 0.1)',
|
||||
'0 1px 1px rgb(0 0 80 / 0.1)',
|
||||
'0 1.5px 3px -2px rgb(0 0 80 / 0.3)',
|
||||
'0 4px 6px rgb(0 0 80 / 0.04)',
|
||||
'0 8px 12px -1px rgb(0 0 80 / 0.03)'
|
||||
].join(', ')
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: []
|
||||
}
|
|
@ -58,12 +58,14 @@ test('date pages', async ({ page }) => {
|
|||
await page.goto('/moment')
|
||||
await page.getByRole('heading', { name: 'Moment.js cheatsheet' }).focus()
|
||||
await page.getByRole('heading', { name: 'Parsing' }).focus()
|
||||
await page.getByRole('heading', { name: 'Formatting', exact: true }).focus()
|
||||
await page
|
||||
.getByRole('heading', { name: 'Internationalization', exact: true })
|
||||
.focus()
|
||||
await page.getByRole('heading', { name: 'Add' }).focus()
|
||||
|
||||
await page.goto('/datetime')
|
||||
await page.getByRole('heading', { name: '#strftime format' }).focus()
|
||||
await page.getByRole('heading', { name: '#Moment.js format' }).focus()
|
||||
await page.getByRole('heading', { name: 'strftime format' }).focus()
|
||||
await page.getByRole('heading', { name: 'Moment.js format' }).focus()
|
||||
})
|
||||
|
||||
test('/knex', async ({ page }) => {
|
||||
|
|
Loading…
Reference in New Issue