-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FE/feat/#70] 포토 테마 페이지
- Loading branch information
Showing
28 changed files
with
548 additions
and
160 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"v":"4.8.0","meta":{"g":"LottieFiles AE 1.0.0","a":"","k":"","d":"","tc":"#FFFFFF"},"fr":30,"ip":0,"op":75,"w":1500,"h":1500,"nm":"message_sent","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[750,750,0],"ix":2},"a":{"a":0,"k":[19,46,0],"ix":1},"s":{"a":0,"k":[124,124,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[475.5,-168],[-275.403,166.387],[-240.194,386.403],[-219,240],[-123.565,296.419],[-216,223]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1638,0.4371,0.6762,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":190.19019019019,"st":10.01001001001,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[750,750,0],"ix":2},"a":{"a":0,"k":[19,46,0],"ix":1},"s":{"a":0,"k":[124,124,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[488,-174],[-460,16],[-276,166],[-240,386],[-122,296],[4,404]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.24,0.6453,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":190.19019019019,"st":10.01001001001,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":50.045,"s":[100]},{"t":60.0546875,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":45.04,"s":[1246,282,0],"to":[-3.667,52,0],"ti":[3.667,-52,0]},{"t":60.0546875,"s":[1224,594,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":45.04,"s":[0,0,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":50.045,"s":[4,4,100]},{"t":60.0546875,"s":[0,0,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1500,1500],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.1922,0.6,0.9608,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":240,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1638,0.4371,0.6762,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":80,"st":5,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":50.045,"s":[100]},{"t":60.0546875,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":45.04,"s":[1246,282,0],"to":[20,-19.333,0],"ti":[-20,19.333,0]},{"t":60.0546875,"s":[1366,166,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":45.04,"s":[0,0,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":50.045,"s":[4,4,100]},{"t":60.0546875,"s":[0,0,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1500,1500],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.1922,0.6,0.9608,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":240,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1638,0.4371,0.6762,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":80,"st":5,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":50.045,"s":[100]},{"t":60.0546875,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":45.04,"s":[1246,282,0],"to":[-55.833,11.333,0],"ti":[55.833,-11.333,0]},{"t":60.0546875,"s":[911,350,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":45.04,"s":[0,0,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":50.045,"s":[4,4,100]},{"t":60.0546875,"s":[0,0,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1500,1500],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.1922,0.6,0.9608,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":45.04,"s":[240]},{"t":60.0546875,"s":[240]}],"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1638,0.4371,0.6762,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":80,"st":5,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"New_Plane","refId":"comp_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":45.03,"s":[100]},{"t":49.0341796875,"s":[0]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.832],"y":[0.461]},"o":{"x":[0.621],"y":[0]},"t":24.009,"s":[0]},{"i":{"x":[0.833],"y":[0.861]},"o":{"x":[0.413],"y":[0.079]},"t":32.018,"s":[-15.977]},{"i":{"x":[0.705],"y":[0.886]},"o":{"x":[0.167],"y":[0.244]},"t":40.025,"s":[-283.577]},{"i":{"x":[0.757],"y":[1]},"o":{"x":[0.413],"y":[-6.015]},"t":45.03,"s":[-379.036]},{"t":49.0341796875,"s":[-377]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.829},"o":{"x":0.333,"y":0},"t":24.009,"s":[615,880,0],"to":[0,0,0],"ti":[98.064,301.65,0]},{"i":{"x":0.833,"y":0.899},"o":{"x":0.167,"y":0.081},"t":35.021,"s":[1190,405,0],"to":[-72.384,-287.264,0],"ti":[-26.681,-317.47,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.197},"t":40.025,"s":[658.668,461.908,0],"to":[75.392,238.957,0],"ti":[-189.966,287.905,0]},{"t":49.0341796875,"s":[1200,320,0]}],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":15,"s":[564,826,0],"to":[29.5,-10.167,0],"ti":[-13,6.667,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":24.009,"s":[741,765,0],"to":[13,-6.667,0],"ti":[16.5,-3.5,0]},{"t":31.0166015625,"s":[642,786,0]}],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.64,0.64,0.833],"y":[1,1,1]},"o":{"x":[0.145,0.145,0.167],"y":[0.231,0.231,0]},"t":15,"s":[80,80,100]},{"i":{"x":[0.376,0.376,0.833],"y":[0.139,0.139,1]},"o":{"x":[0.359,0.359,0.167],"y":[0,0,0]},"t":21.006,"s":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.127,0.127,0.167],"y":[0.214,0.214,0]},"t":27.013,"s":[80,80,100]},{"t":49.0341796875,"s":[20,20,100]}],"ix":6}},"ao":0,"w":1500,"h":1500,"ip":0,"op":75,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[700,900,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-300,-124],[-65,67],[395,-459]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.174],"y":[0.832]},"o":{"x":[0.337],"y":[0]},"t":40.035,"s":[0]},{"t":62,"s":[82]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.1922,0.6,0.9608,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":88,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[8,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":80,"st":5,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[708,900,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-300,-124],[-65,67],[395,-459]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":40.035,"s":[0]},{"t":51.0458984375,"s":[96]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.1638,0.4371,0.6762,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":88,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":80,"st":5,"bm":0}],"markers":[]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import line1 from '../../../assets/images/PhotoTheme/line1.png'; | ||
|
||
interface StoryType { | ||
img: string; | ||
owner: string; | ||
title: string; | ||
content: string; | ||
} | ||
|
||
interface PhotoCardProps { | ||
data: StoryType; | ||
} | ||
|
||
function PhotoCard1({ data }: PhotoCardProps) { | ||
const [isClicked, setIsClicked] = useState(false); | ||
|
||
const handleClick = () => { | ||
setIsClicked(!isClicked); | ||
}; | ||
|
||
const cardStyles = | ||
'z-10 relative flex justify-center items-center h-[22rem] w-[17rem] bg-white cursor-pointer border border-MyBlue'; | ||
|
||
const circleStyles = | ||
'absolute top-1 right-1/2 transform translate-x-1/2 -translate-y-1/2 h-[2.5rem] w-[2.5rem] bg-[#F0F1F3] rounded-full shadow-ButtonShadow '; | ||
|
||
const imageStyles = `h-[20.5rem] w-[15.5rem] bg-gray-300 bg-center bg-no-repeat bg-cover cursor-pointer ${ | ||
isClicked ? 'hidden' : '' | ||
}`; | ||
|
||
const textStyles = `w-full p-10 flex flex-col absolute top-0 left-0 ${ | ||
isClicked ? 'visible' : 'invisible' | ||
}`; | ||
|
||
return ( | ||
<div className="flex flex-col justify-start w-full h-full"> | ||
<div className="relative"> | ||
<img | ||
src={line1} | ||
alt="Leaf" | ||
className="z-0 absolute bottom-[18rem] right-[18rem] h-[5em] w-[3rem] " | ||
style={{ transform: 'rotate(10deg)' }} | ||
/> | ||
|
||
<div | ||
className={cardStyles} | ||
style={{ | ||
transform: 'rotate(-10deg)', | ||
}} | ||
onClick={handleClick} | ||
> | ||
<div className={circleStyles}></div> | ||
<div className={imageStyles} style={{ backgroundImage: `url(${data.img})` }}></div> | ||
<div className={textStyles}> | ||
<div className="border-b pb-4 text-xl ">{data.title}</div> | ||
<div className=" pt-4 text-lg">{data.content}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default PhotoCard1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import star1 from '../../../assets/images/PhotoTheme/star1.png'; | ||
|
||
interface StoryType { | ||
img: string; | ||
owner: string; | ||
title: string; | ||
content: string; | ||
} | ||
|
||
interface PhotoCardProps { | ||
data: StoryType; | ||
} | ||
|
||
function PhotoCard2({ data }: PhotoCardProps) { | ||
const [isClicked, setIsClicked] = useState(false); | ||
|
||
const handleClick = () => { | ||
setIsClicked(!isClicked); | ||
}; | ||
|
||
const cardStyles = | ||
'z-10 relative flex justify-center items-center h-[22rem] w-[17rem] bg-white cursor-pointer border border-MyBlue'; | ||
|
||
const circleStyles = | ||
'absolute top-1 right-1/2 transform translate-x-1/2 -translate-y-1/2 h-[2.5rem] w-[2.5rem] bg-[#F0F1F3] rounded-full shadow-ButtonShadow '; | ||
|
||
const imageStyles = `h-[20.5rem] w-[15.5rem] bg-gray-300 bg-center bg-no-repeat bg-cover cursor-pointer ${ | ||
isClicked ? 'hidden' : '' | ||
}`; | ||
|
||
const textStyles = `w-full p-10 flex flex-col absolute top-0 left-0 ${ | ||
isClicked ? 'visible' : 'invisible' | ||
}`; | ||
|
||
return ( | ||
<div className="flex flex-col justify-end w-full h-full relative right-5 "> | ||
<div className="z-20 relative"> | ||
<img | ||
src={star1} | ||
alt="Leaf" | ||
className="z-20 absolute top-[17rem] left-[12rem] h-[7em] w-[5rem] " | ||
style={{ transform: 'rotate(-15deg)' }} | ||
/> | ||
<div | ||
className={cardStyles} | ||
style={{ | ||
transform: 'rotate(15deg)', | ||
}} | ||
onClick={handleClick} | ||
> | ||
<div className={circleStyles}></div> | ||
<div className={imageStyles} style={{ backgroundImage: `url(${data.img})` }}></div> | ||
<div className={textStyles}> | ||
<div className="border-b pb-4 text-xl">{data.title}</div> | ||
<div className=" pt-4 text-lg">{data.content}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default PhotoCard2; |
Oops, something went wrong.