Draft project page

This commit is contained in:
Alexis
2025-07-14 15:03:33 +02:00
parent cc980732a1
commit 3e80440afc
9 changed files with 347 additions and 74 deletions

View File

@@ -1,7 +1,49 @@
<div class="p-3 text-slate-200 bg-slate-900 border border-slate-800 rounded-sm">
<div class="flex items-center gap-2">
<slot name="icon" />
---
import { Image } from 'astro:assets'
<slot name="heading" />
interface Props {
imageCover?: string
imageHeight?: number
imageWidth?: number
}
const { imageCover, imageHeight, imageWidth } = Astro.props
---
<article
class="card text-slate-200 bg-slate-900 border border-slate-800 rounded-2xl"
class:list={{
"p-6": !imageCover,
"overflow-hidden": imageCover
}}
>
{imageCover && imageHeight && imageWidth &&
<figure class="w-full">
<Image src={imageCover} height={imageHeight} width={imageWidth} alt={""} loading="lazy" class="w-full h-full object-center" />
</figure>
}
<div
class="grid gap-3"
class:list={{
"p-6": imageCover
}}
>
<header class="flex items-center gap-2">
<slot name="icon" />
<slot name="heading" />
</header>
<div class="body text-slate-400 flow text-[.95em]">
<slot name="body" />
</div>
</div>
</div>
</article>
<style lang="scss">
.card {
background: hsl(from var(--color-slate-900) h s l / 0.25);
backdrop-filter: blur(.5rem);
}
</style>

View File

@@ -1,23 +1,46 @@
---
type HeadingType = 'h0' | 'h1' | 'h2' | 'h3'
interface Props {
tag: 'h1' | 'h2' | 'h3';
tag: HeadingType
style?: HeadingType
}
const { tag = "h1" } = Astro.props;
const { tag = "h1" } = Astro.props
const { style = tag } = Astro.props
function renderClasses(style: HeadingType) {
switch (style) {
case 'h0':
return "font-heading text-4xl md:text-6xl font-bold"
case 'h1':
default:
return "font-heading text-2xl md:text-4xl font-bold"
case 'h2':
return "font-heading text-xl md:text-3xl font-bold"
case 'h3':
return "font-heading text-lg md:text-xl font-bold"
}
}
---
{tag === 'h0' &&
<h1 class:list={renderClasses(style)}>
<slot name="default" />
</h1>
}
{tag === 'h1' &&
<h1 class="font-heading text-4xl md:text-5xl font-bold">
<h1 class:list={renderClasses(style)}>
<slot name="default" />
</h1>
}
{tag === 'h2' &&
<h2 class="font-heading text-xl md:text-3xl font-bold">
<h2 class:list={renderClasses(style)}>
<slot name="default" />
</h2>
}
{tag === 'h3' &&
<h3 class="font-heading md:text-xl font-bold">
<h3 class:list={renderClasses(style)}>
<slot name="default" />
</h3>
}

View File

@@ -0,0 +1,44 @@
---
interface MenuItem {
label: string
to: string
}
const menuItems: MenuItem[] = [
{
label: "Home",
to: "/"
},
{
label: "Projects",
to: "/projects"
}
]
interface Props {
floating?: boolean
}
const { floating = false } = Astro.props
---
<header
class:list={
{
"absolute top-12 left-12 z-10": floating,
"pt-12 pb-6": !floating
}
}
>
<nav aria-labelledby="Main pages">
<menu class="flex gap-12">
{menuItems.map((item) => (
<li>
<a href={item.to} class="py-2">
{item.label}
</a>
</li>
))}
</menu>
</nav>
</header>

View File

@@ -1,53 +0,0 @@
---
import Button from "../Button.astro";
import Heading from "../Heading.astro";
// import HeroVerticalCards from "./HeroVerticalCards.astro";
---
<section id="hero" class="relative h-screen max-w-full">
<div class="h-full container grid place-items-center auto-rows-auto">
<div class="px-4 max-w-2xl text-center">
<Heading tag="h1">
Hello, I'm Alexis&nbsp;!&nbsp;👋
</Heading>
<div class="mt-4">
<p class="md:text-xl">
I'm a front-end engineer from France and all-around web enthusiast.
</p>
</div>
<hr class="my-4 w-12 mx-auto border-none h-[.33rem] rounded-[100vmax] bg-linear-to-b from-emerald-500 to-emerald-600" />
<div>
<p class="md:text-xl">
Let's build something cool together&nbsp;:)
</p>
</div>
<div class="mt-8 flex items-center justify-center gap-4 md:gap-8">
<Button href="https://github.com/AlexisNP" glow variant="primary">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#FFF" viewBox="0 0 256 256">
<path d="M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z" />
</svg>
<span>
Github
</span>
</Button>
<Button href="mailto:contact@alexcreates.fr">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#FFF" viewBox="0 0 256 256">
<path d="M132,24A100.11,100.11,0,0,0,32,124v84a16,16,0,0,0,16,16h84a100,100,0,0,0,0-200Zm0,184H48V124a84,84,0,1,1,84,84Zm12-80a12,12,0,1,1-12-12A12,12,0,0,1,144,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,100,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,188,128Z" />
</svg>
<span>
Contact
</span>
</Button>
</div>
</div>
</div>
<p class="absolute px-4 bottom-8 left-1/2 -translate-x-1/2 opacity-50 text-xs md:text-sm text-center">@2025&nbsp;·&nbsp;Website is currently a WIP&nbsp;;&nbsp;some things may change&nbsp;!</p>
</section>