Skip to content

Commit

Permalink
PICK TWO
Browse files Browse the repository at this point in the history
  • Loading branch information
jschairb committed Jun 17, 2014
1 parent fe32865 commit a07a7af
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions _data/categories.yaml
Expand Up @@ -41,6 +41,7 @@ Frustration:
- we-aint-found
Gloom:
- norbit-uncomfortable
- pick-two
Horror:
- flaming-bear
- jesse-disbelief
Expand Down
3 changes: 3 additions & 0 deletions _data/images.yaml
Expand Up @@ -88,6 +88,9 @@ osu-fans-boohoo:
outkast-dancing:
file: outkast-dancing.gif
name: So Fresh, So Clean
pick-two:
file: pick-two.jpg
name: Pick Two
playtime-s-over:
file: playtime-s-over.gif
name: "Playtime's Over"
Expand Down
9 changes: 9 additions & 0 deletions css/main.css
Expand Up @@ -173,3 +173,12 @@ ul, .post ul, .post ol {
.post pre.terminal code {
background-color: #333;
}

#imgPreviewWithStyles {
background: #222;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
padding: 15px;
z-index: 999;
border: none;
}
Binary file added images/pick-two.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions js/main.js
@@ -0,0 +1,71 @@
// $('ul#images a').imgPreview({
// containerID: 'imgPreviewWithStyles',
// imgCSS: {
// // Limit preview size:
// height: 200
// },
// // When container is shown:
// onShow: function(link){
// // Animate link:
// $(link).stop().animate({opacity:0.4});
// // Reset image:
// $('img', this).stop().css({opacity:0});
// },
// // When image has loaded:
// onLoad: function(){
// // Animate image
// $(this).animate({opacity:1}, 300);
// },
// // When container hides:
// onHide: function(link){
// // Animate link:
// $(link).stop().animate({opacity:1});
// }
// });

/*
* Image preview script
* powered by jQuery (http://www.jquery.com)
*
* written by Alen Grakalic (http://cssglobe.com)
*
* for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
*
*/

this.imagePreview = function(){
/* CONFIG */

xOffset = 10;
yOffset = 30;

// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result

/* END CONFIG */
$("a.preview").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "<br/>" + this.t : "";
$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");
$("#preview")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
$("#preview").remove();
});
$("a.preview").mousemove(function(e){
$("#preview")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
};


// starting the script on page load
$(document).ready(function(){
imagePreview();
});

0 comments on commit a07a7af

Please sign in to comment.