Skip to content

Commit

Permalink
improvements in the images
Browse files Browse the repository at this point in the history
  • Loading branch information
angelip2303 committed Sep 28, 2024
1 parent 92e9a55 commit 8c30af2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .astro/assets.mjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default new Map();
export default new Map();
8 changes: 4 additions & 4 deletions src/components/common/Card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export const prerender = true;
src={images[image]()}
alt={name}
class={`
h-full w-full object-cover
transition-scale
duration-1000 ease-in-out group-hover:scale-110
`}
h-full w-full object-cover
transition-scale
duration-1000 ease-in-out group-hover:scale-110
`}
/>
<div
class={`
Expand Down
14 changes: 13 additions & 1 deletion src/components/common/Timeline.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
---
import { Icon } from "astro-icon/components";
import type { ImageMetadata } from "astro";
import { Image } from "astro:assets";
import { render, type CollectionEntry } from "astro:content";
export interface Props {
experience: CollectionEntry<"experience">;
}
const images = import.meta.glob<{ default: ImageMetadata }>(
"/src/assets/*.{jpeg,jpg,png,gif,webp}",
);
const { experience } = Astro.props;
const { data } = experience;
const { company, job, startMonth, startYear, endMonth, endYear, logo } = data;
Expand All @@ -16,7 +24,11 @@ export const prerender = true;
---

<li class="accordion flex gap-4">
<img src={logo} class="dark:bg-foreground size-12 rounded-full border" />
<Image
src={images[logo]()}
alt={job}
class="object-contain dark:bg-foreground size-12 rounded-full border"
/>
<div
class={`
accordion-button
Expand Down

0 comments on commit 8c30af2

Please sign in to comment.