Skip to content

Commit

Permalink
wip(project)
Browse files Browse the repository at this point in the history
  • Loading branch information
math-pixel committed Aug 20, 2024
1 parent 2d8a232 commit 63a2def
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 66 deletions.
61 changes: 8 additions & 53 deletions src/components/Card.astro
Original file line number Diff line number Diff line change
@@ -1,61 +1,16 @@
---
interface Props {
title: string;
body: string;
description: string;
href: string;
thumbnail: string;
}
const { href, title, body } = Astro.props;
const { href, title, description, thumbnail } = Astro.props;
---

<li class="link-card">
<a href={href}>
<h2>
{title}
<span>&rarr;</span>
</h2>
<p>
{body}
</p>
</a>
</li>
<style>
.link-card {
list-style: none;
display: flex;
padding: 1px;
background-color: #23262d;
background-image: none;
background-size: 400%;
border-radius: 7px;
background-position: 100%;
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.link-card > a {
width: 100%;
text-decoration: none;
line-height: 1.4;
padding: calc(1.5rem - 1px);
border-radius: 8px;
color: white;
background-color: #23262d;
opacity: 0.8;
}
h2 {
margin: 0;
font-size: 1.25rem;
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
p {
margin-top: 0.5rem;
margin-bottom: 0;
}
.link-card:is(:hover, :focus-within) {
background-position: 0;
background-image: var(--accent-gradient);
}
.link-card:is(:hover, :focus-within) h2 {
color: rgb(var(--accent-light));
}
</style>
<a href={href}>
<img src={thumbnail} alt="">
<h2>{title}</h2>
<p>{description}</p>
</a >
7 changes: 7 additions & 0 deletions src/content/projets/3d printer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title : ["3D Printer"]
thumbnail : ""
images : [""]
description : ["lorem", ipsum]
layout : ["left", "center"]
---
26 changes: 13 additions & 13 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import Card from '../components/Card.astro';
const cards = [
{ title: "3D Printer", body: "yay" ,href: "" },
{ title: "2D Printer", body: "yey" ,href: "" },
{ title: "1D Printer", body: "null" ,href: "" }
// { title: "2D Printer", body: "yey" ,href: "" },
// { title: "1D Printer", body: "null" ,href: "" }
]
---
Expand All @@ -17,25 +17,25 @@ const cards = [

<div id="home" class=" ">

<h1>Mathieu Chavanel</h1>
<h2>Creatif Developpeur</h2>
<img src="" alt="">
<Button title='Projets' href='/projets'></Button>
<Button title='Contact' href='/#contact'></Button>
<a href="">Découvrir</a>
<div>
<div>
<h1>Mathieu Chavanel</h1>
<h2>Developpeur Creatif</h2>
<p>Description</p>
</div>
<img src="" alt="">
</div>

<a href="">arrow</a>

</div>

<div id="projectHighlight">
{cards.map((currentCard) => (
<Card title={currentCard.title} body={currentCard.body} href={currentCard.href}></Card>
<Card title={currentCard.title} description={currentCard.body} href={currentCard.href} thumbnail=''></Card>
))}
</div>

<div id="labs">

</div>

<div id="contact">

</div>
Expand Down

0 comments on commit 63a2def

Please sign in to comment.