|
| 1 | +import styled from "@emotion/styled"; |
| 2 | +import * as Common from "@frontend/common"; |
| 3 | +import { Article, Email, Facebook, GitHub, Instagram, LinkedIn, X, YouTube } from "@mui/icons-material"; |
| 4 | +import * as React from "react"; |
| 5 | + |
| 6 | +import FlickrIcon from "@apps/pyconkr/assets/thirdparty/flickr.svg?react"; |
| 7 | + |
| 8 | +import { useAppContext } from "../../../../contexts/app_context"; |
| 9 | + |
| 10 | +interface IconItem { |
| 11 | + icon: React.FC<{ width?: number; height?: number }>; |
| 12 | + alt: string; |
| 13 | + href: string; |
| 14 | +} |
| 15 | + |
| 16 | +const defaultIcons: IconItem[] = [ |
| 17 | + { |
| 18 | + icon: Facebook, |
| 19 | + alt: "facebook", |
| 20 | + href: "https://www.facebook.com/pyconkorea/", |
| 21 | + }, |
| 22 | + { |
| 23 | + icon: YouTube, |
| 24 | + alt: "YouTube", |
| 25 | + href: "https://www.youtube.com/c/PyConKRtube", |
| 26 | + }, |
| 27 | + { icon: X, alt: "X", href: "https://x.com/PyConKR" }, |
| 28 | + { icon: GitHub, alt: "github", href: "https://github.com/pythonkr" }, |
| 29 | + { |
| 30 | + icon: Instagram, |
| 31 | + alt: "Instagram", |
| 32 | + href: "https://www.instagram.com/pycon_korea/", |
| 33 | + }, |
| 34 | + { |
| 35 | + icon: LinkedIn, |
| 36 | + alt: "LinkedIn", |
| 37 | + href: "https://www.linkedin.com/company/pyconkorea/", |
| 38 | + }, |
| 39 | + { icon: Article, alt: "blog", href: "https://blog.pycon.kr/" }, |
| 40 | + { |
| 41 | + icon: FlickrIcon, |
| 42 | + alt: "Flickr", |
| 43 | + href: "https://www.flickr.com/photos/126829363@N08/", |
| 44 | + }, |
| 45 | +]; |
| 46 | + |
| 47 | +const Bar: React.FC = () => <div style={{ display: "inline-block", padding: "0 0.25rem" }}>|</div>; |
| 48 | + |
| 49 | +export default function MobileFooter() { |
| 50 | + const { sendEmail } = Common.Hooks.Common.useEmail(); |
| 51 | + const { language } = useAppContext(); |
| 52 | + |
| 53 | + const title = language === "ko" ? "Weave with Python, 파이콘 한국 2025" : "Weave with Python, Pycon KR 2025"; |
| 54 | + const committeeTitle = |
| 55 | + language === "ko" |
| 56 | + ? "파이콘 한국 2025는 파이콘 한국 준비위원회가 만들고 있습니다" |
| 57 | + : "PyCon Korea 2025 is organized by the PyCon Korea Organizing Committee"; |
| 58 | + const djangoTitle = language === "ko" ? "파이썬 웹 프레임워크 Django로 만들었습니다" : "Built with the Django web framework for Python"; |
| 59 | + |
| 60 | + const links = [ |
| 61 | + { |
| 62 | + text: language === "ko" ? "파이콘 한국 행동 강령(CoC)" : "PyCon Korea Code of Conduct", |
| 63 | + href: "https://pythonkr.github.io/pycon-code-of-conduct/ko/coc/a_intent_and_purpose.html", |
| 64 | + }, |
| 65 | + { |
| 66 | + text: language === "ko" ? "서비스 이용 약관" : "Terms of Service", |
| 67 | + href: "/about/terms-of-service", |
| 68 | + }, |
| 69 | + { |
| 70 | + text: language === "ko" ? "개인 정보 처리 방침" : "Privacy Policy", |
| 71 | + href: "/about/privacy-policy", |
| 72 | + }, |
| 73 | + ]; |
| 74 | + |
| 75 | + return ( |
| 76 | + <FooterContainer> |
| 77 | + <FooterContent> |
| 78 | + <FooterSlogan> |
| 79 | + <br /> |
| 80 | + <FooterBoldText children={title} /> |
| 81 | + <br /> |
| 82 | + <FooterNormalText children={committeeTitle} /> |
| 83 | + <br /> |
| 84 | + <FooterNormalText children={djangoTitle} /> |
| 85 | + <br /> |
| 86 | + </FooterSlogan> |
| 87 | + <FooterLinks> |
| 88 | + {links.map((link, index) => ( |
| 89 | + <FooterLinkSlogan key={index}> |
| 90 | + <Link key={link.text} href={link.href}> |
| 91 | + {link.text} |
| 92 | + </Link> |
| 93 | + {index < links.length - 1 && <Separator>|</Separator>} |
| 94 | + </FooterLinkSlogan> |
| 95 | + ))} |
| 96 | + </FooterLinks> |
| 97 | + <FooterIcons> |
| 98 | + <IconLink onClick={sendEmail} aria-label="이메일 보내기"> |
| 99 | + <Email width={20} height={20} aria-hidden="true" /> |
| 100 | + </IconLink> |
| 101 | + {defaultIcons.map((icon) => ( |
| 102 | + <IconLink key={icon.alt} href={icon.href} target="_blank" rel="noopener noreferrer" aria-label={`${icon.alt}로 이동`}> |
| 103 | + <icon.icon width={20} height={20} aria-hidden="true" /> |
| 104 | + </IconLink> |
| 105 | + ))} |
| 106 | + </FooterIcons> |
| 107 | + </FooterContent> |
| 108 | + </FooterContainer> |
| 109 | + ); |
| 110 | +} |
| 111 | + |
| 112 | +const FooterContainer = styled.footer` |
| 113 | + background: linear-gradient(to bottom, #ffffff 0%, #e4fdff 25%, #92c9cc 50%, #5cadb3 75%, #095a5f 100%); |
| 114 | + color: ${({ theme }) => theme.palette.common.white}; |
| 115 | + font-size: 0.75rem; |
| 116 | + display: flex; |
| 117 | + flex-direction: column; |
| 118 | + align-items: center; |
| 119 | + justify-content: center; |
| 120 | + width: 100%; |
| 121 | + max-height: 16rem; |
| 122 | + padding: 5rem 0 1rem 0; |
| 123 | +`; |
| 124 | + |
| 125 | +const FooterContent = styled.div` |
| 126 | + display: flex; |
| 127 | + flex-direction: column; |
| 128 | + align-items: center; |
| 129 | + justify-content: center; |
| 130 | + gap: 0.75rem; |
| 131 | +`; |
| 132 | + |
| 133 | +const FooterText = styled.div` |
| 134 | + padding: 0 2rem; |
| 135 | + margin: 0.1rem; |
| 136 | +
|
| 137 | + font-size: 9pt; |
| 138 | +
|
| 139 | + a > button { |
| 140 | + margin-left: 0.25rem; |
| 141 | + padding: 0.05rem 0.25rem; |
| 142 | + font-size: 8pt; |
| 143 | + color: ${({ theme }) => theme.palette.common.white}; |
| 144 | + border-color: ${({ theme }) => theme.palette.common.white}; |
| 145 | +
|
| 146 | + gap: 0.25rem; |
| 147 | +
|
| 148 | + & span { |
| 149 | + margin-left: -2px; |
| 150 | + margin-right: 0; |
| 151 | +
|
| 152 | + & svg { |
| 153 | + font-size: 12pt !important; |
| 154 | + } |
| 155 | + } |
| 156 | + } |
| 157 | +
|
| 158 | + strong { |
| 159 | + font-size: 12pt; |
| 160 | + } |
| 161 | +`; |
| 162 | + |
| 163 | +const FooterBoldText = styled.text` |
| 164 | + font-weight: 600; |
| 165 | +`; |
| 166 | + |
| 167 | +const FooterNormalText = styled.text` |
| 168 | + font-weight: 400; |
| 169 | +`; |
| 170 | + |
| 171 | +const FooterSlogan = styled.div` |
| 172 | + text-align: center; |
| 173 | +`; |
| 174 | + |
| 175 | +const FooterLinkSlogan = styled.div` |
| 176 | + display: flex; |
| 177 | + gap: 0.3rem; |
| 178 | +`; |
| 179 | + |
| 180 | +const FooterLinks = styled.div` |
| 181 | + display: flex; |
| 182 | + align-items: center; |
| 183 | + gap: 0.3rem; |
| 184 | +`; |
| 185 | + |
| 186 | +const FooterIcons = styled.div` |
| 187 | + display: flex; |
| 188 | + align-items: center; |
| 189 | + gap: 9px; |
| 190 | +`; |
| 191 | + |
| 192 | +const Link = styled.a` |
| 193 | + color: ${({ theme }) => theme.palette.common.white}; |
| 194 | + text-decoration: none; |
| 195 | + &:hover { |
| 196 | + text-decoration: underline; |
| 197 | + } |
| 198 | +`; |
| 199 | + |
| 200 | +const Separator = styled.span` |
| 201 | + color: ${({ theme }) => theme.palette.common.white}; |
| 202 | + opacity: 0.5; |
| 203 | + margin: 0.05rem 0; |
| 204 | +`; |
| 205 | + |
| 206 | +const IconLink = styled.a` |
| 207 | + display: flex; |
| 208 | + align-items: center; |
| 209 | + justify-content: center; |
| 210 | +
|
| 211 | + cursor: pointer; |
| 212 | +
|
| 213 | + &:hover { |
| 214 | + opacity: 0.8; |
| 215 | + } |
| 216 | +
|
| 217 | + img { |
| 218 | + width: 20px; |
| 219 | + height: 20px; |
| 220 | + } |
| 221 | +`; |
0 commit comments