-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add playbook page * feat: translate playbook page to ua * fix: link in new tabs * fix: missing import * fix: update layout * fix: text * feat: add lightbox * fix: playbook lightbox * fix: headline * fix: base url in pdf path * fix: image bug * feat: add playbook news slider card * fix: mobile view
- Loading branch information
Showing
38 changed files
with
503 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
import CommonUtils from "@util/CommonUtils"; | ||
const { image, alt, path } = Astro.props; | ||
const baseUrl = CommonUtils.getBaseUrl(false); | ||
--- | ||
|
||
<div class=""> | ||
<a href={baseUrl + path + "#lightbox"} id={"nolightbox"} class="scroll-mt-20"> | ||
<img | ||
src={image} | ||
class="focus-visible:outline-none rounded-lg object-cover object-center" | ||
{alt} | ||
/> | ||
</a> | ||
<a | ||
href={baseUrl + path + "#nolightbox"} | ||
class="hidden fixed z-50 inset-0 p-4 sm:p-24 bg-black/50 target:block items-center" | ||
id={"lightbox"} | ||
> | ||
<img | ||
src={image} | ||
class="w-full h-full object-center object-contain" | ||
{alt} | ||
/> | ||
</a> | ||
</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,4 @@ | ||
--- | ||
const { href, caption } = Astro.props; | ||
--- | ||
<a href={href} target="_blank">{caption}</a> |
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,69 +1,145 @@ | ||
import React from "react"; | ||
import ArrowIcon from "@assets/arrow.svg?react"; | ||
import InstagramIcon from "@assets/instagram.svg?react"; | ||
import { ConditionalWrapper } from "@components"; | ||
|
||
type ItemType = "cta" | "instagram" | "fullImage"; | ||
|
||
interface Props { | ||
href: string; | ||
image?: string; | ||
isInstagram?: boolean; | ||
green?: boolean; | ||
title?: string; | ||
description?: string; | ||
type?: ItemType; | ||
newTab?: boolean; | ||
} | ||
|
||
const NewsItem: React.FC<Props> = ({ | ||
href, | ||
image, | ||
isInstagram, | ||
green, | ||
title, | ||
description, | ||
}) => ( | ||
<article className="block mr-3 -ml-5 pl-5 sm:-ml-8 sm:pl-8 sm:mr-6 lg:mr-8"> | ||
<div | ||
className={`group relative flex flex-col h-full hover:-translate-y-4 duration-200 transition ${ | ||
green | ||
? "bg-tolo-green hover:bg-tolo-dark-green text-white bg-[position:bottom_-16px_left_-16px] bg-[url('/bulb-cog.svg')] hover:bg-[url('/bulb-cog-dark.svg')] bg-no-repeat" | ||
: "bg-white text-black" | ||
}`} | ||
> | ||
{href && ( | ||
<a | ||
href={href} | ||
{...(isInstagram | ||
? { target: "_blank", rel: "noopener nofollow noreferer" } | ||
: {})} | ||
className="" | ||
> | ||
{green ? ( | ||
<> | ||
<h1 className="font-aktiv font-semibold px-5 pt-6 text-[2.5rem]/[1.1]">{title}</h1> | ||
<ArrowIcon className="absolute bottom-4 right-4 z-10 text-white h-6 w-6" /> | ||
</> | ||
) : ( | ||
<div className={`pb-[100%] h-0 w-full relative overflow-hidden`}> | ||
{isInstagram && ( | ||
<InstagramIcon className="absolute top-4 left-4 z-10 text-white h-6 w-6" /> | ||
)} | ||
{image && ( | ||
<img | ||
src={image} | ||
loading="lazy" | ||
className="absolute inset-0 w-full h-full object-cover group-hover:scale-110 transition-transform" | ||
/> | ||
)} | ||
<ArrowIcon className="absolute bottom-4 right-4 z-10 text-white h-6 w-6" /> | ||
</div> | ||
type = "instagram", | ||
newTab, | ||
}) => { | ||
const containerClasses: Record<ItemType | "common", string> = { | ||
common: | ||
"group relative flex flex-col h-full hover:-translate-y-4 duration-200 transition", | ||
cta: "bg-tolo-green hover:bg-tolo-dark-green text-white bg-[position:bottom_-16px_left_-16px] bg-[url('/bulb-cog.svg')] hover:bg-[url('/bulb-cog-dark.svg')] bg-no-repeat", | ||
instagram: "bg-white text-black", | ||
fullImage: "", | ||
}; | ||
|
||
const contentComponent: Record<ItemType, React.ReactElement> = { | ||
cta: <NewsItemContentCta title={title} description={description} />, | ||
instagram: ( | ||
<NewsItemContentSocial image={image} description={description} /> | ||
), | ||
fullImage: <NewsItemFullImage fullImage={image} alt={description} />, | ||
}; | ||
|
||
return ( | ||
<article className="block mr-3 -ml-5 pl-5 sm:-ml-8 sm:pl-8 sm:mr-6 lg:mr-8"> | ||
<div className={containerClasses.common + " " + containerClasses[type]}> | ||
<ConditionalWrapper | ||
condition={Boolean(href)} | ||
wrapper={(children) => ( | ||
<a | ||
href={href} | ||
{...(newTab | ||
? { target: "_blank", rel: "noopener nofollow noreferer" } | ||
: {})} | ||
className="" | ||
> | ||
{children} | ||
</a> | ||
)} | ||
<div className={`px-5 py-6 grow`}> | ||
<p className={`text-lg/6 ${green ? "" : "line-clamp-3"}`}> | ||
{description} | ||
</p> | ||
</div> | ||
</a> | ||
)} | ||
</div> | ||
</article> | ||
); | ||
> | ||
<>{contentComponent[type]}</> | ||
</ConditionalWrapper> | ||
</div> | ||
</article> | ||
); | ||
}; | ||
|
||
export default NewsItem; | ||
|
||
interface NewsItemContentSocialProps { | ||
showIcon?: boolean; | ||
image?: string; | ||
description?: string; | ||
} | ||
const NewsItemContentSocial: React.FC<NewsItemContentSocialProps> = ({ | ||
image, | ||
showIcon = true, | ||
description, | ||
}) => { | ||
return ( | ||
<> | ||
<div className={`pb-[100%] h-0 w-full relative overflow-hidden`}> | ||
{showIcon && ( | ||
<InstagramIcon className="absolute top-4 left-4 z-10 text-white h-6 w-6" /> | ||
)} | ||
{image && ( | ||
<img | ||
src={image} | ||
loading="lazy" | ||
className="absolute inset-0 w-full h-full object-cover group-hover:scale-110 transition-transform" | ||
/> | ||
)} | ||
<ArrowIcon className="absolute bottom-4 right-4 z-10 text-white h-6 w-6" /> | ||
</div> | ||
<div className={`px-5 py-6 grow`}> | ||
{description && ( | ||
<p className={`text-lg/6 line-clamp-3`}>{description}</p> | ||
)} | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
interface NewsItemContentCtaProps { | ||
title?: string; | ||
description?: string; | ||
} | ||
const NewsItemContentCta: React.FC<NewsItemContentCtaProps> = ({ | ||
title, | ||
description, | ||
}) => { | ||
return ( | ||
<> | ||
{title && ( | ||
<h1 className="font-aktiv font-semibold px-5 pt-6 text-[2.5rem]/[1.1]"> | ||
{title} | ||
</h1> | ||
)} | ||
<ArrowIcon className="absolute bottom-4 right-4 z-10 text-white h-6 w-6" /> | ||
<div className={`px-5 py-6 grow`}> | ||
{description && <p className={`text-lg/6`}>{description}</p>} | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
interface NewsItemContentCtaProps { | ||
fullImage?: string; | ||
alt?: string; | ||
} | ||
const NewsItemFullImage: React.FC<NewsItemContentCtaProps> = ({ | ||
fullImage, | ||
alt, | ||
}) => { | ||
return ( | ||
<> | ||
{fullImage && ( | ||
<img | ||
src={fullImage} | ||
{...(alt ? { alt } : {})} | ||
loading="lazy" | ||
className="absolute inset-0 w-full h-full object-cover group-hover:scale-110 transition-transform" | ||
/> | ||
)} | ||
<ArrowIcon className="absolute bottom-4 right-4 z-10 text-white h-6 w-6" /> | ||
</> | ||
); | ||
}; |
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,4 +1,5 @@ | ||
title: "Makers Innovation Award" | ||
description: "Where Networking Meets Funding, Mentoring Sparks Ideas, and Innovation Comes to Life!" | ||
target: makersinnovationaward | ||
green: true | ||
type: cta | ||
order: 1 |
Oops, something went wrong.