Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint archives page #24

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/components/pages/ArchivesPage/ArchivesPage.jsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
import React from "react";
import { Link } from "gatsby";
import Layout from "@/components/layout/PageLayout/PageLayout";
import Section from "@/components/shared/Section";
import "./ArchivesPage.scss";
import React from 'react';
import { Link } from 'gatsby';
import Layout from '@/components/layout/PageLayout/PageLayout';
import Section from '@/components/shared/Section';
import './ArchivesPage.scss';

const ArchivesPage = ({ events }) => (
<Layout title="Archives">
<Section>
{events.map((event) => (
<div className="event-card" key={event.id}>
<h2>{event.title}</h2>
<p className="event-date">Date: {new Date(event.date).toLocaleDateString()}</p>
<p className="event-date">
Date: {new Date(event.date).toLocaleDateString()}
</p>
<p className="event-location">Lieu: {event?.location?.name}</p>
{event?.talks?.map((talk, index) => (
<div className="talk-card" key={`event-${index}`}>
<h3>{talk?.title}</h3>
<p className="talk-author">
Personne présentant: {talk?.authors?.name || (
<span className="error-message">
ERREUR: veuillez ajouter le fichier `.yml` pour cette personne dans le répertoire `data/authors`.
Personne présentant:{' '}
{talk?.authors?.name || (
<span className="error-message">
ERREUR: veuillez ajouter le fichier `.yml` pour cette
personne dans le répertoire `data/authors`.
</span>
)}
)}
</p>
</div>
))}
<Link className="event-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
14 changes: 7 additions & 7 deletions src/components/pages/ArchivesPage/ArchivesPage.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.event-card {
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
margin: 16px 0;
padding: 16px;
border: 1px solid #ddd;
border-radius: 8px;
background: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

Expand All @@ -15,10 +15,10 @@
}

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

.error-message {
Expand All @@ -28,7 +28,7 @@
.event-link {
display: inline-block;
margin-top: 8px;
color: #007BFF;
color: #007bff;
text-decoration: none;
transition: color 0.3s;

Expand Down