feat: implement barebone zola templates
This commit is contained in:
parent
9c20f5ed2e
commit
f99a9ae2ac
198 changed files with 2434 additions and 227991 deletions
18
_src/components/MediaGallery/Gallery.module.css
Normal file
18
_src/components/MediaGallery/Gallery.module.css
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
.thumbnailList {
|
||||
display: grid;
|
||||
overflow-x: scroll;
|
||||
|
||||
gap: var(--prj-spacing-3);
|
||||
padding-bottom: var(--prj-spacing-2);
|
||||
|
||||
grid-auto-columns: 25%;
|
||||
grid-auto-flow: column;
|
||||
}
|
||||
|
||||
.thumbnailItem {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.thumbnailItem:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
29
_src/components/MediaGallery/Gallery.tsx
Normal file
29
_src/components/MediaGallery/Gallery.tsx
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import React from 'react';
|
||||
import { type Media } from './types';
|
||||
|
||||
import classes from './Gallery.module.css';
|
||||
import Carousel from '@components/Carousel/Carousel';
|
||||
import CarouselItem from '@components/Carousel/CarouselItem';
|
||||
|
||||
interface Props {
|
||||
items: Media[];
|
||||
height: number;
|
||||
}
|
||||
|
||||
export default function Gallery({ items, height = 500 }: Props): JSX.Element {
|
||||
return (
|
||||
<div style={{ height }}>
|
||||
<Carousel>
|
||||
{items.map((item, idx) => (
|
||||
<CarouselItem key={idx}>
|
||||
<img
|
||||
className="respect-height"
|
||||
src={item.thumbnail ?? item.url}
|
||||
alt={item.alt}
|
||||
/>
|
||||
</CarouselItem>
|
||||
))}
|
||||
</Carousel>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
12
_src/components/MediaGallery/types.ts
Normal file
12
_src/components/MediaGallery/types.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export enum MediaType {
|
||||
Image = 'image',
|
||||
Video = 'video',
|
||||
}
|
||||
|
||||
export interface Media {
|
||||
type: MediaType;
|
||||
url: string;
|
||||
alt: string;
|
||||
mime?: string;
|
||||
thumbnail?: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue