-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from MfN-Berlin/testing-drupal-integration
v0.1.5
- Loading branch information
Showing
27 changed files
with
58,254 additions
and
1,475 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
import React from 'react'; | ||
import { Link } from 'gatsby'; | ||
import ContentImage from '../elements/ContentImage'; | ||
import CardText from '../elements/CardText'; | ||
import { Link } from 'gatsby'; | ||
|
||
const SlideContent = ({ imageName, imageMap, title, kicker, text, link, altText, paginationDots }) => { | ||
if (!imageMap || !imageName) return null; | ||
|
||
const content = ( | ||
<div className="flex flex-col h-full"> | ||
<div className="relative w-full"> | ||
<ContentImage | ||
imageName={imageName} | ||
alt={altText || title} | ||
imageMap={imageMap} | ||
className="relative top-0 left-0 w-full h-full object-cover" | ||
/> | ||
{paginationDots && ( | ||
<div className="absolute left-0 right-0 bottom-4 flex justify-center"> | ||
<div className="flex gap-2 rounded-[20px] p-1.5 bg-black/50"> | ||
{paginationDots} | ||
</div> | ||
</div> | ||
)} | ||
const SlideContent = ({ imageName, altText, kicker, title, text, link, imageMap }) => { | ||
const slideContent = ( | ||
<div className="w-full h-full flex flex-col"> | ||
<div className="relative w-full" style={{ paddingTop: '56.25%' }}> | ||
<div className="absolute inset-0"> | ||
<ContentImage | ||
imageName={imageName} | ||
alt={altText} | ||
imageMap={imageMap} | ||
className="w-full h-full object-cover" | ||
/> | ||
</div> | ||
</div> | ||
<div className="bg-white p-8 text-center"> | ||
<div className="bg-Green-100 p-8 group-hover:bg-Green-200 transition-colors duration-300"> | ||
<CardText | ||
kicker={kicker} | ||
headline={title} | ||
body={text} | ||
headlineStyle="h3" | ||
spacing="wide" | ||
alignment="center" | ||
alignment="left" | ||
/> | ||
</div> | ||
</div> | ||
); | ||
|
||
return link ? ( | ||
<Link to={link} className="block h-full"> | ||
{content} | ||
</Link> | ||
) : content; | ||
if (link) { | ||
return ( | ||
<Link | ||
to={link} | ||
className="group w-full p-3 rounded-[10px] inline-flex flex-col items-start gap-2.5 hover:bg-Green-200 focus:border-2 focus:border-[#729800]" | ||
> | ||
{slideContent} | ||
</Link> | ||
); | ||
} | ||
|
||
return slideContent; | ||
}; | ||
|
||
export default SlideContent; |
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
Oops, something went wrong.