|
| 1 | +import Page from "components/common/Page"; |
| 2 | +import React, { useMemo } from "react"; |
| 3 | +import styled from "styled-components"; |
| 4 | +import { sortByKey } from "utils"; |
| 5 | +import useTranslation from "utils/hooks/useTranslation"; |
| 6 | +import { FallbackImg } from "components/common/FallbackImg"; |
| 7 | +import { SloganShort } from "assets/icons"; |
| 8 | + |
| 9 | +const OrganizingTeam = () => { |
| 10 | + const t = useTranslation(); |
| 11 | + type Member = { name: string; comment?: string; imageFileName?: string }; |
| 12 | + const members = useMemo<Member[]>( |
| 13 | + () => |
| 14 | + sortByKey<Member>( |
| 15 | + [ |
| 16 | + { name: "배권한" }, |
| 17 | + { name: "권혁민", comment: "asdfasdfasdfasdf", imageFileName: "권혁민.jpg" }, |
| 18 | + { name: "박성흠" }, |
| 19 | + { name: "김순태" }, |
| 20 | + { name: "김강민" }, |
| 21 | + { name: "이우섭" }, |
| 22 | + { name: "이영은" }, |
| 23 | + { name: "김수빈" }, |
| 24 | + { name: "심명진" }, |
| 25 | + { name: "이한결" }, |
| 26 | + { name: "이준원" }, |
| 27 | + { name: "노하은" }, |
| 28 | + { name: "임혜정" }, |
| 29 | + { name: "이해용" }, |
| 30 | + { |
| 31 | + name: "김수빈 (sudosubin)", |
| 32 | + comment: "내려갈 때 보았네 올라갈 때 보지 못한 그 꽃", |
| 33 | + imageFileName: "김수빈S.png", |
| 34 | + }, |
| 35 | + { name: "정미르" }, |
| 36 | + { name: "음대웅" }, |
| 37 | + { name: "이준영" }, |
| 38 | + { name: "김민정" }, |
| 39 | + { name: "강나영" }, |
| 40 | + { name: "윤준기" }, |
| 41 | + { name: "송지헌" }, |
| 42 | + { name: "김지희" }, |
| 43 | + { name: "조성수" }, |
| 44 | + { name: "박조은", comment: "Now is better than never.", imageFileName: "박조은.jpg" }, |
| 45 | + ], |
| 46 | + "name" |
| 47 | + ), |
| 48 | + [] |
| 49 | + ); |
| 50 | + |
| 51 | + return ( |
| 52 | + <Page> |
| 53 | + <h1>{t("파이콘 한국 준비위원회")}</h1> |
| 54 | + <p> |
| 55 | + {t( |
| 56 | + "파이콘 한국 준비위원회는 2014년 조직되어, 올해 열한 번째 한국에서의 파이콘 행사를 준비하고 있습니다. " |
| 57 | + )} |
| 58 | + <br /> |
| 59 | + {t( |
| 60 | + "준비위원회는 매년 신규 멤버를 모집하는 파이콘을 사랑하는 사람들의 열린 모임입니다." |
| 61 | + )}{" "} |
| 62 | + {t("(가나다순)")} |
| 63 | + </p> |
| 64 | + |
| 65 | + {members.map((m, idx) => ( |
| 66 | + <MemberContainer key={`${m.name}-${idx}`}> |
| 67 | + <section className="left"> |
| 68 | + {m.imageFileName ? ( |
| 69 | + <FallbackImg |
| 70 | + src={`/images/organizingTeam/${m.imageFileName}`} |
| 71 | + alt={m.name} |
| 72 | + errorFallback={<SloganShort />} |
| 73 | + /> |
| 74 | + ) : ( |
| 75 | + <SloganShort /> |
| 76 | + )} |
| 77 | + </section> |
| 78 | + <section className="right"> |
| 79 | + <h4>{m.name}</h4> |
| 80 | + <div>{m.comment ?? "Pythonic Moments"}</div> |
| 81 | + </section> |
| 82 | + </MemberContainer> |
| 83 | + ))} |
| 84 | + </Page> |
| 85 | + ); |
| 86 | +}; |
| 87 | + |
| 88 | +export default OrganizingTeam; |
| 89 | + |
| 90 | +const MemberContainer = styled.div` |
| 91 | + width: 50%; |
| 92 | + margin: 0 auto; |
| 93 | + padding: 0.5rem 0; |
| 94 | +
|
| 95 | + display: flex; |
| 96 | +
|
| 97 | + & > section.left { |
| 98 | + width: 5rem; |
| 99 | + height: 5rem; |
| 100 | + margin: 0.5rem; |
| 101 | +
|
| 102 | + border-radius: 50%; |
| 103 | + border: 1px solid var(--pico-muted-border-color); |
| 104 | +
|
| 105 | + * { |
| 106 | + width: 100%; |
| 107 | + height: 100%; |
| 108 | + min-width: 100%; |
| 109 | + min-height: 100%; |
| 110 | + max-width: 100%; |
| 111 | + max-height: 100%; |
| 112 | + border-radius: 50%; |
| 113 | + } |
| 114 | +
|
| 115 | + @media only screen and (max-width: 809px) { |
| 116 | + width: 5rem; |
| 117 | + height: 5rem; |
| 118 | + margin: 0.25rem; |
| 119 | + } |
| 120 | + } |
| 121 | +
|
| 122 | + & > section.right { |
| 123 | + display: flex; |
| 124 | + flex-direction: column; |
| 125 | + justify-content: center; |
| 126 | +
|
| 127 | + h4 { |
| 128 | + color: #febd99; |
| 129 | + margin-bottom: 0.2rem; |
| 130 | + } |
| 131 | +
|
| 132 | + & > div { |
| 133 | + margin-bottom: 0.3rem; |
| 134 | + color: var(--pico-h3-color); |
| 135 | + font-size: 0.8rem; |
| 136 | + font-weight: bold; |
| 137 | + min-height: 1rem; |
| 138 | + } |
| 139 | + } |
| 140 | +
|
| 141 | + @media only screen and (max-width: 809px) { |
| 142 | + width: 75%; |
| 143 | +
|
| 144 | + p { |
| 145 | + font-size: 0.8rem; |
| 146 | + font-weight: bold; |
| 147 | + } |
| 148 | + } |
| 149 | +`; |
0 commit comments