Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3주차] velog 클론코딩 (JS) #2

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 191 additions & 0 deletions index.html

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

web 파트 한승연입니다! 저도 드롭박스 클릭 할 때 리스트가 기존 포스팅들을 밀어버려서 재현님이 어려웠다고 올리신 점에 공감이 되었습니다 ㅜㅜ

Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script defer src="main1.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css" />
<script src="https://kit.fontawesome.com/688ec50e73.js" crossorigin="anonymous"></script>

</head>
<body>
<header>

<h1>velog </h1>
<button><i class="fa-solid fa-magnifying-glass"></i>

</button>
<button> <i class="fa-solid fa-user"></i>
</button>
</header>
<nav>
<div class="dropdown-label">

<span ></span>
</div>
<div class="dropdown">
<button class="dropbtn">
<span class="dropbtn_icon"></span>
<span class="dropbtn_content">오늘</span>
<span class="dropbtn_click" style="font-family: Material Icons; font-size : 16px; color : #3b3b3b; float:right;"
onclick="dropdown()">arrow_drop_down</span>
</button>
<div class="dropdown-content">
<span class="dropdown_click"></span>
<div class="date" onclick="showMenu(this.innerText)">오늘</div>
<div class="date" onclick="showMenu(this.innerText)">이번주</div>
<div class="date" onclick="showMenu(this.innerText)">이번달</div>
<div class="date" onclick="showMenu(this.innerText)">올해</div>

</div>
</div>
</nav>
<main>
<article>
<ul>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</ul>
<ul>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
</ul>
<ul>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
<div class = "posting-card">
<img id="image" src = "캡처3.PNG">
<div class = "box">
<div class = "text-box">
<p id="title">프론트엔드 개발자의 끝? V0.dev 사용법</p>
<p id="content">프론트엔드 개발자의 일자리를 위협하는 V0의 등장</p>
</div>
</div>
</div>
</ul>

</article>

</main>
</body>
</html>
50 changes: 50 additions & 0 deletions main1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
window.onload=()=>{
document.querySelector('.dropbtn_click').onclick = ()=>{
dropdown();
}
document.getElementsByClassName('date').onclick = ()=>{
showMenu(value);
};
dropdown = () => {
var v = document.querySelector('.dropdown-content');
var dropbtn = document.querySelector('.dropbtn')
v.classList.toggle('show');
dropbtn.style.borderColor = 'rgb(94, 94, 94)';
}

showMenu=(value)=>{
var dropbtn_icon = document.querySelector('.dropbtn_icon');
var dropbtn_content = document.querySelector('.dropbtn_content');
var dropbtn_click = document.querySelector('.dropbtn_click');
var dropbtn = document.querySelector('.dropbtn');

dropbtn_icon.innerText = '';
dropbtn_content.innerText = value;

dropbtn.style.borderColor = '#3992a8';

}
window.onclick= (e)=>{
if(!e.target.matches('.dropbtn_click')){
var dropdowns = document.getElementsByClassName("dropdown-content");

var dropbtn_icon = document.querySelector('.dropbtn_icon');
var dropbtn_content = document.querySelector('.dropbtn_content');
var dropbtn_click = document.querySelector('.dropbtn_click');
var dropbtn = document.querySelector('.dropbtn');


var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}



}
}

1 change: 1 addition & 0 deletions parkJaeHyun
Submodule parkJaeHyun added at d9e77b
151 changes: 151 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@

@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
button{
margin: 10px;
font-size: 20px;
background-color: white;
position :relative;
top:-60px;
border: 0;
left: 1500px;
flex-direction: row;
justify-content: flex-end;
}

i:hover{
color: palevioletred;
}

#title{
font-weight: bold
}

#content{
color: gray;
font-size:15px;

}


.posting-card{
display: flex;
flex-direction: column;
margin: 10px;
}

ul{
display: flex;
flex-direction: row;
}


.posting-card:hover{
filter: brightness(0.8);

}


.box{
width: 300px;
height: 180px;
background:white;
border: 1px solid lightgray ;
}



#image{
width: 300px;
height:170px;
}
h1{
position: relative;
left:4%;
top:1px;
}

.dropdown-label{
font-size : 12px;
margin : 10px;
font-weight : bold;
color : rgb(50, 50, 50);
}

.dropdown{
position : relative;
display : inline-block;
}

.dropbtn_icon{
font-family : 'Material Icons';
}
.dropbtn{
display : block;
border : 2px solid rgb(94, 94, 94);
border-radius : 4px;
background-color: #fcfcfc;
font-weight: 400;
color : rgb(124, 124, 124);
padding : 12px;
width :240px;
text-align: left;
cursor : pointer;
font-size : 12px;
z-index :1;
position : relative;
left:50px;
}
.dropdown-content{
display : none;
font-weight: 400;
background-color: #fcfcfc;
min-width : 240px;
border-radius: 8px;
height : 160px;
overflow : scroll;
box-shadow: 0px 0px 10px 3px rgba(190, 190, 190, 0.6);
}
.dropdown-content::-webkit-scrollbar{
width : 5px;
height : 10px;
}
.dropdown-content::-webkit-scrollbar-thumb{
border-radius : 2px;
background-color :rgb(194, 194, 194)
}

.dropdown-content div{
display : flex;
text-decoration : none;
color : black;
font-size: 12px;
padding : 12px 20px;
}
.dropdown-content div:hover{
background-color:lightgrey;
}

.fastfood div :visited{
color: blueviolet;
}

.dropdown-content.show{
display : block;
position: relative;
left:50px;
top:-40px;
}

.date{

border: 0.1px solid;

display: flex;
align-items: center;
justify-content: center;

}

.clicked {
color: gold;
}
Binary file added 캡처3.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.