Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
added zoom on big pictures; see #37
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Schulze committed May 27, 2015
1 parent b6c0400 commit e30f138
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 14 additions & 1 deletion frontend/public/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,22 @@ body.drop nav h1 {
button.button {
background-color: #555 !important; }

.drop-wrap img {
.drop-img {
height: auto;
display: inline-block; }

.drop-img:not(.upsized) {
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in;
max-width: 90%; }

.drop-img.upsized {
cursor: -webkit-zoom-out;
cursor: -moz-zoom-out;
cursor: zoom-out;
max-width: inherit; }

.drop-wrap .drop-title {
text-shadow: none;
line-height: 50px;
Expand Down
5 changes: 5 additions & 0 deletions frontend/public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
// prevent sending of the form
return false;
});

$('.drop-img').on('click', function(e) {
var $target = $(e.target);
$target.toggleClass('upsized');
});
});
})();

0 comments on commit e30f138

Please sign in to comment.