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

feat: add introduction section #30

Merged
merged 3 commits into from
Jun 8, 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
4 changes: 4 additions & 0 deletions public/assets/svg/general/location.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/svg/general/sensor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/svg/general/statistics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/svg/general/tree.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/css/components/splide.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
/* Override default styles from splide slider package */
.splide.splide--grid > .splide__track {
@apply lg:pb-7 !important;
}

.splide.splide--grid > .splide__track > .splide__list {
@apply xl:grid xl:grid-cols-2 xl:gap-x-6 xl:gap-y-8 !important;
}

.splide__pagination {
@apply bottom-0 lg:-bottom-4 !important;
}
Expand Down
2 changes: 2 additions & 0 deletions src/tsx/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Faq from "./components/sections/Faq";
import Introduction from "./components/sections/Introduction";
import Stakeholder from "./components/sections/Stakeholder";

function App() {
return (
<div>
<Introduction />
<Stakeholder />
<Faq />
</div>
Expand Down
23 changes: 23 additions & 0 deletions src/tsx/components/IntroductionCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';

interface IntroductionCardProps {
label: string;
icon: string;
description: string;
}

const IntroductionCard: React.FC<IntroductionCardProps> = ({ label, icon, description }) => {
return (
<div className="h-full cursor-pointer bg-white shadow-md rounded-2xl p-6 border border-grey-100 xl:cursor-default">
<figure className="bg-green-light-900/25 w-12 h-12 rounded-full flex items-center justify-center">
<img
src={icon}
className="object-contain w-6 h-6 " alt={label}/>
</figure>
<h3 className="my-4 font-lato font-semibold text-lg md:my-5">{label}</h3>
<p>{description}</p>
</div>
);
};

export default IntroductionCard;
71 changes: 71 additions & 0 deletions src/tsx/components/sections/Introduction.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { Splide, SplideSlide } from '@splidejs/react-splide';
import { i18nTranslated } from '../../helper/sliderTranslations';
import '@splidejs/react-splide/css';
import IntroductionCard from "../IntroductionCard";

function Introduction() {
const facts = [
{
label: "Auswertung der Messdaten",
icon: "/assets/svg/general/statistics.svg",
description: "Durch die wissenschaftliche Datenauswertung wird eine fundierte Datengrundlage geliefert."
},
{
label: "Monitoring mehrerer Standorte",
icon: "/assets/svg/general/location.svg",
description: "Bei der Interpretation der Daten werden die unterschiedlichen Standortbedingungen mit berücksichtigt."
},
{
label: "Augenmerk auf Jungbäume und Beete",
icon: "/assets/svg/general/tree.svg",
description: "Beobachtet werden sollen besonders hitzeanfällige Vegetation wie Jungbäume und Blumenbeete."
},
{
label: "Entwicklung einer Sensorlösung",
icon: "/assets/svg/general/sensor.svg",
description: "Die Daten zur Bodenfeuchte werden mithilfe von Sensoren nahe des Wurzelballens geliefert."
},
];

const breakpoints = {
640: {
perPage: 2,
},
1280: {
destroy: true,
},
}

return (
<section className="max-w-208 mx-auto my-28 lg:my-36 xl:max-w-screen-lg xl:grid xl:grid-cols-[1fr,1.5fr] xl:gap-x-10 xl:items-center xl:my-44 2xl:grid-cols-2 2xl:max-w-screen-xl">
<article className="px-4 mb-8 md:px-6 lg:mb-14">
<h2 className="font-lato font-bold text-2xl mb-6 lg:text-3xl">
Was beinhaltet smartes Grünflächenmanagement alles?
</h2>
<p>
Smartes Grünflächenmanagement umfasst die effiziente Überwachung und Bewässerung von
Vegetationsformen auf Grünflächen durch den Einsatz moderner Technologien wie Sensoren und Datenanalyse.
Dadurch wird eine präzise Steuerung der Pflegemaßnahmen ermöglicht, die angepasst sind an die spezifischen
Standortbedingungen und Art und Alter der Vegetation.
</p>
</article>

<Splide
options={{ rewind: true, arrows: false, i18n: i18nTranslated, mediaQuery: 'min', breakpoints: breakpoints }}
aria-label="Fakten zum Grünflächenmanagement"
className="splide--grid md:px-2"
>
{facts.map((fact, index) => (
<SplideSlide key={index} className="pb-10 px-4 lg:px-2 lg:pb-2 xl:first:mb-16 xl:[&:nth-child(2)]:mt-16 xl:[&:nth-child(3)]:-mt-16 xl:[&:nth-child(3)]:mb-16">
<IntroductionCard
label={fact.label}
icon={fact.icon}
description={fact.description} />
</SplideSlide>
))}
</Splide>
</section>
);
}

export default Introduction;
13 changes: 8 additions & 5 deletions src/tsx/components/sections/Stakeholder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,22 @@ function Stakeholder() {

return (
<section className="max-w-208 mx-auto my-28 lg:my-36 xl:my-44">
<div className="px-4 mb-8 md:px-6 lg:mb-14">
<article className="px-4 mb-8 md:px-6 lg:mb-14">
<h2 className="font-lato font-bold text-2xl mb-6 lg:text-3xl">
Wer sind die Beteiligten?
</h2>
<article>
<p>
Id commodo eiusmod est culpa voluptate duis ipsum sint reprehenderit cupidatat elit qui enim.
Culpa exercitation sunt nisi magna tempor est ut duis consectetur consectetur pariatur irure ea aliqua.
Incididunt voluptate ad adipisicing excepteur laborum voluptate ut deserunt deserunt cillum mollit.
Ea sit nulla occaecat proident cupidatat laborum. Ipsum esse elit cillum tempor in consequat duis ullamco.
</article>
</div>
</p>
</article>

<Splide options={{ rewind: true, arrows: false, i18n: i18nTranslated, }} aria-label="React Splide Example">
<Splide
options={{ rewind: true, arrows: false, i18n: i18nTranslated, }}
aria-label="Beteiligten am Projekt"
>
{stakeholder.map((company, index) => (
<SplideSlide key={index} className="pb-10 px-4 md:px-6">
<StakeholderCard label={company.label} url={company.url} image={company.image}>
Expand Down
2 changes: 2 additions & 0 deletions src/types/splidejs__react-splide.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ declare module '@splidejs/react-splide' {
focus?: number | 'center';
cloneStatus?: boolean;
clones?: number;
mediaQuery?: string;
destroy?: boolean;
breakpoints?: {
[key: string]: SplideOptions;
};
Expand Down