-
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
feat : 팝업 기능 구현 #26
Merged
Merged
feat : 팝업 기능 구현 #26
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
011f933
feat : 팝업 기능 구현
LeLu815 8e59c93
refacotr : css 개행제거, screen 태그 변경, z-index 값 수정
LeLu815 8557389
Merge branch 'develop' into feature/popup-cookie
LeLu815 84f766f
fix : 중복수정
LeLu815 a45fe28
feat : 충돌해결
LeLu815 95a0532
fix : 콘솔삭제, 이미지 중간 위치
LeLu815 6c1c3e2
fix: 충돌
LeLu815 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,106 @@ | ||
.popup-back { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: rgba(0, 0, 0, 0.8); | ||
z-index: 50; | ||
display: none; | ||
} | ||
|
||
.main-screen { | ||
width: 508px; | ||
height: 633px; | ||
margin: -316px 0 0 -254px; | ||
color: #fff; | ||
position: absolute; | ||
z-index: 100; | ||
left: 50%; | ||
top: 50%; | ||
border-radius: 8px; | ||
} | ||
.main-outer { | ||
width: 508px; | ||
position: relative; | ||
} | ||
.popup-close { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
z-index: 50; | ||
} | ||
|
||
.main-content { | ||
display: block; | ||
position: relative; | ||
width: 420px; | ||
height: 600px; | ||
overflow: hidden; | ||
margin: 0 auto 0 auto; | ||
} | ||
.main-content img { | ||
width: 420px; | ||
height: 600px; | ||
border-radius: 16px; | ||
} | ||
|
||
.popup-checkbox { | ||
position: relative; | ||
width: 420px; | ||
margin: 0 auto 0; | ||
} | ||
.popup-checkbox label { | ||
color: #a5a5a5; | ||
font-size: 16px; | ||
margin-top: 20px; | ||
} | ||
|
||
.popup-checkbox input[type="checkbox"] { | ||
position: absolute; | ||
width: 1px; | ||
height: 1px; | ||
padding: 0; | ||
margin: -1px; | ||
overflow: hidden; | ||
clip: rect(0, 0, 0, 0); | ||
border: 0; | ||
} | ||
.popup-checkbox input[type="checkbox"] + label { | ||
display: inline-block; | ||
position: relative; | ||
padding-left: 32px; | ||
cursor: pointer; | ||
} | ||
|
||
.popup-checkbox input[type="checkbox"] + label:before { | ||
content: ""; | ||
position: absolute; | ||
left: 0; | ||
top: -4px; | ||
width: 23px; | ||
height: 23px; | ||
text-align: center; | ||
box-sizing: border-box; | ||
border: 1px solid #a5a5a5; | ||
} | ||
|
||
.popup-checkbox input[type="checkbox"]:checked + label:after { | ||
content: ""; | ||
position: absolute; | ||
top: -4px; | ||
left: 0; | ||
width: 23px; | ||
height: 23px; | ||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAXCAYAAADgKtSgAAAAAXNSR0IArs4c6QAAAO9JREFUSA1jFA78+Z+BRoCJRuaCjR01HGvoDv5gYWTE6nAGil3ekcLMcGYaK1bTKTK8J52ZIcWLmWHlgX/UNRxkcII7M0Pfmr8MXSv/Us9wZIPblmE3GGQb1mBZUMbCMLOQmYGFGdNBxBqM0/B95/8xBNsyM8wtZkGxgBSDcRq+aPc/hvLZfxi8LZjgFpBqMMhwRnylYrInE0NnKgvDw5f/GeTFGcGRhy+MQQYiAxZkDjp77vZ/DDycfxhqopkZFu36y0CKwSCz8LocZpm4AAPDyw8wHvE01tSCrp0cg0FmEGU4umXE8kcNxxpSNA0WAAXETbeav2oDAAAAAElFTkSuQmCC) | ||
no-repeat; | ||
background-position: center center; | ||
} | ||
|
||
.popup-checkbox input[type="checkbox"] + label span { | ||
font-weight: 400; | ||
font-size: 13px; | ||
line-height: 26px; | ||
letter-spacing: -1px; | ||
color: rgba(0, 0, 0, 0.5); | ||
} |
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,41 @@ | ||
let checked = false; | ||
|
||
function setCookie(name, value, days) { | ||
let date = new Date(); | ||
date.setDate(date.getTime() + days * 24 * 60 * 60 * 1000); | ||
document.cookie = | ||
name + "=" + value + "; expires=" + date.toGMTString() + "; path=/;"; | ||
} | ||
|
||
function getCookie() { | ||
let cookiedata = document.cookie; | ||
if (cookiedata.indexOf("popupSeen=checked") < 0) { | ||
// 없으면? | ||
document.getElementById("popup_back").style.display = "block"; | ||
} else { | ||
document.getElementById("popup_back").style.display = "none"; | ||
} | ||
} | ||
|
||
function closePop() { | ||
// 7일 동안 안보기 | ||
if (checked) { | ||
setCookie("popupSeen", "checked", 7); | ||
} | ||
document.getElementById("popup_back").style.display = "none"; | ||
} | ||
|
||
// 페이지 로드 시 팝업 확인 | ||
window.onload = function () { | ||
getCookie(); | ||
}; | ||
if (document.getElementById("popup_close")) { | ||
document.getElementById("popup_close").addEventListener("click", function () { | ||
closePop(); | ||
}); | ||
} | ||
document | ||
.getElementById("popup_checkbox") | ||
.addEventListener("click", function () { | ||
checked = this.checked; | ||
}); |
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.
혹시 이 여백은 의도하신걸까용?