Skip to content

Commit 556d4e2

Browse files
committed
Add LinkButton component and update training resources
Introduces a new LinkButton component for external links. Updates Socio4Health training PDF and related links in the trainings page, and removes the Additional Resources section from Socio4HealthNonCoder. Also adds the funciones-social4health.pdf training document.
1 parent 5ba4a2b commit 556d4e2

4 files changed

Lines changed: 35 additions & 22 deletions

File tree

app/installation/components/Socio4HealthNonCoder.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,6 @@ source venv/bin/activate`}</code></pre>
6262
</div>
6363
</details>
6464

65-
<details className="group mt-4 mb-4 border rounded">
66-
<summary className="flex items-center justify-between cursor-pointer px-4 py-3 bg-gray-50 hover:bg-gray-100">
67-
<h2 className="text-lg font-semibold">Additional Resources</h2>
68-
<span className="text-gray-600"></span>
69-
</summary>
70-
<div className="p-4">
71-
<ul className="list-disc pl-5 space-y-1 text-gray-800">
72-
<li>Official documentation: check the socio library&apos;s official docs for API reference</li>
73-
<li>GitHub repository: browse the project&apos;s code and issues</li>
74-
<li>Community support: join relevant forums or Discord channels for help</li>
75-
</ul>
76-
</div>
77-
</details>
78-
7965
<p className="text-gray-700">You&apos;re now ready to try Socio4Health — contact the project maintainers if you need help deploying.</p>
8066
</article>
8167
);

app/trainings/page.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Image from 'next/image';
55
import { useState } from 'react';
66
import CircularButton from '../ui/components/circular-button';
77
import DownloadButton from '../ui/components/download-button';
8+
import LinkButton from '../ui/components/link-button';
89

910
const D4H_LOGO = '/cards/toolkits/data4health.svg';
1011
const C4H_LOGO = '/cards/toolkits/clim4health.svg';
@@ -30,8 +31,7 @@ function SubButtons({ section }: { section: Section }) {
3031
data4health: {
3132
pdf: '/training/data4health-training.pdf',
3233
related: [
33-
//{ label: 'Quickstart (download)', href: '/cards/toolkits/data4health-quickstart.zip', isFile: true },
34-
//{ label: 'Online docs', href: 'https://example.org/data4health' },
34+
{ label: 'Data drive', href: 'https://bit.ly/3WZp0dG', useButton: true, isFile: false },
3535
],
3636
},
3737
clim4health: {
@@ -48,10 +48,9 @@ function SubButtons({ section }: { section: Section }) {
4848
],
4949
},
5050
socio4health: {
51-
pdf: '/cards/toolkits/socio4health-installation.pdf',
51+
pdf: '/training/funciones-social4health.pdf',
5252
related: [
53-
{ label: 'Socio4Health notes (download)', href: '/cards/toolkits/socio4health-notes.pdf', isFile: true },
54-
{ label: 'Website', href: 'https://example.org/socio4health' },
53+
{ label: 'Data drive', href: 'https://bit.ly/3WZp0dG', useButton: true, isFile: false },
5554
],
5655
},
5756
cube4health: {
@@ -89,8 +88,12 @@ function SubButtons({ section }: { section: Section }) {
8988
<div className="mt-3 space-y-3">
9089
{entry.related.map((r, i) => (
9190
<div key={i} className="my-0">
92-
{r.useButton && r.isFile ? (
93-
<DownloadButton href={r.href} label={r.label} />
91+
{r.useButton ? (
92+
r.isFile ? (
93+
<DownloadButton href={r.href} label={r.label} />
94+
) : (
95+
<LinkButton href={r.href} label={r.label} />
96+
)
9497
) : (
9598
<a
9699
href={r.href}
@@ -119,7 +122,7 @@ export default function Page() {
119122
data4health: false,
120123
clim4health: false,
121124
land4health: false,
122-
socio4health: true,
125+
socio4health: false,
123126
cube4health: true,
124127
};
125128

app/ui/components/link-button.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react';
2+
3+
interface LinkButtonProps {
4+
href: string;
5+
label?: string;
6+
className?: string;
7+
}
8+
9+
export default function LinkButton({ href, label = 'Open', className = '' }: LinkButtonProps) {
10+
return (
11+
<a
12+
href={href}
13+
className={`inline-flex items-center gap-2 rounded-md bg-white border border-purple-600 hover:bg-purple-50 focus:ring-2 focus:ring-purple-300 text-purple-700 px-4 py-2 text-sm font-medium shadow-sm transition-colors ${className}`}
14+
aria-label={label}
15+
target="_blank"
16+
rel="noopener noreferrer"
17+
>
18+
<svg xmlns="http://www.w3.org/2000/svg" className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
19+
<path strokeLinecap="round" strokeLinejoin="round" d="M14 3h7v7m0 0L10 14m4-11L5 19" />
20+
</svg>
21+
<span>{label}</span>
22+
</a>
23+
);
24+
}
3.14 MB
Binary file not shown.

0 commit comments

Comments
 (0)