Skip to content

Commit

Permalink
Temporarly disable astro-assets
Browse files Browse the repository at this point in the history
  • Loading branch information
deeprobin committed Aug 6, 2023
1 parent a0710b4 commit cbc5fdf
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 29 deletions.
12 changes: 6 additions & 6 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig, sharpImageService } from 'astro/config';
import { defineConfig } from 'astro/config';

import solidJs from "@astrojs/solid-js";
import prefetch from "@astrojs/prefetch";
Expand All @@ -25,12 +25,12 @@ export default defineConfig({
},
}), compressor()],
experimental: {
assets: true,
viewTransitions: true
},
image: {
service: sharpImageService(),
//assets: true,
//viewTransitions: true
},
//image: {
// service: sharpImageService(),
//},
output: "server",
site: "https://lindnerit.io/",
});
Binary file added public/communication.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/communication.webp
Binary file not shown.
Binary file added public/hero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/hero.webp
Binary file not shown.
Binary file added public/lindner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/lindner.webp
Binary file not shown.
Binary file added public/mobile.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/BlogCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (asset.fields.file && contentfulUrl) {
imageUrl = "https://via.placeholder.com/300x200";
} else {
const uniqueId = parts[3];
imageUrl = `/cms-assets/${asset.sys.id}/${uniqueId}/${asset.fields.file.fileName}?format=webp&width=300&height=200`;
imageUrl = `/cms/${asset.sys.id}/${uniqueId}/${asset.fields.file.fileName}?format=webp&width=300&height=200`;
}
} else {
imageUrl = "https://via.placeholder.com/300x200";
Expand Down
6 changes: 1 addition & 5 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ const currentLanguage = language === "de" ? "de" : "en";
const t = useTranslations(currentLanguage);
---

<PageHeader
language={language as string}
transition:name="header"
transition:animate="morph"
>
<PageHeader language={language as string}>
<img
slot="branding"
width="119"
Expand Down
14 changes: 7 additions & 7 deletions src/components/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
import { getImage } from "astro:assets";
import hero from "../assets/hero.webp";
//import { getImage } from "astro:assets";
//import hero from "../assets/hero.webp";
import { Button } from "./Button/Button";
import { useTranslations } from "../i18n";
// 06.08.2023 | disable assets for now
/*
const optimizedHero = await getImage({
src: hero,
format: "webp",
quality: 80,
});
*/
const { language } = Astro.params;
const currentLanguage = language === "de" ? "de" : "en";
const t = useTranslations(currentLanguage);
Expand All @@ -32,10 +35,7 @@ const t = useTranslations(currentLanguage);
gap: 0.3rem;
}
</style>
<div
class="lindner-hero"
style={`background-image: url(${optimizedHero.src});`}
>
<div class="lindner-hero" style={`background-image: url('/hero.webp');`}>
<h1>{t("index.hero.title")}</h1>
<p>{t("index.hero.description")}</p>

Expand Down
2 changes: 1 addition & 1 deletion src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="astro/client-image" />
/// <reference types="astro/client" />
interface ImportMetaEnv {
readonly CONTENTFUL_SPACE_ID: string;
readonly CONTENTFUL_DELIVERY_TOKEN: string;
Expand Down
16 changes: 13 additions & 3 deletions src/pages/[language]/about-us.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Footer from "../../components/Footer.astro";
import Header from "../../components/Header.astro";
import Heading from "../../components/Heading.astro";
import BaseLayout from "../../layouts/BaseLayout.astro";
import lindner from "../../assets/lindner.webp";
import { Image } from "astro:assets";
//import lindner from "../../assets/lindner.webp";
//import { Image } from "astro:assets";
import { Button } from "../../components/Button/Button";
import HookSection from "../../components/HookSection.astro";
import { useTranslations } from "../../i18n";
Expand Down Expand Up @@ -88,11 +88,21 @@ const meta = metaBuilder.create();
{t("aboutus.content.title")}
</Heading>
<section id="aboutus">
<Image
{
/*<Image
class="aboutus-image"
height="480"
src={lindner}
alt="Avatar of Robin Lindner"
/>*/
}
<img
src="/lindner.webp"
height="480"
width="320"
decoding="async"
alt="Avatar of Robin Lindner"
class="aboutus-image"
/>
<div>
<h2>{t("aboutus.content.headline")}</h2>
Expand Down
18 changes: 15 additions & 3 deletions src/pages/[language]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import BlogSection from "../../components/BlogSection.astro";
import HookSection from "../../components/HookSection.astro";
import BaseLayout from "../../layouts/BaseLayout.astro";
import { Image } from "astro:assets";
import aboutUsImage from "../../assets/communication.webp";
//import { Image } from "astro:assets";
// 06.08.2023 | disable assets for now
// import aboutUsImage from "../../assets/communication.webp";
import Footer from "../../components/Footer.astro";
import { useTranslations } from "../../i18n";
import { MetaBuilder } from "../../meta";
Expand Down Expand Up @@ -113,7 +116,16 @@ const meta = metaBuilder.create();
</Button></a
>
</div>
<Image class="about-us-image" src={aboutUsImage} alt="About us" />
{/*<Image class="about-us-image" src={aboutUsImage} alt="About us" />*/}
<img
class="about-us-image"
src="/communication.webp"
alt="About us"
width="3284"
height="2916"
loading="lazy"
decoding="async"
/>
</section>
<section id="your-partner">
<Heading>
Expand Down
18 changes: 15 additions & 3 deletions src/pages/[language]/web-design/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import Footer from "../../../components/Footer.astro";
import Header from "../../../components/Header.astro";
import Heading from "../../../components/Heading.astro";
import BaseLayout from "../../../layouts/BaseLayout.astro";
import mobileImage from "~/assets/mobile.webp";
import { Image } from "astro:assets";
// 06.08.2023 | disable assets for now
// import mobileImage from "~/assets/mobile.webp";
// import { Image } from "astro:assets";
import { Button } from "../../../components/Button/Button";
import HookSection from "../../../components/HookSection.astro";
import { useTranslations } from "../../../i18n";
Expand Down Expand Up @@ -88,12 +89,23 @@ const meta = metaBuilder.create();
{t("webDesign.content.title")}
</Heading>
<section id="web-design">
<Image
{
/*<Image
class="web-design-image"
height="480"
src={mobileImage}
alt="Mobile phone"
/>
*/
}
<img
class="web-design-image"
src="/mobile.webp"
height="480"
width="350"
loading="eager"
decoding="async"
/>
<div>
<h2>{t("webDesign.content.headline")}</h2>
<div>
Expand Down
File renamed without changes.

0 comments on commit cbc5fdf

Please sign in to comment.