|
1
|
|
|
import { graphql, Link } from "gatsby" |
|
2
|
|
|
import { GatsbyImage, StaticImage } from "gatsby-plugin-image" |
|
3
|
|
|
import React from "react" |
|
4
|
|
|
import { CardHorizontal } from "../components/Card" |
|
5
|
|
|
import { MatchesOverview } from "../components/MatchesOverview" |
|
6
|
|
|
import { Seo } from "../components/Seo" |
|
7
|
|
|
import Layout from "../layouts" |
|
8
|
|
|
import { JeugdPageProps } from "../Types/PageProps" |
|
9
|
|
|
import "./jeugd.scss" |
|
10
|
|
|
|
|
11
|
|
|
const JeugdPage = ({ data: { leerplan, allNodeTeam } }: JeugdPageProps) => { |
|
12
|
|
|
return ( |
|
13
|
|
|
<Layout> |
|
14
|
|
|
<header className="page_header__wrapper"> |
|
15
|
|
|
<div className="page_header"> |
|
16
|
|
|
<h1>Jeugdwerking KCVV Elewijt</h1> |
|
17
|
|
|
</div> |
|
18
|
|
|
</header> |
|
19
|
|
|
<div className="page__wrapper page__wrapper--limited page__section page__youth"> |
|
20
|
|
|
<h2 className="featured-border">Jeugdploegen</h2> |
|
21
|
|
|
<section className="youth__teams_list"> |
|
22
|
|
|
{allNodeTeam.edges.map(({ node }) => { |
|
23
|
|
|
const heroImage = node?.relationships?.field_media_article_image |
|
24
|
|
|
const teamPicture = heroImage?.relationships?.field_media_image?.localFile?.childImageSharp |
|
25
|
|
|
?.gatsbyImageData && ( |
|
26
|
|
|
<GatsbyImage |
|
27
|
|
|
image={heroImage.relationships?.field_media_image?.localFile?.childImageSharp?.gatsbyImageData} |
|
28
|
|
|
alt={heroImage?.field_media_image?.alt || ``} |
|
29
|
|
|
className={`team-detail__team-picture`} |
|
30
|
|
|
objectFit="cover" |
|
31
|
|
|
/> |
|
32
|
|
|
) |
|
33
|
|
|
return ( |
|
34
|
|
|
<div className="youth__teams_list__item"> |
|
35
|
|
|
<h3 className="after-border">{node.title}</h3> |
|
36
|
|
|
<Link to={node?.path?.alias || ``}> |
|
37
|
|
|
{teamPicture || ( |
|
38
|
|
|
<StaticImage |
|
39
|
|
|
layout="fullWidth" |
|
40
|
|
|
src={`../images/empty-lineup.jpg`} |
|
41
|
|
|
alt={`${node.title}`} |
|
42
|
|
|
placeholder={`blurred`} |
|
43
|
|
|
objectFit="cover" |
|
44
|
|
|
aspectRatio={1.777777777} |
|
45
|
|
|
transformOptions={{ cropFocus: `attention` }} |
|
46
|
|
|
/> |
|
47
|
|
|
)} |
|
48
|
|
|
</Link> |
|
49
|
|
|
</div> |
|
50
|
|
|
) |
|
51
|
|
|
})} |
|
52
|
|
|
</section> |
|
53
|
|
|
|
|
54
|
|
|
{leerplan?.childImageSharp?.gatsbyImageData && ( |
|
55
|
|
|
<> |
|
56
|
|
|
<h2 className="featured-border">Meer info</h2> |
|
57
|
|
|
<section> |
|
58
|
|
|
<CardHorizontal |
|
59
|
|
|
title="Leerplannen voor de jeugdwerking" |
|
60
|
|
|
picture={leerplan?.childImageSharp?.gatsbyImageData} |
|
61
|
|
|
link="/news/2019-08-08-leerplan-kcvv-elewijt-jeugd" |
|
62
|
|
|
body="Het jeugdbestuur legt aan de hand van dit document uit waar onze jeugdwerking voor staat en hoe de aanpak zal verlopen." |
|
63
|
|
|
/> |
|
64
|
|
|
</section> |
|
65
|
|
|
</> |
|
66
|
|
|
)} |
|
67
|
|
|
<section> |
|
68
|
|
|
<h2 className="featured-border">Volgende wedstrijden</h2> |
|
69
|
|
|
<MatchesOverview exclude={[`1`, `2`]} /> |
|
70
|
|
|
</section> |
|
71
|
|
|
</div> |
|
72
|
|
|
</Layout> |
|
73
|
|
|
) |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
export const Head = () => { |
|
77
|
|
|
return <Seo title="Jeugdwerking" description="Jeugdwerking van KCVV Elewijt" path="/jeugd/" /> |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
export const pageQuery = graphql` |
|
81
|
|
|
query JeugdPage { |
|
82
|
|
|
leerplan: file(name: { eq: "leerplan_header" }) { |
|
83
|
|
|
...KCVVFullWidth |
|
84
|
|
|
} |
|
85
|
|
|
allNodeTeam(filter: { field_vv_id: { ne: null, nin: ["1", "2"] } }, sort: { field_fb_id_2: ASC }) { |
|
86
|
|
|
edges { |
|
87
|
|
|
node { |
|
88
|
|
|
path { |
|
89
|
|
|
alias |
|
90
|
|
|
} |
|
91
|
|
|
field_vv_id |
|
92
|
|
|
title |
|
93
|
|
|
relationships { |
|
94
|
|
|
field_media_article_image { |
|
95
|
|
|
...FullImage |
|
96
|
|
|
field_media_image { |
|
97
|
|
|
alt |
|
98
|
|
|
} |
|
99
|
|
|
} |
|
100
|
|
|
} |
|
101
|
|
|
} |
|
102
|
|
|
} |
|
103
|
|
|
} |
|
104
|
|
|
} |
|
105
|
|
|
` |
|
106
|
|
|
|
|
107
|
|
|
export default JeugdPage |
|
108
|
|
|
|