Begin migrate to leptos

This commit is contained in:
Florian RICHER 2023-10-08 20:26:40 +02:00
parent 1060e12513
commit 79daad993e
45 changed files with 3202 additions and 1975 deletions

View file

@ -0,0 +1,20 @@
import react from 'react'
type ProjectElementProps = {
image_src?: string,
description: string,
url: string
}
function ProjectElement({ image_src, description, url }: ProjectElementProps) {
return (
<a href={url} target='_blank'>
{
image_src && <img src={image_src} />
}
<div><p>{description}</p></div>
</a>
)
}
export default ProjectElement

View file

@ -0,0 +1,22 @@
.project_list {
@apply grid grid-cols-1 gap-4 md:grid-cols-2 mt-3;
& > a {
@apply rounded-lg p-5 flex flex-col items-center gap-2;
@apply bg-primary/10 dark:bg-dark_primary/10;
@apply shadow-md shadow-primary/5 dark:shadow-dark_primary/5;
&:hover {
@apply bg-primary/20 dark:bg-dark_primary/20;
@apply shadow-md shadow-primary/10 dark:shadow-dark_primary/10;
}
& > img {
@apply h-1/2;
}
& > div {
@apply flex flex-col justify-center h-full;
}
}
}

View file

@ -0,0 +1,16 @@
import './ProjectList.scss'
import react from 'react'
type ProjectListProps = {
children: react.ReactElement<any, react.JSXElementConstructor<any>> | react.ReactElement<any, react.JSXElementConstructor<any>>[]
}
function ProjectList({ children } : ProjectListProps) {
return (
<div className="project_list">
{ children }
</div>
)
}
export default ProjectList