|
1 | 1 | import Countdown from "react-countdown";
|
2 |
| -import React, {FC} from "react"; |
| 2 | +import React, { FC } from "react"; |
3 | 3 | import LessThanIcon from "../../../../assets/images/MoreThanBlueWhiteIcon.svg";
|
4 |
| -import SectionWrapper |
5 |
| - from "../../../../components/SectionWrapper/SectionWrapper"; |
6 |
| -import {BIGGER_BREAKPOINT} from "../../../../constants/BreakPoints"; |
| 4 | +import SectionWrapper from "../../../../components/SectionWrapper/SectionWrapper"; |
| 5 | +import { BIGGER_BREAKPOINT } from "../../../../constants/BreakPoints"; |
7 | 6 | import TimeCountDown from "./components/TimeCountdown";
|
8 |
| -import {useWindowSize} from "react-use"; |
| 7 | +import { useWindowSize } from "react-use"; |
9 | 8 | import {
|
10 |
| - StyledBlueSlash, |
11 |
| - StyledBottomSlash, |
12 |
| - StyledDevBcnLogo, |
13 |
| - StyledGreenSlash, |
14 |
| - StyledHomeImage, |
15 |
| - StyledLessThan, |
16 |
| - StyledLogoDiv, |
17 |
| - StyledSubtitle, |
18 |
| - StyledTitle, |
19 |
| - StyledTitleContainer, |
20 |
| - StyledTopSlash, |
21 |
| - StyleHomeContainer, |
| 9 | + StyledBlueSlash, |
| 10 | + StyledBottomSlash, |
| 11 | + StyledDevBcnLogo, |
| 12 | + StyledGreenSlash, |
| 13 | + StyledHomeImage, |
| 14 | + StyledLessThan, |
| 15 | + StyledLogoDiv, |
| 16 | + StyledSubtitle, |
| 17 | + StyledTitle, |
| 18 | + StyledTitleContainer, |
| 19 | + StyledTopSlash, |
| 20 | + StyleHomeContainer, |
22 | 21 | } from "./Style.Home";
|
23 | 22 | import ActionButtons from "../ActionButtons/ActionButtons";
|
24 |
| -import {Color} from "../../../../styles/colors"; |
| 23 | +import { Color } from "../../../../styles/colors"; |
25 | 24 | import InfoButtons from "../InfoButtons/InfoButtons";
|
26 |
| -import {formatDateRange} from "./DateUtil"; |
27 |
| -import {Link} from "react-router"; |
| 25 | +import { formatDateRange } from "./DateUtil"; |
| 26 | +import { Link } from "react-router"; |
28 | 27 | import edition from "../../../../data/2025.json";
|
29 | 28 | import CountDownCompleted from "./components/CountDownCompleted";
|
30 | 29 |
|
31 | 30 | const Home: FC<React.PropsWithChildren<unknown>> = () => {
|
32 |
| - const {width} = useWindowSize(); |
| 31 | + const { width } = useWindowSize(); |
33 | 32 |
|
34 |
| - return ( |
35 |
| - <StyledHomeImage> |
36 |
| - <SectionWrapper color="transparent"> |
37 |
| - <StyleHomeContainer> |
38 |
| - <StyledLogoDiv> |
39 |
| - <StyledDevBcnLogo src="images/logo.png" |
40 |
| - alt="DevBcn logo"/> |
41 |
| - </StyledLogoDiv> |
42 |
| - <StyledTitleContainer> |
43 |
| - <StyledTitle> |
44 |
| - The Barcelona Developers |
45 |
| - Conference {edition?.edition} |
46 |
| - </StyledTitle> |
47 |
| - <StyledSubtitle> |
48 |
| - Former{" "} |
49 |
| - <a |
50 |
| - href="https://www.jbcnconf.com/2022/" |
51 |
| - target="_blank" |
52 |
| - rel="noreferrer" |
53 |
| - > |
54 |
| - JBCNConf |
55 |
| - </a>{" "} |
56 |
| - </StyledSubtitle> |
57 |
| - <StyledSubtitle> |
58 |
| - Multidisciplinary conference made for Developers and |
59 |
| - by |
60 |
| - Developers, to learn and share on the different |
61 |
| - modern software |
62 |
| - technologies used across the companies |
63 |
| - </StyledSubtitle> |
64 |
| - <StyledSubtitle> |
65 |
| - <small> |
66 |
| - Past events: <Link to="/2024">2024 |
67 |
| - edition</Link>{" "}| <Link to="/2023">2023 |
68 |
| - edition</Link> |
69 |
| - </small> |
70 |
| - </StyledSubtitle> |
71 |
| - </StyledTitleContainer> |
72 |
| - <StyledTitleContainer color={Color.LIGHT_BLUE}> |
73 |
| - <StyledSubtitle color={Color.DARK_BLUE}> |
74 |
| - {edition?.startDay && |
75 |
| - edition.endDay && |
76 |
| - formatDateRange( |
77 |
| - new Date(edition.startDay), |
78 |
| - new Date(edition.endDay), |
79 |
| - )} |
80 |
| - </StyledSubtitle> |
81 |
| - <StyledSubtitle color={Color.DARK_BLUE}> |
82 |
| - La Farga, Hospitalet, Barcelona |
83 |
| - </StyledSubtitle> |
84 |
| - </StyledTitleContainer> |
85 |
| - <img src="/images/devBcn-sponsorship.png" |
86 |
| - alt="DevBcn sponsorship value" width="657" |
87 |
| - height="155" style={{aspectRatio:"657:155", maxWidth:"100%"}}/> |
88 |
| - <StyledTitleContainer color={Color.DARK_BLUE}> |
89 |
| - <StyledSubtitle> |
90 |
| - {edition?.trackNumber} tracks with the following |
91 |
| - topics: <br/> |
92 |
| - {edition?.tracks} |
93 |
| - </StyledSubtitle> |
94 |
| - </StyledTitleContainer> |
95 |
| - <Countdown date={edition?.startDay} |
96 |
| - onComplete={CountDownCompleted} |
97 |
| - renderer={TimeCountDown}/> |
98 |
| - {edition?.actionButtons && <ActionButtons/>} |
99 |
| - {edition?.showInfoButtons && <InfoButtons/>} |
| 33 | + return ( |
| 34 | + <StyledHomeImage> |
| 35 | + <SectionWrapper color="transparent"> |
| 36 | + <StyleHomeContainer> |
| 37 | + <StyledLogoDiv> |
| 38 | + <StyledDevBcnLogo src="images/logo.png" alt="DevBcn logo" /> |
| 39 | + </StyledLogoDiv> |
| 40 | + <StyledTitleContainer> |
| 41 | + <StyledTitle> |
| 42 | + The Barcelona Developers Conference {edition?.edition} |
| 43 | + </StyledTitle> |
| 44 | + <StyledSubtitle> |
| 45 | + {edition?.trackNumber} tracks with the following topics: <br /> |
| 46 | + {edition?.tracks} |
| 47 | + </StyledSubtitle> |
| 48 | + <StyledSubtitle> |
| 49 | + <small> |
| 50 | + Past events: <Link to="/2024">2024 edition</Link> |{" "} |
| 51 | + <Link to="/2023">2023 edition</Link> |
| 52 | + </small> |
| 53 | + </StyledSubtitle> |
| 54 | + </StyledTitleContainer> |
| 55 | + <img |
| 56 | + src="/images/devBcn-sponsorship.png" |
| 57 | + alt="DevBcn sponsorship value" |
| 58 | + width="635" |
| 59 | + height="125" |
| 60 | + style={{ aspectRatio: "127:25", maxWidth: "100%" }} |
| 61 | + /> |
| 62 | + <StyledTitleContainer color={Color.LIGHT_BLUE}> |
| 63 | + <StyledSubtitle color={Color.DARK_BLUE}> |
| 64 | + {edition?.startDay && |
| 65 | + edition.endDay && |
| 66 | + formatDateRange( |
| 67 | + new Date(edition.startDay), |
| 68 | + new Date(edition.endDay), |
| 69 | + )} |
| 70 | + </StyledSubtitle> |
| 71 | + <StyledSubtitle color={Color.DARK_BLUE}> |
| 72 | + La Farga, Hospitalet, Barcelona |
| 73 | + </StyledSubtitle> |
| 74 | + </StyledTitleContainer> |
| 75 | + <Countdown |
| 76 | + date={edition?.startDay} |
| 77 | + onComplete={CountDownCompleted} |
| 78 | + renderer={TimeCountDown} |
| 79 | + /> |
| 80 | + {edition?.actionButtons && <ActionButtons />} |
| 81 | + {edition?.showInfoButtons && <InfoButtons />} |
100 | 82 |
|
101 |
| - {width > BIGGER_BREAKPOINT && ( |
102 |
| - <StyledLessThan alt="Icon" src={LessThanIcon}/> |
103 |
| - )} |
104 |
| - {width > BIGGER_BREAKPOINT && ( |
105 |
| - <StyledTopSlash |
106 |
| - initial={{x: "100%"}} |
107 |
| - animate={{x: 0}} |
108 |
| - transition={{duration: 4}} |
109 |
| - > |
110 |
| - <StyledGreenSlash> |
111 |
| - / / / / / / / / / / / / / / / / / / / / / / / / |
112 |
| - / / / / / / / / |
113 |
| - / / / / / / / / / / / / / / / / / / / / / / / / |
114 |
| - / / / / / / / / |
115 |
| - / /{" "} |
116 |
| - </StyledGreenSlash> |
117 |
| - </StyledTopSlash> |
118 |
| - )} |
119 |
| - <StyledBottomSlash |
120 |
| - initial={{x: "-100%"}} |
121 |
| - animate={{x: 0}} |
122 |
| - transition={{duration: 6}} |
123 |
| - > |
124 |
| - {width > BIGGER_BREAKPOINT && ( |
125 |
| - <StyledBlueSlash> |
126 |
| - / / / / / / / / / / / / / / / / / / / / / / / / |
127 |
| - / / / / / / / / |
128 |
| - / / / / / / / / / / / / / / / / / / / / / / / / |
129 |
| - / / / / / / / / |
130 |
| - / /{" "} |
131 |
| - </StyledBlueSlash> |
132 |
| - )} |
133 |
| - </StyledBottomSlash> |
134 |
| - </StyleHomeContainer> |
135 |
| - </SectionWrapper> |
136 |
| - </StyledHomeImage> |
137 |
| - ); |
| 83 | + {width > BIGGER_BREAKPOINT && ( |
| 84 | + <StyledLessThan alt="Icon" src={LessThanIcon} /> |
| 85 | + )} |
| 86 | + {width > BIGGER_BREAKPOINT && ( |
| 87 | + <StyledTopSlash |
| 88 | + initial={{ x: "100%" }} |
| 89 | + animate={{ x: 0 }} |
| 90 | + transition={{ duration: 4 }} |
| 91 | + > |
| 92 | + <StyledGreenSlash> |
| 93 | + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / |
| 94 | + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / |
| 95 | + / /{" "} |
| 96 | + </StyledGreenSlash> |
| 97 | + </StyledTopSlash> |
| 98 | + )} |
| 99 | + <StyledBottomSlash |
| 100 | + initial={{ x: "-100%" }} |
| 101 | + animate={{ x: 0 }} |
| 102 | + transition={{ duration: 6 }} |
| 103 | + > |
| 104 | + {width > BIGGER_BREAKPOINT && ( |
| 105 | + <StyledBlueSlash> |
| 106 | + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / |
| 107 | + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / |
| 108 | + / /{" "} |
| 109 | + </StyledBlueSlash> |
| 110 | + )} |
| 111 | + </StyledBottomSlash> |
| 112 | + </StyleHomeContainer> |
| 113 | + </SectionWrapper> |
| 114 | + </StyledHomeImage> |
| 115 | + ); |
138 | 116 | };
|
139 | 117 |
|
140 | 118 | export default Home;
|
0 commit comments