-
Notifications
You must be signed in to change notification settings - Fork 0
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
JaeHyun137
wants to merge
7
commits into
main
Choose a base branch
from
week3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5a2cb0a
initial commit : 벨로그 클론코딩
JaeHyun137 4f91986
feat : dropdown 구현
JaeHyun137 c764330
feat : 카드 클릭시 이미지 원본이 나오는 모달창 구현
JaeHyun137 e63a2f5
feat
JaeHyun137 f7487f1
feat : 새 글 작성 아이콘 클릭시 연결되는 태그 추가/삭제 페이지 구현
JaeHyun137 1f02963
chore : modal창 이미지 변경 + 포스팅 수 늘림
JaeHyun137 59fae14
feat : 메뉴 클릭 시 글자색 변화 구현
JaeHyun137 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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> |
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,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'); | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
} | ||
} | ||
|
Submodule parkJaeHyun
added at
d9e77b
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,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; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
web 파트 한승연입니다! 저도 드롭박스 클릭 할 때 리스트가 기존 포스팅들을 밀어버려서 재현님이 어려웠다고 올리신 점에 공감이 되었습니다 ㅜㅜ