-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: archive list page 스타일 변경, 컴포넌트 단위로 분리
- Loading branch information
Showing
12 changed files
with
191 additions
and
360 deletions.
There are no files selected for viewing
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,26 @@ | ||
.area_container { | ||
position: relative; | ||
display: flex; | ||
flex-direction: row; | ||
width: 100%; | ||
/* background: rgb(20, 20, 20); */ | ||
} | ||
|
||
.picture1 { | ||
width: 50%; | ||
object-fit: contain; | ||
opacity: 0.5; | ||
transform: translateY(50%); | ||
} | ||
|
||
.picture2 { | ||
width: 50%; | ||
object-fit: contain; | ||
opacity: 0.5; | ||
} | ||
|
||
.description { | ||
position: absolute; | ||
left: 5%; | ||
width: 40%; | ||
} |
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,21 @@ | ||
import { loadCSS } from "/TRANS_HYPE/utils/loadCSS.js"; | ||
import Picture from "./Picture.js"; | ||
import Description from "./Description.js"; | ||
|
||
export default function Area(area) { | ||
loadCSS("/TRANS_HYPE/pages/archive_list/Area.css"); | ||
const container = document.createElement("li"); | ||
container.classList.add("area_container"); | ||
|
||
const picture1 = Picture(area.pic2); | ||
const picture2 = Picture(area.pic3); | ||
const description = Description(area); | ||
|
||
picture1.classList.add("picture1"); | ||
picture2.classList.add("picture2"); | ||
description.classList.add("description"); | ||
|
||
container.append(picture1, picture2, description); | ||
|
||
return container; | ||
} |
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,17 @@ | ||
.place_info { | ||
font-family: "Noto Sans KR", sans-serif; | ||
color: white; | ||
|
||
font-size: 1.2vw; | ||
font-weight: 900; | ||
line-height: 170%; | ||
|
||
word-break: keep-all; | ||
z-index: 2; | ||
} | ||
|
||
.interview { | ||
font-size: 2vw; | ||
font-weight: 900; | ||
line-height: 170%; | ||
} |
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,18 @@ | ||
import { loadCSS } from "/TRANS_HYPE/utils/loadCSS.js"; | ||
export default function Description(area) { | ||
loadCSS("/TRANS_HYPE/pages/archive_list/Description.css"); | ||
|
||
let descriptionContainer = document.createElement("div"); | ||
descriptionContainer.classList.add("place_info"); | ||
|
||
descriptionContainer.innerHTML = ` | ||
<div>${area.address_kr}</div> | ||
<div>${area.address_eng}</div> | ||
<div>${area.graffiti_size}</div> | ||
<div>${area.graffiti_style}</div> | ||
<div>${area.wall_size}</div> | ||
<br><br> | ||
<div class=interview>${area.discription}</div> | ||
`; | ||
return descriptionContainer; | ||
} |
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 @@ | ||
|
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,27 @@ | ||
import { loadCSS } from "/TRANS_HYPE/utils/loadCSS.js"; | ||
|
||
export default function Picture(srcName) { | ||
loadCSS("/TRANS_HYPE/pages/archive_list/Picture.css"); | ||
const picture = document.createElement("img"); | ||
|
||
picture.src = getImgFilePath(320, srcName); | ||
picture.srcset = ` | ||
${getImgFilePath(320, srcName)} 320w, | ||
${getImgFilePath(640, srcName)} 640w, | ||
${getImgFilePath(1024, srcName)} 1024w, | ||
`; | ||
picture.sizes = "(max-width: 500px) 320px, (max-width: 800px) 640px, 1024px"; | ||
return picture; | ||
} | ||
|
||
function getImgFilePath(width, srcName) { | ||
const archivePicturesPath = "../../assets/archive_pictures/"; | ||
switch (width) { | ||
case 320: | ||
return archivePicturesPath + "w320/" + srcName; | ||
case 640: | ||
return archivePicturesPath + "w640/" + srcName; | ||
case 1024: | ||
return archivePicturesPath + "w1024/" + srcName; | ||
} | ||
} |
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,13 @@ | ||
._shortcut > button { | ||
border: none; | ||
outline: none; | ||
background-color: inherit; | ||
cursor: pointer; | ||
color: gray; | ||
font-family: "Noto Sans KR", sans-serif; | ||
} | ||
|
||
._shortcut > button:hover, | ||
._shortcut > button:focus { | ||
color: white; | ||
} |
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,18 @@ | ||
import { loadCSS } from "/TRANS_HYPE/utils/loadCSS.js"; | ||
|
||
export default function Shortcut(area, index, onClickShorcut) { | ||
loadCSS("/TRANS_HYPE/pages/archive_list/Shortcut.css"); | ||
const shortcut = document.createElement("li"); | ||
const button = document.createElement("button"); | ||
button.dataset.index = index; | ||
|
||
shortcut.appendChild(button); | ||
shortcut.classList.add("_shortcut"); | ||
|
||
button.innerHTML = ` | ||
${area.address_kr} | ||
`; | ||
button.onclick = onClickShorcut; | ||
|
||
return shortcut; | ||
} |
Oops, something went wrong.