Skip to content

Commit

Permalink
Update ArchivesPage layout and styling 🦄 🔥👄🔥 🦄
Browse files Browse the repository at this point in the history
  • Loading branch information
GabLeRoux committed Jun 6, 2024
1 parent 7630f09 commit 512e63c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 15 deletions.
30 changes: 16 additions & 14 deletions src/components/pages/ArchivesPage/ArchivesPage.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
import React from 'react';
import { Link } from 'gatsby';
import Layout from '@/components/layout/PageLayout/PageLayout';
import Section from '@/components/shared/Section';
import React from "react";

Check failure on line 1 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Replace `"react"` with `'react'`
import { Link } from "gatsby";

Check failure on line 2 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Replace `"gatsby"` with `'gatsby'`
import Layout from "@/components/layout/PageLayout/PageLayout";

Check failure on line 3 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Replace `"@/components/layout/PageLayout/PageLayout"` with `'@/components/layout/PageLayout/PageLayout'`
import Section from "@/components/shared/Section";

Check failure on line 4 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Replace `"@/components/shared/Section"` with `'@/components/shared/Section'`
import "./ArchivesPage.scss";

Check failure on line 5 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Replace `"./ArchivesPage.scss"` with `'./ArchivesPage.scss'`

const ArchivesPage = ({ events }) => (
<Layout title="Archives">
<Section>
{events.map((event) => (
<div key={event.id}>
<div className="event-card" key={event.id}>
<h2>{event.title}</h2>
<p>Date: {new Date(event.date).toLocaleDateString()}</p>
<p>Lieu: {event?.location?.name}</p>
<p className="event-date">Date: {new Date(event.date).toLocaleDateString()}</p>

Check failure on line 13 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Replace `Date:·{new·Date(event.date).toLocaleDateString()}` with `⏎············Date:·{new·Date(event.date).toLocaleDateString()}⏎··········`
<p className="event-location">Lieu: {event?.location?.name}</p>
{event?.talks?.map((talk, index) => (
<div key={`event-${index}`}>
<div className="talk-card" key={`event-${index}`}>
<h3>{talk?.title}</h3>
<p>
{console.log(talk)}
Personne présentant: {talk?.authors?.name}
{!talk?.authors &&
'ERREUR: veuillez ajouter le fichier `.yml` pour cette personne dans le répertoire `data/authors`.'}
<p className="talk-author">
Personne présentant: {talk?.authors?.name || (

Check failure on line 19 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Insert `{'·'}⏎···············`
<span className="error-message">

Check failure on line 20 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
ERREUR: veuillez ajouter le fichier `.yml` pour cette personne dans le répertoire `data/authors`.

Check failure on line 21 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎···················`
</span>
)}

Check failure on line 23 in src/components/pages/ArchivesPage/ArchivesPage.jsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
</p>
</div>
))}
<Link to={event.event_url}>Lien vers l'évènement</Link>
<Link className="event-link" to={event.event_url}>Lien vers l'évènement</Link>
</div>
))}
</Section>
Expand Down
39 changes: 38 additions & 1 deletion src/components/pages/ArchivesPage/ArchivesPage.scss
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
// TODO: fill this
.event-card {
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
margin: 16px 0;
padding: 16px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-date,
.event-location,
.talk-author {
margin: 8px 0;
font-size: 1rem;
}

.talk-card {
background: #f9f9f9;
border-left: 4px solid #007BFF;
padding: 8px 16px;
margin: 8px 0;
}

.error-message {
color: #dc3545;
}

.event-link {
display: inline-block;
margin-top: 8px;
color: #007BFF;
text-decoration: none;
transition: color 0.3s;

&:hover {
color: #0056b3;
}
}

0 comments on commit 512e63c

Please sign in to comment.