feat: rearrange project page

finxol.io e3dc0cd3 1700ce37

verified
Changed files
+141 -65
src
assets
styles
projects
layouts
pages
en
projects
fr
projects
+79 -15
src/assets/styles/projects/karr.css
···
article {
display: grid;
-
grid-template-columns: auto 1fr;
-
align-items: center;
grid-template-areas:
-
"back-btn title"
-
". subtitle"
-
". img"
-
". description"
-
". boxes";
gap: var(--spacing);
margin-inline-end: 3rem;
font-size: 1.1rem;
& > a {
grid-area: back-btn;
···
& > h2 {
grid-area: title;
margin: 0;
-
font-size: 2.5rem;
-
font-weight: bold;
}
& > p.subtitle {
grid-area: subtitle;
margin: 0;
-
font-size: 1.2rem;
}
-
& > picture,
-
& > img {
grid-area: img;
align-self: center;
justify-self: center;
···
& > p.description {
grid-area: description;
}
-
& > div.boxes {
-
grid-area: boxes;
display: grid;
-
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: var(--spacing);
}
}
···
article {
display: grid;
+
grid-template-columns: auto auto 1fr;
grid-template-areas:
+
"back-btn title subtitle"
+
". img img"
+
". description description";
gap: var(--spacing);
+
column-gap: calc(var(--spacing) * 2);
+
row-gap: calc(var(--spacing) * 3);
+
align-items: center;
margin-inline-end: 3rem;
font-size: 1.1rem;
+
+
@media screen and (max-width: 768px) {
+
grid-template-areas:
+
"back-btn title"
+
"subtitle subtitle"
+
"img img"
+
"description description"
+
"boxes boxes";
+
margin-inline-end: 0;
+
}
& > a {
grid-area: back-btn;
···
& > h2 {
grid-area: title;
margin: 0;
+
font-size: 2.7rem;
+
font-weight: bolder;
+
width: min-content;
}
& > p.subtitle {
grid-area: subtitle;
margin: 0;
+
font-size: 1.5rem;
+
align-self: end;
+
margin-block-end: 0.2rem;
}
+
& > div {
grid-area: img;
align-self: center;
justify-self: center;
···
& > p.description {
grid-area: description;
+
margin: 0;
+
font-size: 1.2rem;
}
+
& > div {
display: grid;
+
grid-template-areas:
+
"img box1"
+
"img box2"
+
"img box3";
gap: var(--spacing);
+
+
@media screen and (max-width: 768px) {
+
flex-direction: column;
+
align-items: center;
+
}
+
+
& > img,
+
& > picture {
+
grid-area: img;
+
border-radius: var(--radius);
+
+
img {
+
object-fit: cover;
+
height: 100%;
+
}
+
}
+
+
div.container {
+
display: flex;
+
flex-direction: column;
+
align-items: center;
+
justify-content: center;
+
gap: var(--spacing);
+
font-size: 1.2rem;
+
text-align: center;
+
+
&:nth-child(1) {
+
grid-area: box1;
+
}
+
&:nth-child(2) {
+
grid-area: box2;
+
}
+
&:nth-child(3) {
+
grid-area: box3;
+
}
+
+
& > svg {
+
--size: 3rem;
+
color: var(--color-primary);
+
}
+
+
a {
+
text-decoration: none;
+
color: inherit;
+
}
+
+
--container-color: var(--teal-300);
+
}
}
}
-8
src/layouts/Layout.astro
···
transition: color 0.3s ease-in-out;
--container-color: var(--amber-500);
--container-text-color: var(--amber-950);
-
-
svg {
-
--size: 1.5rem;
-
-
&.external-link {
-
--size: 0.75rem;
-
}
-
}
}
& > * {
···
transition: color 0.3s ease-in-out;
--container-color: var(--amber-500);
--container-text-color: var(--amber-950);
}
& > * {
+31 -23
src/pages/en/projects/karr.astro
···
import Layout from "@/layouts/Layout.astro";
import "@/assets/styles/projects/karr.css";
import { Icon } from "astro-icon/components";
-
import { Image } from "astro:assets";
import karrJpg from "@/assets/img/karr_demo.jpg";
import karrWebp from "@/assets/img/karr_demo.webp";
-
-
const homepage = Astro.url;
-
homepage.pathname = "/";
---
<Layout>
<article>
-
<a href={homepage}>
<Icon name="pixel:arrow-alt-circle-left" />
</a>
···
<p class="subtitle">Federated carpool platform for companies</p>
-
<picture style="view-transition-name: karr-img">
-
<source srcset={karrWebp.src} type="image/webp" />
-
<img src={karrJpg.src} alt="Karr" />
-
</picture>
-
<p class="description">
-
This entrepreneurial project was carried out for 5 months with
-
<a href="https://www.pepitebretagne.fr/"> Pépite Bretagne</a>. The
-
project was discontinued after a market study revealed a
-
well-established competition, already subsidized by public funds.
-
</p>
-
<div class="boxes">
<div class="container">
-
Github repo
-
<a href="https://github.com/karr-mobi/karr">
-
https://github.com/karr-mobi/karr
-
</a>
</div>
<div class="container">
-
Github repo
-
<a href="https://github.com/karr-mobi/karr">
-
https://github.com/karr-mobi/karr
</a>
</div>
</div>
</article>
</Layout>
···
import Layout from "@/layouts/Layout.astro";
import "@/assets/styles/projects/karr.css";
import { Icon } from "astro-icon/components";
import karrJpg from "@/assets/img/karr_demo.jpg";
import karrWebp from "@/assets/img/karr_demo.webp";
---
<Layout>
<article>
+
<a href="/">
<Icon name="pixel:arrow-alt-circle-left" />
</a>
···
<p class="subtitle">Federated carpool platform for companies</p>
+
<div class="boxes">
+
<picture style="view-transition-name: karr-img">
+
<source srcset={karrWebp.src} type="image/webp" />
+
<img src={karrJpg.src} alt="Karr" />
+
</picture>
+
<div class="container">
+
<Icon name="tabler:brand-git" />
+
<span>
+
Since {new Date("10 October 2024").toLocaleDateString()}
+
</span>
+
</div>
<div class="container">
+
<Icon name="tabler:brand-nodejs" />
+
<span> NodeJS </span>
</div>
+
<div class="container">
+
<Icon name="tabler:brand-github" />
+
<a
+
href="https://github.com/karr-mobi/karr"
+
class="cover"
+
target="_blank"
+
rel="noopener noreferrer"
+
>
+
Github repo
+
<Icon name="pixel:external-link" class="external-link" />
</a>
</div>
</div>
+
+
<p class="description">
+
This entrepreneurial project was carried out for 5 months with
+
<a href="https://www.pepitebretagne.fr/"> Pépite Bretagne</a>. The
+
project was discontinued after a market study revealed a
+
well-established competition, already subsidized by public funds.
+
</p>
</article>
</Layout>
+31 -19
src/pages/fr/projects/karr.astro
···
Plateforme de covoiturage fédérée pour entreprises
</p>
-
<picture style="view-transition-name: karr-img">
-
<source srcset={karrWebp.src} type="image/webp" />
-
<img src={karrJpg.src} alt="Karr" />
-
</picture>
-
<p class="description">
-
Ce projet entrepreneurial a été porté pendant 5 mois avec
-
<a href="https://www.pepitebretagne.fr/"> Pépite Bretagne</a>.
-
L'arrêt du projet a été décidé après une étude de marché révélant
-
une concurrence déjà fortement présente et subventionnée par des
-
fonds publics.
-
</p>
-
<div class="boxes">
<div class="container">
-
Github repo
-
<a href="https://github.com/karr-mobi/karr">
-
https://github.com/karr-mobi/karr
-
</a>
</div>
<div class="container">
-
Github repo
-
<a href="https://github.com/karr-mobi/karr">
-
https://github.com/karr-mobi/karr
</a>
</div>
</div>
</article>
</Layout>
···
Plateforme de covoiturage fédérée pour entreprises
</p>
+
<div class="boxes">
+
<picture style="view-transition-name: karr-img">
+
<source srcset={karrWebp.src} type="image/webp" />
+
<img src={karrJpg.src} alt="Karr" />
+
</picture>
+
<div class="container">
+
<Icon name="tabler:brand-git" />
+
<span>
+
Depuis le {new Date("10 October 2024").toLocaleDateString()}
+
</span>
+
</div>
<div class="container">
+
<Icon name="tabler:brand-nodejs" />
+
<span> NodeJS </span>
</div>
+
<div class="container">
+
<Icon name="tabler:brand-github" />
+
<a
+
href="https://github.com/karr-mobi/karr"
+
class="cover"
+
target="_blank"
+
rel="noopener noreferrer"
+
>
+
Github repo
+
<Icon name="pixel:external-link" class="external-link" />
</a>
</div>
</div>
+
+
<p class="description">
+
Ce projet entrepreneurial a été porté pendant 5 mois avec
+
<a href="https://www.pepitebretagne.fr/"> Pépite Bretagne</a>.
+
L'arrêt du projet a été décidé après une étude de marché révélant
+
une concurrence déjà fortement présente et subventionnée par des
+
fonds publics.
+
</p>
</article>
</Layout>