|
| 1 | +import React, { FC, Suspense } from "react"; |
| 2 | +import "./map.css"; |
| 3 | +import { styled } from "styled-components"; |
| 4 | +import TitleSection from "@components/SectionTitle/TitleSection"; |
| 5 | +import { Color } from "@styles/colors"; |
| 6 | +import { |
| 7 | + BIG_BREAKPOINT, |
| 8 | + MAX_WIDTH, |
| 9 | + MOBILE_BREAKPOINT, |
| 10 | +} from "@constants/BreakPoints"; |
| 11 | +import { useWindowSize } from "react-use"; |
| 12 | +import { StyledLoadingImage } from "@components/Loading/Loading"; |
| 13 | + |
| 14 | +const StyledVenue = styled.div` |
| 15 | + padding: 0.5rem 2rem 0.5rem; |
| 16 | + text-align: left; |
| 17 | + max-width: ${MAX_WIDTH}px; |
| 18 | + margin: 0 auto; |
| 19 | +
|
| 20 | + @media (max-width: ${BIG_BREAKPOINT}px) { |
| 21 | + padding: 100px 1rem 50px; |
| 22 | + } |
| 23 | +
|
| 24 | + .image { |
| 25 | + img.venue { |
| 26 | + width: 95%; |
| 27 | + margin: 0 2.5%; |
| 28 | + text-align: center; |
| 29 | + } |
| 30 | +
|
| 31 | + a, |
| 32 | + p { |
| 33 | + padding-left: 10px; |
| 34 | + } |
| 35 | +
|
| 36 | + a { |
| 37 | + text-decoration: none; |
| 38 | + color: ${Color.DARK_BLUE}; |
| 39 | + font-weight: bold; |
| 40 | + } |
| 41 | + } |
| 42 | +
|
| 43 | + section.venue { |
| 44 | + display: flex; |
| 45 | + @media (max-width: ${BIG_BREAKPOINT}px) { |
| 46 | + flex-direction: column; |
| 47 | + } |
| 48 | + } |
| 49 | +
|
| 50 | + h4 { |
| 51 | + margin: 15px 0 3px 10px; |
| 52 | + } |
| 53 | +
|
| 54 | + .image, |
| 55 | + .map { |
| 56 | + width: 50%; |
| 57 | + @media (max-width: ${BIG_BREAKPOINT}px) { |
| 58 | + width: 100%; |
| 59 | + } |
| 60 | + } |
| 61 | +`; |
| 62 | + |
| 63 | +const StyledTrainLine = styled.span` |
| 64 | + background-color: #00f200; |
| 65 | + font-weight: bold; |
| 66 | + padding: 1px 2px; |
| 67 | + font-family: sans-serif; |
| 68 | + font-size: 12px; |
| 69 | +`; |
| 70 | +export const StyledLessIcon = styled.img` |
| 71 | + position: absolute; |
| 72 | + left: -1rem; |
| 73 | + top: 5rem; |
| 74 | + height: 5rem; |
| 75 | +
|
| 76 | + @media (min-width: ${BIG_BREAKPOINT}px) { |
| 77 | + height: 10rem; |
| 78 | + } |
| 79 | +`; |
| 80 | +export const StyledMoreIcon = styled.img` |
| 81 | + position: absolute; |
| 82 | + right: -1rem; |
| 83 | + top: 5rem; |
| 84 | + height: 5rem; |
| 85 | +
|
| 86 | + @media (min-width: ${BIG_BREAKPOINT}px) { |
| 87 | + height: 10rem; |
| 88 | + } |
| 89 | +`; |
| 90 | + |
| 91 | +export const VenueWTC: FC<React.PropsWithChildren<unknown>> = () => { |
| 92 | + const { width } = useWindowSize(); |
| 93 | + return ( |
| 94 | + <StyledVenue> |
| 95 | + <TitleSection |
| 96 | + title={"Venue"} |
| 97 | + subtitle={"World Trade Center, Barcelona"} |
| 98 | + color={Color.DARK_BLUE} |
| 99 | + /> |
| 100 | + {width > MOBILE_BREAKPOINT && ( |
| 101 | + <> |
| 102 | + <StyledLessIcon src="/images/MoreThanBlueWhiteIcon.svg" /> |
| 103 | + <StyledMoreIcon src="/images/LessThanBlueWhiteIcon.svg" /> |
| 104 | + </> |
| 105 | + )} |
| 106 | + <section className="venue"> |
| 107 | + <div className="image"> |
| 108 | + <Suspense fallback={<StyledLoadingImage src="/images/logo.svg" />}> |
| 109 | + <img |
| 110 | + src="/images/wtc.jpg" |
| 111 | + style={{ aspectRatio: "285/173" }} |
| 112 | + alt="World Trade Center, Barcelona" |
| 113 | + className="venue" |
| 114 | + /> |
| 115 | + </Suspense> |
| 116 | + <a |
| 117 | + href="https://www.wtcbarcelona.com/" |
| 118 | + rel="noreferrer" |
| 119 | + target="_blank" |
| 120 | + title="World Trade Center, Barcelona" |
| 121 | + > |
| 122 | + World Trade Center, Barcelona |
| 123 | + </a> |
| 124 | + <p> |
| 125 | + 1ª planta Edif. Este, Moll de Barcelona, s/n, 08039 Barcelona |
| 126 | + </p> |
| 127 | + <h4>Access by public transportation</h4> |
| 128 | + <p>🚇 Metro: Líneas L3: Parada Drassanes, Línea L2: Parada Paral·lel.</p> |
| 129 | + <p> |
| 130 | + 🚍 Bus: Línea V11, parada Moll de Barcelona. |
| 131 | + </p> |
| 132 | + <p> |
| 133 | + 🚙 Access by <strong>car:</strong> via C-31 & B-10(14 minutes from the |
| 134 | + Airport) |
| 135 | + </p> |
| 136 | + <h4>Paid parking options</h4> |
| 137 | + <p> |
| 138 | + <a |
| 139 | + href="https://www.wtcbarcelona.com/" |
| 140 | + rel="noreferrer" |
| 141 | + target="_blank" |
| 142 | + > |
| 143 | + World Trade Center, Barcelona |
| 144 | + </a> |
| 145 | + </p> |
| 146 | + </div> |
| 147 | + <div className="map"> |
| 148 | + <img |
| 149 | + src="/images/wtc-auditorio.jpg" |
| 150 | + alt="Venue entrance" |
| 151 | + style={{ maxWidth: "100%" }} |
| 152 | + /> |
| 153 | + </div> |
| 154 | + </section> |
| 155 | + </StyledVenue> |
| 156 | + ); |
| 157 | +}; |
0 commit comments