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
32 changes: 32 additions & 0 deletions examples/example_errors.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<head>
<title>JuxtaposeJS</title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" href="../juxtapose/css/juxtapose.css">
<link rel="icon" type="image/x-icon" href="http://blueline.knightlab.com/assets/logos/favicon.ico" />

<style>
.juxtapose {
max-width: 600px;
}
.jx-slider {
margin-top: 1em;
}
</style>
</head>
<body>

<img src="google.com" alt="">

<div class="juxtapose">
<img src="http://placekitten.com/500/300" data-label="Cat" alt="A cat" />
<img src="http://placebear.com/500/300" data-label="Bear" alt="A bear"/>
</div>

<h1>with errors</h1>
<div class="juxtapose">
<img src="http://google.com" data-label="Cat" alt="A cat" />
<img src="http://placebear.com/500/300" data-label="Bear" alt="A bear"/>
</div>
<script src='../juxtapose/js/juxtapose.js'></script>
</body>
42 changes: 36 additions & 6 deletions juxtapose/css/juxtapose.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ div.jx-slider {
cursor: pointer;
}


div.jx-handle {
position: absolute;
height: 100%;
Expand All @@ -26,7 +25,7 @@ div.jx-arrow {
}

div.jx-controller {
// box-shadow:
// box-shadow:
// 0 4px 0px 0px #f3f3f3,
// 0 -4px 0px 0px #f3f3f3,
// 0px 0px 4px 1px rgba(0,0,0,0.3),
Expand Down Expand Up @@ -82,7 +81,7 @@ div.jx-arrow {
position: absolute;
margin: auto;
top: 0;
bottom: 0;
bottom: 0;
width: 0;
height: 0;
transition: all .2s ease;
Expand All @@ -92,7 +91,7 @@ div.jx-arrow {
position: absolute;
margin: 0 auto;
left: 0;
right: 0;
right: 0;
width: 0;
height: 0;
transition: all .2s ease;
Expand Down Expand Up @@ -135,7 +134,7 @@ div.jx-handle:active div.jx-arrow.jx-left {
left: -1px;
}

div.jx-handle:hover div.jx-arrow.jx-right,
div.jx-handle:hover div.jx-arrow.jx-right,
div.jx-handle:active div.jx-arrow.jx-right {
right: -1px;
}
Expand All @@ -146,7 +145,7 @@ div.jx-handle:active div.jx-arrow.jx-right {
top: 0px;
}

.vertical div.jx-handle:hover div.jx-arrow.jx-right,
.vertical div.jx-handle:hover div.jx-arrow.jx-right,
.vertical div.jx-handle:active div.jx-arrow.jx-right {
right: 0px;
bottom: 0px;
Expand Down Expand Up @@ -350,3 +349,34 @@ a.jx-knightlab:focus span.juxtapose-name{
color: #000;
border: none;
}

/* Error */
div.jx-error {
display: table;
background-color: #ddd;
cursor: default;
}
div.jx-error-notice {
display: table-cell;
vertical-align: middle;
padding: 35px;
}

p.jx-error-text,
a.jx-error-link {
max-width: 400px;
margin: 0 auto;
display: block;
text-align: center;
}

p.jx-error-text {
color: #147693;
font-weight: bold;
}

a.jx-error-link {
margin-top: 1em;
font-size: .875em;
color: #c34528;
}
Loading