fix: switch to experimental image support and import missing images

This commit is contained in:
Derrick Hammer 2023-08-12 21:53:49 -04:00
parent 1d37d5b79a
commit cd278e3a46
5 changed files with 13533 additions and 13583 deletions

View File

@ -1,9 +1,11 @@
import { defineConfig } from 'astro/config'; import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'; import tailwind from '@astrojs/tailwind'
import react from '@astrojs/react'; import react from '@astrojs/react'
import image from '@astrojs/image';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
integrations: [tailwind({ config: { applyBaseStyles: false } }), image(), react()], integrations: [tailwind({ config: { applyBaseStyles: false } }), react()],
}); experimental: {
assets: true
}
})

55
npm-shrinkwrap.json generated
View File

@ -8,7 +8,6 @@
"name": "@lumeweb/lumeweb.com", "name": "@lumeweb/lumeweb.com",
"version": "0.0.1", "version": "0.0.1",
"dependencies": { "dependencies": {
"@astrojs/image": "^0.16.6",
"@astrojs/react": "^2.1.1", "@astrojs/react": "^2.1.1",
"@astrojs/tailwind": "^3.1.1", "@astrojs/tailwind": "^3.1.1",
"@types/react": "^18.2.0", "@types/react": "^18.2.0",
@ -42,11 +41,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/@altano/tiny-async-pool": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@altano/tiny-async-pool/-/tiny-async-pool-1.0.2.tgz",
"integrity": "sha512-qQzaI0TBUPdpjZ3qo5b2ziQY9MSNpbziH2ZrE5lvtUZL+kn9GwVuVJwoOubaoNkeDB+rqEefnpu1k+oMpOCYiw=="
},
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
@ -64,28 +58,6 @@
"resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.5.1.tgz",
"integrity": "sha512-iIGKu/uzB8sJ5VveQf0eHrVPPFEcrvSlp4qShYMOuY2aMmK2RVXQlX9dUjtmBQ+NAokfIOb7fwCutvH+p13l+g==" "integrity": "sha512-iIGKu/uzB8sJ5VveQf0eHrVPPFEcrvSlp4qShYMOuY2aMmK2RVXQlX9dUjtmBQ+NAokfIOb7fwCutvH+p13l+g=="
}, },
"node_modules/@astrojs/image": {
"version": "0.16.9",
"resolved": "https://registry.npmjs.org/@astrojs/image/-/image-0.16.9.tgz",
"integrity": "sha512-8RfGGd1MAIQ6xCHgmu+xXBKWE14gvWYcIv61PxWlToEBgMUbmFdN5ICBQ1bea24rx6o5WvsvRjfOnkjPpf2eew==",
"dependencies": {
"@altano/tiny-async-pool": "^1.0.2",
"http-cache-semantics": "^4.1.0",
"image-size": "^1.0.2",
"kleur": "^4.1.5",
"magic-string": "^0.27.0",
"mime": "^3.0.0"
},
"peerDependencies": {
"astro": "^2.5.0",
"sharp": ">=0.31.0"
},
"peerDependenciesMeta": {
"sharp": {
"optional": true
}
}
},
"node_modules/@astrojs/internal-helpers": { "node_modules/@astrojs/internal-helpers": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.1.0.tgz", "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.1.0.tgz",
@ -4633,11 +4605,6 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/http-cache-semantics": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ=="
},
"node_modules/http-proxy-agent": { "node_modules/http-proxy-agent": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz",
@ -4700,20 +4667,6 @@
"node": ">= 4" "node": ">= 4"
} }
}, },
"node_modules/image-size": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz",
"integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==",
"dependencies": {
"queue": "6.0.2"
},
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/immutable": { "node_modules/immutable": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz",
@ -10427,14 +10380,6 @@
"node": ">=10.13.0" "node": ">=10.13.0"
} }
}, },
"node_modules/queue": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz",
"integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
"dependencies": {
"inherits": "~2.0.3"
}
},
"node_modules/queue-microtask": { "node_modules/queue-microtask": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",

View File

@ -16,7 +16,6 @@
"semantic-release": "semantic-release" "semantic-release": "semantic-release"
}, },
"dependencies": { "dependencies": {
"@astrojs/image": "^0.16.6",
"@astrojs/react": "^2.1.1", "@astrojs/react": "^2.1.1",
"@astrojs/tailwind": "^3.1.1", "@astrojs/tailwind": "^3.1.1",
"@types/react": "^18.2.0", "@types/react": "^18.2.0",

View File

@ -1,9 +1,12 @@
---
import gfxLeft from "../../../assets/home-gfx-left.png"
---
<section <section
id="web3" id="web3"
class="flex flex-col lg:flex-row lg:bg-transparent lg:p-0 gap-10 mx-10 sm:mx-20 xl:mx-40" class="flex flex-col lg:flex-row lg:bg-transparent lg:p-0 gap-10 mx-10 sm:mx-20 xl:mx-40"
> >
<div class="flex-1 -ml-10 -mr-20 lg:-ml-40 lg:mr-0"> <div class="flex-1 -ml-10 -mr-20 lg:-ml-40 lg:mr-0">
<img src="/src/assets/home-gfx-left.png" class="w-full" /> <img src={gfxLeft.src} class="w-full" />
</div> </div>
<div class="flex-1 -mt-40 space-y-10 flex flex-col justify-center"> <div class="flex-1 -mt-40 space-y-10 flex flex-col justify-center">
<h2 <h2

View File

@ -1,4 +1,5 @@
--- ---
import logo from "../../../assets/lume-logo.png";
const { view } = Astro.props; const { view } = Astro.props;
function getActiveClass(linkView) { function getActiveClass(linkView) {
@ -10,7 +11,7 @@ function getActiveClass(linkView) {
<div class="logo"> <div class="logo">
<!-- TODO: Hide this logo and show simplified when 320 > width --> <!-- TODO: Hide this logo and show simplified when 320 > width -->
<a href="/"> <a href="/">
<img class="w-44" src="/src/assets/lume-logo.png" alt="Lume Logo" /> <img class="w-44" src={logo.src} alt="Lume Logo" />
</a> </a>
</div> </div>
<menu <menu