fix: remove Astro critters because of ugly white mode flash in dark mode

This commit is contained in:
Stefan Imhoff
2023-06-15 08:41:22 +02:00
parent dd960cb9b5
commit f2c0769993
6 changed files with 2 additions and 39 deletions

View File

@@ -4,7 +4,6 @@ import prefetch from '@astrojs/prefetch';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import compress from 'astro-compress';
import critters from 'astro-critters';
import { astroImageTools } from 'astro-imagetools';
import webmanifest from 'astro-webmanifest';
import { defineConfig } from 'astro/config';
@@ -82,7 +81,6 @@ export default defineConfig({
],
},
}),
critters(),
compress({
css: true,
html: true,

View File

@@ -32,7 +32,6 @@
"@swup/scroll-plugin": "^2.0.3",
"astro": "^2.6.4",
"astro-compress": "^1.1.47",
"astro-critters": "^1.1.38",
"astro-icon": "^0.8.1",
"astro-imagetools": "^0.8.1",
"astro-seo": "^0.7.4",

31
pnpm-lock.yaml generated
View File

@@ -54,9 +54,6 @@ dependencies:
astro-compress:
specifier: ^1.1.47
version: 1.1.47
astro-critters:
specifier: ^1.1.38
version: 1.1.38
astro-icon:
specifier: ^0.8.1
version: 0.8.1
@@ -5331,13 +5328,6 @@ packages:
terser: 5.17.7
dev: false
/astro-critters@1.1.38:
resolution: {integrity: sha512-hU2XTAxJg3KIq6u5H6VJCJBr120uG8YbTJOqeB/0VP8ufmPCkBcvQs6HzSP1g5qgPjkX9572lZdbSjmrkVjqvQ==}
dependencies:
critters: 0.0.18
files-pipe: 0.0.7
dev: false
/astro-eslint-parser@0.14.0:
resolution: {integrity: sha512-3F8l1h7+5MNxzDg1cSQxEloalG7fj64K6vOERChUVG7RLnAzSoafADnPQlU8DpMM3WRNfRHSC4NwUCORk/aPrA==}
engines: {node: ^14.18.0 || >=16.0.0}
@@ -6575,18 +6565,6 @@ packages:
resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==}
dev: true
/critters@0.0.18:
resolution: {integrity: sha512-I7t/da29EIWXgxx2RSW1md1DvenEgEuLlki6nHE5+Nc0e3eib5AuGIGbPVuI8q+erCKkSP9T/NqYfvasAy7x7A==}
dependencies:
chalk: 4.1.2
css-select: 5.1.0
dom-serializer: 2.0.0
domhandler: 5.0.3
htmlparser2: 8.0.2
postcss: 8.4.24
pretty-bytes: 5.6.0
dev: false
/cron-parser@4.8.1:
resolution: {integrity: sha512-jbokKWGcyU4gl6jAfX97E1gDpY12DJ1cLJZmoDzaAln/shZ+S3KBFBuA2Q6WeUN4gJf/8klnV1EfvhA2lK5IRQ==}
engines: {node: '>=12.0.0'}
@@ -9204,15 +9182,6 @@ packages:
resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==}
dev: false
/htmlparser2@8.0.2:
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
dependencies:
domelementtype: 2.3.0
domhandler: 5.0.3
domutils: 3.1.0
entities: 4.5.0
dev: false
/http-cache-semantics@4.1.1:
resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==}
dev: true

View File

@@ -1,4 +1,3 @@
/* critters:exclude start */
body {
padding-block-end: 0.5cm;
padding-block-start: 1cm;
@@ -54,4 +53,3 @@ a[href^='https://']::after
a[href^='#']::after {
display: none;
}
/* critters:exclude end */

View File

@@ -154,9 +154,8 @@ const webManifest = isProduction && {
document.documentElement.classList.add('js');
</script>
<Scripts />
<ThemeProvider />
<Scripts />
</head>
<body
class="flex h-screen flex-col bg-shibui-100 font-sans font-normal leading-relaxed text-shibui-950 common-ligatures dark:bg-shibui-900 dark:text-shibui-200/[0.87]"

View File

@@ -41,7 +41,7 @@ The source code of this website is available on [GitHub](https://github.com/koga
- All images are optimized with [Astro ImageTools](https://github.com/RafidMuhymin/astro-imagetools/).
- I use YouTube Lite, provided by [Astro Embed](https://github.com/astro-community/astro-embed).
- [Astro SEO](https://github.com/jonasmerlin/astro-seo) makes it easy to add the SEO relevant information.
- I use [Astro Webmanifest](https://github.com/alextim/astro-lib/tree/main/packages/astro-webmanifest), [Astro Service Worker](https://github.com/tatethurston/astrojs-service-worker), [Astro Critters](https://github.com/astro-community/astro-critters), and [Astro Compress](https://github.com/astro-community/astro-compress) to optimize the website.
- I use [Astro Webmanifest](https://github.com/alextim/astro-lib/tree/main/packages/astro-webmanifest), [Astro Service Worker](https://github.com/tatethurston/astrojs-service-worker), and [Astro Compress](https://github.com/astro-community/astro-compress) to optimize the website.
- To generate charts, I use [Chart.js](https://www.chartjs.org/), [react-chartjs-2](https://react-chartjs-2.js.org/), and [chartjs-plugin-autocolors](https://github.com/kurkle/chartjs-plugin-autocolors).
- I use [reading-time](https://github.com/ngryman/reading-time) to add the reading time to Remark.
- To parse and format dates I use [Moment.js](https://momentjs.com/).