Skip to content

Commit

Permalink
Fix links and add new images
Browse files Browse the repository at this point in the history
  • Loading branch information
naiirad committed Dec 1, 2023
1 parent 42ca11b commit f9891be
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 31 deletions.
9 changes: 5 additions & 4 deletions packages/nextjs/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import Link from "next/link";
import { hardhat } from "viem/chains";
import { SwitchTheme } from "~~/components/SwitchTheme";
import { getTargetNetwork } from "~~/utils/scaffold-eth";
Expand All @@ -21,7 +22,7 @@ export const Footer = () => {
<ul className="menu menu-horizontal w-full">
<div className="flex justify-center items-center gap-2 text-sm w-full">
<div className="text-center">
<a href="https://github.com/scaffold-eth/se-2" target="_blank" rel="noreferrer" className="link">
<a href="https://t.me/MantaCare" target="_blank" rel="noreferrer" className="link">
Telegram
</a>
</div>
Expand All @@ -33,9 +34,9 @@ export const Footer = () => {
</div>
<span>·</span>
<div className="text-center">
<a href="https://t.me/joinchat/KByvmRe5wkR-8F_zz6AjpA" target="_blank" rel="noreferrer" className="link">
Impressum
</a>
<Link href="/Impressum">
<a className="link">Impressum</a>
</Link>
</div>
</div>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const menuLinks: HeaderMenuLink[] = [
},
{
label: "Das Projekt",
href: "/MantaCare",
href: "/mantacare",
},
];

Expand Down
58 changes: 32 additions & 26 deletions packages/nextjs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const Home: NextPage = () => {
{ id: 0, name: "Medical Response Crew", imageUrl: "/mrc.jpg" },
{ id: 1, name: "Crisis Relief Team", imageUrl: "/crt.png" },
{ id: 2, name: "Humanitas in Centro", imageUrl: "/hic.jpg" },
{ id: 3, name: "MantaCare", imageUrl: "/mantacare_logo_bg.png" },
{ id: 4, name: "Projektvorschlag", imageUrl: "/next.png", isSpecial: true },
// Weitere Projekte hinzufügen mit ihren Bildpfaden
];

Expand All @@ -27,13 +29,7 @@ const Home: NextPage = () => {
return (
<div className="relative max-w-screen-2xl mx-auto">
<div className="background-container">
<Image
src="/MantaCare_Hintergrund.png"
alt="Hintergrund"
width={572} // Ersetzen Sie dies durch die tatsächliche Breite Ihres Bildes
height={572} // Ersetzen Sie dies durch die tatsächliche Höhe Ihres Bildes
layout="responsive"
/>
<Image src="/MantaCare_Hintergrund.png" alt="Hintergrund" width={572} height={572} layout="responsive" />
</div>

<div className="text-over-image absolute top-1/3 -left-96 right-32 transform -translate-y-1/2">
Expand All @@ -44,30 +40,40 @@ const Home: NextPage = () => {
</div>

<main className="container mx-auto -my-32 p-16 relative mb-8">
<section className="grid grid-cols-1 md:grid-cols-3 gap-8">
<section className="grid grid-cols-1 md:grid-cols-4 gap-8">
{projects.map(project => (
<div key={project.id} className="bg-secondary p-4 rounded-xl shadow-md w-3/4 mx-auto">
<img
<div
key={project.id}
className={`bg-secondary p-4 rounded-xl shadow-md w-full mx-auto ${
project.isSpecial ? "bg-special cursor-pointer" : ""
}`}
style={{ opacity: project.isSpecial ? 0.5 : 1 }}
onClick={() => (project.isSpecial ? (window.location.href = "/projektvorschlag") : null)}
>
<Image
src={project.imageUrl}
alt={`Project ${project.name}`}
className="rounded-md w-full h-auto" // Tailwind CSS Klassen für Breite und Höhe
// style={{ width: '100%', height: 'auto' }} // Alternativ Inline-Style
width={250}
height={150}
layout="responsive"
/>
<h2 className="text-xl font-semibold dark:text-white text-black mt-4">{project.name}</h2>
<div className="mt-4">
<button
className="bg-accent dark:text-white text-black p-2 rounded hover:bg-primary"
onClick={() => openDonateModal(project.id)}
>
Donate
</button>
<Link
href={getProjectPath(project.name)}
className="bg-primary dark:text-white text-black p-2 rounded ml-2 hover:bg-accent"
>
Details
</Link>
</div>
{!project.isSpecial && (
<div className="mt-4">
<button
className="bg-accent dark:text-white text-black p-2 rounded hover:bg-primary"
onClick={() => openDonateModal(project.id)}
>
Donate
</button>
<Link
href={getProjectPath(project.name)}
className="bg-primary dark:text-white text-black p-2 rounded ml-2 hover:bg-accent"
>
Details
</Link>
</div>
)}
</div>
))}
</section>
Expand Down
Binary file added packages/nextjs/public/mantacare_logo_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/nextjs/public/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f9891be

Please sign in to comment.