계속 figma로 UI/UX 디자인만 해왔다가
엘리스 부트캠프 통해서 html/css/javascript배운것 기초로
2주간의 개인 프로젝트로 진행하게 된 포폴 사이트 만들기
(⬆이미지 클릭하면 사이트로 이동합니다.)
➡️ 제공되는 개발 프로세스 및 기본 코드 구조를 기반으로, 자기소개 페이지를 완성합니다.
2주차: 자기소개 페이지 고도화
➡️ 완성한 자기소개 페이지에 기능을 추가 혹은 개선하며 확장 및 고도화합니다.
1주간은 엘리스에서 요구한 가이드라인에 최대한 맞춰서 PC버전으로 구현하는 것을 중점으로 두었다.
2주차때부터 고도화와 반응형 작업에 들어갔다.
주변사람들이 폰에서는 잘 안보인다는 피드백을 줘서
모바일화면에서도 잘 보일 수 있도록 Media Query 작업을 처음해봤는데
디자인만해서 화면만 만드는것과 다르게 직접 구현하는 재미가 있었다.
Json데이터와 연결해서 화면에 구현하는것도 프로젝트 과제중에 하나였는데
내가 좋아하는것, 싫어하는 keyword를 랜덤하게 뽑아서 흘러가도록 구현했다.
(싫어하는것 흐리게, 좋아하는것 선명하게 번갈아서 출력)
{ "favorite" : ["#에이펙스","#고양이","#운동","#연어","#맛집","#떡볶이","#사진촬영","#바텐더","#오버워치","#칵테일","#아키에이지","#매운음식","#게임","#윈드서핑"],
"hate" : ["#꼰대","#편견","#내로남불","#무소통","#잔소리","#느끼한 음식","#애매모호한 피드백","#가식","#멍게","#숫자계산","#게으름"]
}
//keywords json연결
const moveText1 = document.querySelector(".move_text1>.text1")
const moveText2 = document.querySelector(".move_text2>.text2")
const moveText3 = document.querySelector(".move_text3>.text3")
const moveText4 = document.querySelector(".move_text4>.text4")
const data = await fetch("./keywords.json").then((res) => res.json());
async function displayKeywords() {
const favoriteData = data.favorite;
const hateData = data.hate;
const favoriteArray = favoriteData.sort(() => Math.random() - 0.5)
const hateArray = hateData.sort(() => Math.random() - 0.5)
const array = (a, b) => {
let answer = '';
for (let i = 0; i < 11; i++) {
answer += `<td> ${a[i]}</td>`;
answer += `<td> ${b[i]}</td>`;
}
answer += answer + answer + answer;
return answer;
}
moveText1.innerHTML = array(favoriteArray, hateArray);
moveText2.innerHTML = array(favoriteArray, hateArray);
moveText3.innerHTML = array(favoriteArray, hateArray);
moveText4.innerHTML = array(favoriteArray, hateArray);
}
모바일화면에서 적합한 gnb화면을 출력하기가 어려웠다.
그리고 작은 창에서 큰 창으로 늘려도 gnb 출력부분에 에러가 생겨서
그부분 해결하는데 구글링으로 검색을 많이 하면서 시도끝에 원하는 화면이 나왔다.
// PC버전
.header>nav {
width: 60%;
margin: auto 0;
}
.header>nav>.gnb {
display: flex;
justify-content: flex-end;
}
.header>nav>.gnb>li {
width: calc(80%/5);
font-size: 14px;
font-weight: 600;
list-style: none;
cursor: pointer;
text-align: center;
}
.header>nav>.gnb>li>a {
color: black;
}
.header>nav>.gnb>li>a:hover {
color: #8873EE;
} 입력하세요
//Mobile 버전
.header>nav>.gnb {
display: none;
}
.header>nav>.gnb.on {
position: fixed;
z-index: 9999;
display: block;
background: linear-gradient(49deg, rgba(117, 94, 224) 50%, rgba(117, 94, 224) 50%);
padding: 95px 0;
height: 100%;
width: 100%;
left: 0;
top: 0;
}
.header>nav>.gnb.on>li a {
display: block;
padding: 20px 0 20px 10px;
font-size: 14px;
color: #fff;
}
.header>nav>.gnb.on>li {
text-align: center;
width: auto;
}
.header .menu_toggle_btn {
cursor: pointer;
display: block;
position: relative;
width: 30px;
height: 2.1rem;
margin: auto 0;
z-index: 10000;
}
.header .menu_toggle_btn::before {
content: '';
position: absolute;
top: 6px;
left: 3px;
width: 80%;
height: 2px;
background-color: #8873EE;
transition: all ease 1s;
}
.header .menu_toggle_btn span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80%;
height: 2px;
background-color: #8873EE;
transition: all ease 1s;
}
.header .menu_toggle_btn::after {
content: '';
position: absolute;
bottom: 6px;
left: 3px;
width: 80%;
height: 2px;
background-color: #8873EE;
transition: all ease 1s;
}
.header .menu_toggle_btn.on {
position: fixed;
right: 8% top: 30px;
}
.header .menu_toggle_btn.on::before {
content: '';
position: absolute;
top: 6px;
left: 3px;
width: 100%;
height: 2px;
background-color: white;
transform: rotate(-45deg) translateY(9px) translateX(-6px);
}
.header .menu_toggle_btn.on span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 2px;
background-color: white;
transform: rotate(45deg) translateX(-8px) translateY(6px);
}
.header .menu_toggle_btn.on::after {
content: '';
position: absolute;
bottom: 6px;
left: 3px;
width: 80%;
height: 2px;
background-color: white;
display: none;
}
진짜 남에게 pr할 수 있는 포트폴리오 홈페이지를 만들자고 생각하고 진행했던 것이기 때문에
앞으로 진행하는 프로젝트를 추가하고 디벨롭할 예정이다.