Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
26 changes: 26 additions & 0 deletions css/compiled/lookbook.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,32 @@ h1 {
.cover {
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; }

.lightbox {
transform: translate(0, 100vh);
transition: .5s ease; }

.modal-contain {
display: flex;
margin: auto auto;
width: 90vw;
height: 90vh; }

.modal-img {
width: 100%;
object-fit: contain; }

.nametag {
min-width: 0;
color: #fEfefd;
Expand Down
35 changes: 35 additions & 0 deletions css/lookbook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;*/
Copy link
Contributor

Choose a reason for hiding this comment

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

you could do

background-color: $offblack;
opacity: 0.8;

here I think

Copy link
Contributor Author

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.

top: -100vh;
transition: .5s ease;
/*opacity: 0.8;*/
z-index: 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

fix indentation

}

.lightbox {
transform: translate(0, 100vh);
Copy link
Contributor

Choose a reason for hiding this comment

The 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;
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this dark magic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same

}



.nametag {
min-width: 0;
color: $offwhite;
Expand Down Expand Up @@ -87,3 +120,5 @@ h1 {
}




30 changes: 20 additions & 10 deletions html/lookbook.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/compiled/lookbook.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="../script/modal.js"></script>
</head>

<body>

<div id="modal" class="lightbox-hidden">
<div class="modal-contain">
<img class="modal-img"></img>
</div>
</div>

<div id="main">

<div class="desc">
<!-- <h1>Title</h1> -->
<span class="date">March 2016</span><span class="words"> / InnoDxRetreat</span>
<!-- <div>Wow, what a cool description.</div> -->
</div>
<div class="photoblock">
<img src="../img/1.jpg" class="cover block">
<img src="../img/1.jpg" class="cover block img-block">
<div class="block nametag">
<div class="namee">
<span class="wot">designed by<br></span>
<span class="woo">somebody's name</span>
</div>
</div>
<img src="../img/2.jpg" class="cover block">
<img src="../img/3.jpg" class="cover block">
<img src="../img/4.jpg" class="cover block">
<img src="../img/3.jpg" class="cover block">
<img src="../img/2.jpg" class="cover block img-block">
<img src="../img/2.jpg" class="cover block img-block">
<img src="../img/3.jpg" class="cover block img-block">
<img src="../img/4.jpg" class="cover block img-block">
<img src="../img/3.jpg" class="cover block img-block">
<img src="../img/2.jpg" class="cover block img-block">
</div>

<div class="photoblock">
<img src="../img/4.jpg" class="cover block">
<img src="../img/1.jpg" class="cover block">
<img src="../img/5.jpg" class="cover block">
<img src="../img/4.jpg" class="cover block img-block">
<img src="../img/1.jpg" class="cover block img-block">
<img src="../img/2.jpg" class="cover block img-block">
<img src="../img/5.jpg" class="cover block img-block">
<div class="block nametag">
<div class="namee">
<span class="wot">from<br></span>
Expand Down
26 changes: 26 additions & 0 deletions script/modal.js
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();
Copy link
Contributor

Choose a reason for hiding this comment

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

deleteme

});
$("#modal").click(function() {
$("#modal").removeClass("lightbox");
// scrollLock();
Copy link
Contributor

Choose a reason for hiding this comment

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

deleteme

});
});


// var locked = false;
Copy link
Contributor

Choose a reason for hiding this comment

The 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;
// }
// };