{"version":3,"file":"Blogcard3.CC3eBiIf.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/b9WSgn7Pj5ccpZUgyhvd/ytqvtyBFa6Gutm6MMgt3/Blogcard3.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";export default function BlogCard(props){const{title,category,date,image,link}=props;// 모바일 감지 상태\nconst[isMobile,setIsMobile]=useState(false);useEffect(()=>{const checkMobile=()=>setIsMobile(window.innerWidth<=768);checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);},[]);return /*#__PURE__*/_jsx(\"a\",{href:link,style:{textDecoration:\"none\",width:\"100%\",display:\"flex\",justifyContent:\"center\"},children:/*#__PURE__*/_jsxs(motion.div,{style:{...cardStyle,// [핵심] 최대 너비 제한 및 중앙 정렬\nmaxWidth:\"1200px\",width:\"100%\"},whileHover:\"hover\",initial:\"rest\",children:[/*#__PURE__*/_jsx(\"div\",{style:{...imageWrapper,// 모바일에서는 이미지 비율을 조금 더 시원하게 (16:9 등) 조정 가능\n// 여기서는 4:3 유지하되 꽉 차게 설정\naspectRatio:isMobile?\"16/10\":\"4/3\"},children:image?/*#__PURE__*/_jsx(motion.img,{src:image,style:imgStyle,variants:{rest:{scale:1},hover:{scale:1.05}},transition:{duration:.3}}):/*#__PURE__*/_jsx(\"div\",{style:placeholder,children:\"No Image\"})}),/*#__PURE__*/_jsxs(\"div\",{style:{...textWrapper,// 모바일에서 여백 조정\npadding:isMobile?\"4px 0\":\"0\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:metaWrapper,children:[/*#__PURE__*/_jsx(\"span\",{style:categoryStyle,children:category}),/*#__PURE__*/_jsx(\"span\",{style:dateStyle,children:date})]}),/*#__PURE__*/_jsx(\"h3\",{style:{...titleStyle,// 모바일에서 폰트 크기 살짝 조정 (선택사항)\nfontSize:isMobile?\"17px\":\"18px\"},children:title})]})]})});}addPropertyControls(BlogCard,{image:{type:ControlType.Image,title:\"썸네일\"},category:{type:ControlType.String,title:\"카테고리\",defaultValue:\"NEWS\"},title:{type:ControlType.String,title:\"제목\",defaultValue:\"블로그 제목 예시\"},date:{type:ControlType.String,title:\"날짜\",defaultValue:\"2024.01.01\"},link:{type:ControlType.Link,title:\"링크\"}});// --- Styles ---\nconst cardStyle={display:\"flex\",flexDirection:\"column\",gap:\"16px\",cursor:\"pointer\",overflow:\"hidden\",boxSizing:\"border-box\"};const imageWrapper={width:\"100%\",borderRadius:\"12px\",overflow:\"hidden\",backgroundColor:\"#f1f5f9\",position:\"relative\"};const imgStyle={width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"};const placeholder={width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#cbd5e1\",fontSize:\"14px\"};const textWrapper={display:\"flex\",flexDirection:\"column\",gap:\"8px\"};const metaWrapper={display:\"flex\",gap:\"10px\",fontSize:\"13px\",fontWeight:\"600\"};const categoryStyle={color:\"#5487F5\",textTransform:\"uppercase\"};const dateStyle={color:\"#94a3b8\"};const titleStyle={fontWeight:\"700\",color:\"#1e293b\",margin:0,lineHeight:\"1.4\",wordBreak:\"keep-all\",display:\"-webkit-box\",WebkitLineClamp:2,WebkitBoxOrient:\"vertical\",overflow:\"hidden\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Blogcard3.map"],"mappings":"mPAAqL,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,OAAK,QAAM,QAAM,EAC9P,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAuM,OAAtM,MAAc,CAAC,IAAM,MAAgB,EAAY,EAAO,YAAY,IAAI,CAA6D,O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