added ImageMod component for image optimization

This commit is contained in:
somrat sorkar
2023-12-24 13:14:41 +06:00
parent 92ec961f80
commit 37d7a190d8
12 changed files with 127 additions and 27 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
---
import ImageMod from "@/components/ImageMod.astro";
import { markdownify } from "@/lib/utils/textConverter";
import { Image } from "astro:assets";
const { call_to_action } = Astro.props;
---
@@ -11,7 +11,7 @@ const { call_to_action } = Astro.props;
<div class="rounded-xl bg-theme-light px-4 py-16 dark:bg-darkmode-theme-light xl:p-20">
<div class="row items-center justify-between">
<div class="mb-10 md:col-5 lg:col-4 md:order-2 md:mb-0">
<Image
<ImageMod
class="w-full"
src={call_to_action.data.image}
width={392}
+2 -3
View File
@@ -1,6 +1,6 @@
---
import { markdownify } from "@/lib/utils/textConverter";
import { Image } from "astro:assets";
import ImageMod from "@/components/ImageMod.astro";
const { testimonial } = Astro.props;
---
@@ -45,7 +45,7 @@ const { testimonial } = Astro.props;
/>
<div class="mt-11 flex items-center">
<div class="text-dark dark:text-white">
<Image
<ImageMod
height={50}
width={50}
class="rounded-full"
@@ -91,7 +91,6 @@ const { testimonial } = Astro.props;
modules: [Pagination, Autoplay],
spaceBetween: 24,
loop: true,
loopedSlides: 2,
centeredSlides: true,
autoplay: {
delay: 2500,