|
| 1 | +import React from "react"; |
| 2 | +import Container from "../ui/container"; |
| 3 | +import { FaExternalLinkAlt } from "react-icons/fa"; |
| 4 | +import { SUB_EVENTS } from "../lib/data"; |
| 5 | + |
| 6 | +const Tag = ({ children }: { children: string }) => { |
| 7 | + return ( |
| 8 | + <div className="w-max rounded-full bg-[#345DA7] px-3 py-2 text-sm leading-none text-white"> |
| 9 | + # {children} |
| 10 | + </div> |
| 11 | + ); |
| 12 | +}; |
| 13 | + |
| 14 | +const SubEventPage = () => { |
| 15 | + return ( |
| 16 | + <Container> |
| 17 | + <div className="flex flex-col"> |
| 18 | + <h1 className="mt-4 text-2xl font-bold tracking-tight text-accent"> |
| 19 | + TSKaigiのサブイベントに参加しよう! |
| 20 | + </h1> |
| 21 | + <p className="mt-6 text-lg leading-7"> |
| 22 | + TSKaigiのスポンサー企業によって実施される、TSKaigiのサブイベントをご紹介します。ご参加お待ちしております! |
| 23 | + </p> |
| 24 | + <p className="mt-1 text-sm">※ 正確な情報は各イベントページをご確認ください。</p> |
| 25 | + </div> |
| 26 | + <div className="mt-10 flex flex-col gap-8"> |
| 27 | + {SUB_EVENTS.map(({ title, link, description, tags, date, day, thumbnail, sponsorList }) => ( |
| 28 | + <div |
| 29 | + key={title} |
| 30 | + className="flex flex-col rounded-xl bg-white p-4 text-slate-800 md:flex-row" |
| 31 | + > |
| 32 | + <div className="w-full shrink-0 border-b border-b-slate-200 border-r-slate-200 p-2 pb-4 pr-8 text-3xl md:w-[112px] md:border-b-0 md:border-r md:p-4"> |
| 33 | + {date} |
| 34 | + <br /> |
| 35 | + <span className="text-xl">({day})</span> |
| 36 | + </div> |
| 37 | + <div className="p-2 pt-4 md:p-4"> |
| 38 | + <a href={link} target="_blank" rel="noopener noreferrer"> |
| 39 | + <h2 className="text-xl font-bold underline hover:no-underline"> |
| 40 | + {title} |
| 41 | + <FaExternalLinkAlt className="ml-2 inline" size={14} /> |
| 42 | + </h2> |
| 43 | + </a> |
| 44 | + <a href={link} target="_blank" rel="noopener noreferrer"> |
| 45 | + <img src={thumbnail} alt={title} className="mt-4 h-full max-h-[200px]" /> |
| 46 | + </a> |
| 47 | + <p className="mt-4 whitespace-pre-line">{description}</p> |
| 48 | + <div className="mt-4 flex flex-wrap gap-2"> |
| 49 | + {tags.map((tag) => ( |
| 50 | + <Tag key={tag}>{tag}</Tag> |
| 51 | + ))} |
| 52 | + </div> |
| 53 | + <div className="mt-4 w-full text-end text-sm">実施: {sponsorList.join("、")}</div> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + ))} |
| 57 | + </div> |
| 58 | + </Container> |
| 59 | + ); |
| 60 | +}; |
| 61 | + |
| 62 | +export default SubEventPage; |
0 commit comments