forked from devtheorem/cropt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make this a simple static site like it always should have been
- Loading branch information
1 parent
fc2a8da
commit cb878d4
Showing
11 changed files
with
388 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.imagecropper-container { | ||
padding: 30px; | ||
} | ||
.imagecropper-container .ic-image { | ||
z-index: -1; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
transform-origin: 0 0; | ||
} | ||
|
||
.imagecropper-container .ic-boundary { | ||
position: relative; | ||
overflow: hidden; | ||
margin: 0 auto; | ||
} | ||
|
||
.imagecropper-container .ic-viewport { | ||
position: absolute; | ||
border: 2px solid #fff; | ||
margin: auto; | ||
top: 0; | ||
bottom: 0; | ||
right: 0; | ||
left: 0; | ||
box-shadow:0 0 0 1000px rgba(0, 0, 0, 0.5); | ||
z-index: 0; | ||
} | ||
.imagecropper-container .ic-overlay { | ||
z-index: 1; | ||
position: absolute; | ||
cursor: move; | ||
} | ||
.imagecropper-container .ic-slider { | ||
width: 300px; | ||
margin: 0 auto; | ||
margin-top: 25px; | ||
} | ||
.imagecropper-result { | ||
position: relative; | ||
overflow: hidden; | ||
|
||
img { | ||
position: absolute; | ||
} | ||
} | ||
/* Just cross hairs for debugging - can be removed upon release */ | ||
.imagecropper-container .ic-viewport.debug:before, | ||
.imagecropper-container .ic-viewport.debug:after { | ||
background: white; | ||
width: 1px; | ||
height: 1px; | ||
content: ''; | ||
position: absolute; | ||
} | ||
.imagecropper-container .ic-viewport.debug:before { | ||
top: 0; | ||
height: 100%; | ||
left: 50%; | ||
} | ||
.imagecropper-container .ic-viewport.debug:after { | ||
top: 50%; | ||
left: 0; | ||
width: 100%; | ||
} |
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
html, | ||
body { | ||
height: 100%; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
body { | ||
font-family: 'Open Sans', sans-serif; | ||
font-size: 14px; | ||
color: #222; | ||
} | ||
|
||
nav { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
} | ||
|
||
nav a { | ||
color: white; | ||
text-decoration: none; | ||
padding: 0 10px; | ||
} | ||
.container, | ||
.section-header h3 { | ||
position: relative; | ||
max-width: 1000px; | ||
margin: 0 auto; | ||
min-width: 500px; | ||
} | ||
|
||
section.hero { | ||
height: 50vh; | ||
background: #58BC74; | ||
color: white; | ||
text-shadow: 0 1px 1px rgba(20,20,20,0.6); | ||
} | ||
.section-header { | ||
background: #4B5654; | ||
padding: 5px 0; | ||
} | ||
h3 { | ||
color: white; | ||
font-size: 23px; | ||
font-weight: 300; | ||
} | ||
|
||
/* Grid - subset */ | ||
*, *:after, *:before { | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
[class*='col-'] { | ||
float: left; | ||
padding-right: 20px; /* column-space */ | ||
} | ||
|
||
.grid { | ||
width: 100%; | ||
max-width: 1140px; | ||
min-width: 755px; | ||
margin: 0 auto; | ||
overflow: hidden; | ||
} | ||
.grid:after { | ||
content: ""; | ||
display: table; | ||
clear: both; | ||
} | ||
|
||
.col-1-2 { | ||
width: 50%; | ||
} | ||
|
||
.col-1-3 { | ||
width: 33.33%; | ||
} | ||
.col-2-3 { | ||
width: 66.66%; | ||
} | ||
.col-1-4 { | ||
width: 25%; | ||
} | ||
.col-3-4 { | ||
width: 75%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
var Demo = (function() { | ||
|
||
function output(html) { | ||
var existing = $("#result .imagecropper-result"); | ||
if (existing.length > 0) { | ||
existing.replaceWith(html); | ||
} | ||
else { | ||
$("#result").append(html); | ||
} | ||
} | ||
|
||
function init() { | ||
var dbgr = $("#dbgr"); | ||
var debug = true; | ||
dbgr.toggle(debug); | ||
var cont = $("#container").imageCropper({ | ||
viewportWidth: 150, | ||
viewportHeight: 200, | ||
debug: debug, | ||
update: function (cropper) { | ||
var data = $(this).imageCropper("get"); | ||
output($.imageCropper.generateImage(data)); | ||
|
||
// if (debug) { | ||
// var i = $(this).find(".ic-image"); | ||
// dbgr.css({ | ||
// top: i.offset().top, | ||
// left: i.offset().left, | ||
// width: i.width(), | ||
// height: i.height(), | ||
// zIndex: -1 | ||
// }); | ||
// } | ||
} | ||
}); | ||
cont.imageCropper("bind", "demo/cat.jpg"); | ||
} | ||
|
||
return { | ||
init: init | ||
}; | ||
})(); | ||
|
||
|
||
// Full version of `log` that: | ||
// * Prevents errors on console methods when no console present. | ||
// * Exposes a global 'log' function that preserves line numbering and formatting. | ||
(function () { | ||
var method; | ||
var noop = function () { }; | ||
var methods = [ | ||
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', | ||
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', | ||
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', | ||
'timeStamp', 'trace', 'warn' | ||
]; | ||
var length = methods.length; | ||
var console = (window.console = window.console || {}); | ||
|
||
while (length--) { | ||
method = methods[length]; | ||
|
||
// Only stub undefined methods. | ||
if (!console[method]) { | ||
console[method] = noop; | ||
} | ||
} | ||
|
||
|
||
if (Function.prototype.bind) { | ||
window.log = Function.prototype.bind.call(console.log, console); | ||
} | ||
else { | ||
window.log = function() { | ||
Function.prototype.apply.call(console.log, console, arguments); | ||
}; | ||
} | ||
})(); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.