Skip to content

Commit 3d2b428

Browse files
authored
Merge pull request #55 from MikeCheek/dev
Dev
2 parents c337026 + 3d3687b commit 3d2b428

37 files changed

+968
-671
lines changed

locales/en/program.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"SEOTitle": "Program",
3+
"SEODescription": "From August 09 to 11, 2024, immersed in a breathtaking location among the hills of Matera, with camping, workshops, conferences, and music festivals.",
4+
"Title": "PROGRAM",
5+
"Subtitle": "PERFORMANCES, TALKS, WORKSHOPS AND CAMPING"
6+
}

locales/it/program.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"SEOTitle": "Programma",
3+
"SEODescription": "Dal 09 all' 11 Agosto 2024 immersi in una location mozzafiato, in mezzo alle colline materane, tra camping, laboratori, conferenze, e festival musicali",
4+
"Title": "PROGRAMMA",
5+
"Subtitle": "PERFORMANCE, TALK, WORKSHOP E CAMPING"
6+
}

src/components/atoms/Button/index.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
}
2222
}
2323

24+
.buttonSimple {
25+
@extend .button;
26+
border: none;
27+
}
28+
2429
.bigButton {
2530
@extend .button;
2631
font-size: 20px;

src/components/atoms/Button/index.tsx

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,49 @@ const Index = ({
1212
internal = false,
1313
bigger = false,
1414
children,
15+
simple = false,
1516
}: ButtonProps) => {
1617
const className = `${bigger ? styles.bigButton : styles.button} ${hoverWhite ? styles.hoverWhite : ''}`;
18+
const classNameSimple = styles.buttonSimple;
1719
const style: React.CSSProperties = children ? { paddingRight: '40px' } : {};
20+
21+
const child = simple ? (
22+
<>
23+
{text}
24+
{children}
25+
</>
26+
) : (
27+
<>
28+
{text}
29+
<span className={styles.span}></span>
30+
<span className={styles.span}></span>
31+
<span className={styles.span}></span>
32+
<span className={styles.span}></span>
33+
{children}
34+
</>
35+
);
36+
1837
return (
1938
<>
2039
{onClick ? (
21-
<button onClick={onClick} title={title} className={className} style={style}>
22-
{text}
23-
<span className={styles.span}></span>
24-
<span className={styles.span}></span>
25-
<span className={styles.span}></span>
26-
<span className={styles.span}></span>
27-
{children}
40+
<button onClick={onClick} title={title} className={simple ? classNameSimple : className} style={style}>
41+
{child}
2842
</button>
2943
) : href ? (
3044
internal ? (
31-
<Link to={href} title={title} className={className} style={style}>
32-
{text}
33-
34-
<span className={styles.span}></span>
35-
<span className={styles.span}></span>
36-
<span className={styles.span}></span>
37-
<span className={styles.span}></span>
38-
{children}
45+
<Link to={href} title={title} className={simple ? classNameSimple : className} style={style}>
46+
{child}
3947
</Link>
4048
) : (
41-
<a href={href} title={title} className={className} style={style} rel="noopener noreferrer" target="_blank">
42-
{text}
43-
44-
<span className={styles.span}></span>
45-
<span className={styles.span}></span>
46-
<span className={styles.span}></span>
47-
<span className={styles.span}></span>
48-
{children}
49+
<a
50+
href={href}
51+
title={title}
52+
className={simple ? classNameSimple : className}
53+
style={style}
54+
rel="noopener noreferrer"
55+
target="_blank"
56+
>
57+
{child}
4958
</a>
5059
)
5160
) : (

src/components/atoms/Button/index.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ export interface ButtonProps {
77
internal?: boolean;
88
bigger?: boolean;
99
children?: React.ReactNode;
10+
simple?: boolean;
1011
}

src/components/atoms/GuestBadge/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import { Link } from 'gatsby';
77
const Index = ({ name, href, image, titles }: GuestBadgeProps) => {
88
return (
99
<Link className={styles.wrap} to={href} title={name}>
10-
<GatsbyImage alt={name} image={image} loading="lazy" className={styles.image} objectPosition={'center top'} />
10+
{image ? (
11+
<GatsbyImage alt={name} image={image} loading="lazy" className={styles.image} objectPosition={'center top'} />
12+
) : (
13+
<></>
14+
)}
1115
<span className={styles.nameWrap}>
1216
<span>{name}</span>
1317
{titles ? <span className={styles.subTitles}>{titles.join(', ')}</span> : <></>}

src/components/atoms/GuestCard/index.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
justify-content: center;
77
color: var(--nt-green);
88
border-radius: 10px;
9-
border: 4px solid var(--nt-orange);
9+
border: 2px solid var(--nt-orange);
1010
padding: 20px;
1111
width: 60vw;
1212
transition: width 300ms ease;

src/components/atoms/GuestCard/index.tsx

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ const GuestCard = ({ children, name, description, field, id, mentor }: GuestCard
1313
const daysPerforming = program
1414
.filter(
1515
(day) =>
16-
day.timeline
17-
//@ts-ignore
18-
.filter((e) => e.starring)
19-
//@ts-ignore
20-
.filter((event) => event.starring.find((star) => star.name === name)).length > 0
16+
day.timeline.filter((e) => e.starring).filter((event) => event.starring?.find((star) => star?.name === name))
17+
.length > 0
2118
)
2219
.map((d) => ({ name: d.day, day: d.numberDay }));
2320

@@ -39,26 +36,16 @@ const GuestCard = ({ children, name, description, field, id, mentor }: GuestCard
3936
) : null}
4037
{daysPerforming && daysPerforming.length > 0 ? (
4138
<div className={styles.badges}>
42-
<Badge
43-
name={'10'}
44-
on={daysPerforming.filter((d) => d.day === 10).length > 0}
45-
href={daysPerforming.find((d) => d.day === 10)?.name}
46-
/>
47-
<Badge
48-
name={'11'}
49-
on={daysPerforming.filter((d) => d.day === 11).length > 0}
50-
href={daysPerforming.find((d) => d.day === 11)?.name}
51-
/>
52-
<Badge
53-
name={'12'}
54-
on={daysPerforming.filter((d) => d.day === 12).length > 0}
55-
href={daysPerforming.find((d) => d.day === 12)?.name}
56-
/>
57-
<Badge
58-
name={'13'}
59-
on={daysPerforming.filter((d) => d.day === 13).length > 0}
60-
href={daysPerforming.find((d) => d.day === 13)?.name}
61-
/>
39+
{program
40+
.map((p) => p.numberDay)
41+
.map((day, key) => (
42+
<Badge
43+
key={key}
44+
name={day.toString()}
45+
on={daysPerforming.filter((d) => d.day === day).length > 0}
46+
href={daysPerforming.find((d) => d.day === day)?.name}
47+
/>
48+
))}
6249
</div>
6350
) : (
6451
<></>
@@ -75,6 +62,7 @@ const GuestCard = ({ children, name, description, field, id, mentor }: GuestCard
7562
text={`Leggi di${more ? ' meno' : ' più'}`}
7663
title={`Leggi di${more ? ' meno' : ' più'}`}
7764
onClick={() => setMore((state) => !state)}
65+
simple
7866
/>
7967
<div className={styles.fade}></div>
8068
</div>

src/components/atoms/Partners/index.tsx

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,49 @@ const Index = () => {
7979
width={150}
8080
/>
8181
</ShowOnView>
82+
<Heading text="Activity Partner" />
83+
<ShowOnView className={styles.wrap}>
84+
<a href="" title="MAS" rel="noopener noreferrer" target="_blank">
85+
<StaticImage
86+
layout="constrained"
87+
src="../../../images/partners/mas.png"
88+
className={styles.logo}
89+
style={{ borderRadius: '50%' }}
90+
alt="MAS"
91+
width={150}
92+
/>
93+
</a>
94+
<a href="" title="MAAP" rel="noopener noreferrer" target="_blank">
95+
<StaticImage
96+
layout="constrained"
97+
src="../../../images/partners/maap.png"
98+
className={styles.logo}
99+
style={{ borderRadius: '50%' }}
100+
alt="MAAP"
101+
width={150}
102+
/>
103+
</a>
104+
105+
<a href="" title="Atomico" rel="noopener noreferrer" target="_blank">
106+
<StaticImage
107+
layout="constrained"
108+
src="../../../images/partners/atomico.jpg"
109+
className={styles.logo}
110+
style={{ borderRadius: '50%' }}
111+
alt="Atomico"
112+
width={150}
113+
/>
114+
</a>
115+
<a
116+
href="https://skillsbuild.org/"
117+
style={{ width: '100%', marginTop: '20px' }}
118+
title="IBM"
119+
rel="noopener noreferrer"
120+
target="_blank"
121+
>
122+
<IBM className={styles.logoHorizontal} height={40} />
123+
</a>
124+
</ShowOnView>
82125
<Heading text="Mobility Partner" />
83126
<ShowOnView className={styles.wrap}>
84127
<a href="https://marinobus.it/" title="Marino Bus" rel="noopener noreferrer" target="_blank">
@@ -160,22 +203,6 @@ const Index = () => {
160203
/>
161204
</a>
162205
</ShowOnView>
163-
<Heading text="Activity Partner" />
164-
<ShowOnView className={styles.wrap}>
165-
<a href="https://skillsbuild.org/" title="IBM" rel="noopener noreferrer" target="_blank">
166-
<IBM className={styles.logoHorizontal} height={40} />
167-
</a>
168-
<a href="" title="Atomico" rel="noopener noreferrer" target="_blank">
169-
<StaticImage
170-
layout="constrained"
171-
src="../../../images/partners/atomico.jpg"
172-
className={styles.logo}
173-
style={{ borderRadius: '50%' }}
174-
alt="Atomico"
175-
width={150}
176-
/>
177-
</a>
178-
</ShowOnView>
179206
<Heading text="Music Partner" />
180207
<ShowOnView className={styles.wrap}>
181208
<a href="" title="Katzuma" rel="noopener noreferrer" target="_blank">
@@ -207,6 +234,19 @@ const Index = () => {
207234
/>
208235
</a>
209236
</ShowOnView>
237+
<Heading text="Si ringrazia" />
238+
<ShowOnView>
239+
<a href="" title="Comune di Grassano" rel="noopener noreferrer" target="_blank">
240+
<StaticImage
241+
layout="constrained"
242+
src="../../../images/partners/comune-grassano.png"
243+
className={styles.logoLong}
244+
alt="Comune di Grassano"
245+
width={200}
246+
/>
247+
<p style={{ color: 'black', fontWeight: 'bold' }}>Comune di Grassano</p>
248+
</a>
249+
</ShowOnView>
210250
</div>
211251
);
212252
};

src/components/atoms/Timeline/index.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
font-size: 28px;
1414
}
1515
}
16+
h3 {
17+
max-width: fit-content;
18+
}
1619
}
1720

1821
.desc {

src/components/atoms/Timeline/index.tsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ const Index = ({ data }: TimelineProps) => {
2020
guestImages.allFile!.edges.find((e) => e.node.name === name)?.node.childImageSharp.gatsbyImageData;
2121

2222
return (
23-
<ShowOnView className={styles.wrap}>
23+
<div className={styles.wrap}>
2424
<Heading text={data.day} smaller showOnView={false} />
25-
<h4>{data.name}</h4>
25+
{data.name && data.name.trim().length > 0 ? <h4>{data.name}</h4> : <></>}
2626
<p className={styles.desc}>{data.description}</p>
2727
<div className={styles.colWrap}>
2828
{bar}
2929
{data.timeline.map((item, key) => (
3030
<div
31-
key={textToId(item.title)}
32-
id={textToId(item.title)}
31+
key={(item.title ? textToId(item.title) : '') + key}
32+
id={item.title ? textToId(item.title) : undefined}
3333
className={styles.itemWrap}
3434
>
3535
<div className={key % 2 == 0 ? styles.item : styles.itemReversed} key={key}>
36-
<p className={styles.title} dangerouslySetInnerHTML={{ __html: item.title }}></p>
36+
<p className={styles.title} dangerouslySetInnerHTML={{ __html: item.title ?? '' }}></p>
3737
{circle}
3838
<span className={styles.info}>
3939
<p className={styles.time}>{item.time}</p>
4040
{/* {item.type ? <p>{item.type}</p> : <></>} */}
41-
{item.location ? (
41+
{/* {item.location ? (
4242
<p
4343
className={styles.location}
4444
style={key % 2 == 0 ? { marginRight: 'auto' } : { marginLeft: 'auto' }}
@@ -47,7 +47,7 @@ const Index = ({ data }: TimelineProps) => {
4747
</p>
4848
) : (
4949
<></>
50-
)}
50+
)} */}
5151
{item.starring ? (
5252
<div
5353
className={styles.badges}
@@ -57,17 +57,18 @@ const Index = ({ data }: TimelineProps) => {
5757
: { marginLeft: 'auto', alignItems: 'flex-end', textAlign: 'right' }
5858
}
5959
>
60-
{item.starring.map((star, key) => {
61-
return (
60+
{item.starring.map((star, key2) => {
61+
return star ? (
6262
<GuestBadge
6363
name={star.name}
64-
//@ts-ignore
6564
href={star.href}
66-
key={key}
67-
image={findImage(star.image)}
65+
key={star.name + key + key2}
66+
image={findImage(String(star.image))}
6867
//@ts-ignore
6968
titles={star.field || star.role?.split('<br/>')}
7069
/>
70+
) : (
71+
<></>
7172
);
7273
})}
7374
</div>
@@ -79,7 +80,7 @@ const Index = ({ data }: TimelineProps) => {
7980
</div>
8081
))}
8182
</div>
82-
</ShowOnView>
83+
</div>
8384
);
8485
};
8586

src/components/molecules/Program/index.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
justify-content: center;
1212
color: var(--nt-green);
1313
text-align: center;
14+
// margin-top: 80px;
1415

1516
h3,
1617
h4 {

src/components/molecules/Program/index.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,17 @@ import program from '../../../utilities/program';
55
import Timeline from '../../atoms/Timeline';
66
import Heading from '../../atoms/Heading';
77
import { Link } from 'gatsby';
8-
import ShowOnView from '../../atoms/ShowOnView';
98

109
const Index = () => {
1110
return (
1211
<div className={styles.wrap}>
13-
<Heading text="CRONOPROGRAMMA" />
12+
<Heading text="CRONOPROGRAMMA" showOnView={false} />
1413
{/* <Banner text="IL PROGRAMMA NON È STATO RILASCIATO" /> */}
15-
<ShowOnView>
16-
<p>
17-
L'evento avrà luogo a Grottole (MT) presso <Link to="/#quando-e-dove">Bosco Coste</Link>.
18-
<br />
19-
<br />
20-
Tuttavia, le attività di Giovedì 10 Agosto si svolgeranno a Grassano (MT).
21-
</p>
22-
</ShowOnView>
14+
<p>
15+
L'evento avrà luogo a Grottole (MT) presso <Link to="/#quando-e-dove">Bosco Coste</Link>.
16+
</p>
2317
<div className={styles.program}>
2418
{program.map((item, key) => (
25-
//@ts-ignore
2619
<Timeline key={key} data={item} />
2720
))}
2821
</div>

0 commit comments

Comments
 (0)