-
Notifications
You must be signed in to change notification settings - Fork 9
Add modal for lookbook #21
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,39 @@ h1 { | |
| object-fit: cover; | ||
| } | ||
|
|
||
|
|
||
| .lightbox-hidden { | ||
| display: flex; | ||
| width: 100%; | ||
| height: 100%; | ||
| position: fixed; | ||
| background-color: rgba(0, 0, 0, 0.8); | ||
| /*background-color: $offblack;*/ | ||
| top: -100vh; | ||
| transition: .5s ease; | ||
| /*opacity: 0.8;*/ | ||
| z-index: 1; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix indentation |
||
| } | ||
|
|
||
| .lightbox { | ||
| transform: translate(0, 100vh); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it necessary that the lightbox slide down? i think having it fade in with a transition on the opacity style would be nice / less jarring maybe? |
||
| transition: .5s ease; | ||
| } | ||
|
|
||
| .modal-contain { | ||
| display: flex; | ||
| margin: auto auto; | ||
| width: 90vw; | ||
| height: 90vh; | ||
| } | ||
|
|
||
| .modal-img{ | ||
| width: 100%; | ||
| object-fit: contain; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this dark magic
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| } | ||
|
|
||
|
|
||
|
|
||
| .nametag { | ||
| min-width: 0; | ||
| color: $offwhite; | ||
|
|
@@ -87,3 +120,5 @@ h1 { | |
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| $(document).ready(function() { | ||
| $(".img-block").click(function() { | ||
| $(".lightbox-hidden").addClass("lightbox"); | ||
| var src = $(this).attr("src"); | ||
| $(".modal-img").attr("src", src); | ||
| // scrollLock(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deleteme |
||
| }); | ||
| $("#modal").click(function() { | ||
| $("#modal").removeClass("lightbox"); | ||
| // scrollLock(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deleteme |
||
| }); | ||
| }); | ||
|
|
||
|
|
||
| // var locked = false; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deleteme? |
||
|
|
||
| // function scrollLock() { | ||
| // if (locked) { | ||
| // $('body').css( 'overflow', 'visible' ); | ||
| // locked = false; | ||
| // } | ||
| // else { | ||
| // $('body').css( 'overflow', 'hidden' ); | ||
| // locked = true; | ||
| // } | ||
| // }; | ||
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.
you could do
here I think
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.
Nah. I did that at first, but then it makes the entire div 80% opacity, not just the bg.