forked from boisgera/itn-web
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
140 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
export interface Article { | ||
number: number; | ||
title: string; | ||
href: string; | ||
} | ||
interface Props { | ||
title: string; | ||
description?: string; | ||
articles: Article[]; | ||
current?: number; | ||
} | ||
const { title, description, articles, current } = Astro.props; | ||
--- | ||
|
||
<div class="my-8 p-4 bg-gray-100 rounded-lg"> | ||
<h3 class="text-xl font-bold mb-4 uppercase">{title}</h3> | ||
<p class="text-sm text-gray-500">{description}</p> | ||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | ||
{articles.map((article) => ( | ||
<div class={`p-3 bg-white rounded shadow-sm border-l-4 ${ | ||
article.number === current ? 'border-blue-500' : 'border-gray-300 hover:border-blue-500 transition-colors' | ||
}`}> | ||
{article.number === current ? ( | ||
<> | ||
<span class="text-blue-500 font-bold">{article.number}.</span> | ||
{article.title} | ||
</> | ||
) : ( | ||
<a href={article.href} class="block"> | ||
<span class="text-gray-500 font-bold">{article.number}.</span> | ||
{article.title} | ||
</a> | ||
)} | ||
</div> | ||
))} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
import ArticleSeries, { type Article } from "components/ArticleSeries.astro"; | ||
const articles: Article[] = [ | ||
{ | ||
number: 1, | ||
title: "Introduction", | ||
href: "/actualites/semsante-1-introduction", | ||
}, | ||
{ | ||
number: 2, | ||
title: "Le jumeau numérique pour la santé", | ||
href: "/actualites/semsante-2-jumeau-numerique", | ||
}, | ||
{ | ||
number: 3, | ||
title: "Transformation numérique et enjeux hospitaliers", | ||
href: "/actualites/semsante-3-jumeau-numerique", | ||
}, | ||
{ | ||
number: 4, | ||
title: "Le numérique et l’IA pour la santé à toutes les échelles", | ||
href: "/actualites/semsante-4-numerique-et-ia", | ||
}, | ||
]; | ||
type Props = { | ||
current: number; | ||
}; | ||
const { current } = Astro.props; | ||
--- | ||
|
||
<ArticleSeries | ||
title="Série Séminaire Santé Numérique" | ||
description="Cette série de quatre articles constitue un compte-rendu du séminaire Santé Numérique organisé par l'ITN." | ||
current={current} | ||
articles={articles} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters