-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
1,179 additions
and
1,115 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,159 @@ | ||
module.exports = function (grunt) { | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
uglify: { | ||
files: { | ||
src: 'abigimage.jquery.js', | ||
dest: 'abigimage.jquery.min.js' | ||
} | ||
}, | ||
|
||
cssmin: { | ||
files: { | ||
src: 'abigimage.jquery.css', | ||
dest: 'abigimage.jquery.min.css' | ||
} | ||
}, | ||
|
||
usebanner: { | ||
options: { | ||
position: 'top', | ||
banner: '/*! <%= pkg.name %> v<%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) */\n', | ||
linebreak: false | ||
}, | ||
files: { | ||
src: [ | ||
'abigimage.jquery.min.js', | ||
'abigimage.jquery.min.css' | ||
] | ||
} | ||
}, | ||
|
||
file_info: { | ||
source_files: { | ||
src: [ | ||
'abigimage.jquery.js', | ||
'abigimage.jquery.min.js', | ||
'abigimage.jquery.css', | ||
'abigimage.jquery.min.css' | ||
], | ||
options: { | ||
stdout: false, | ||
inject: { | ||
dest: 'README.md', | ||
text: '* [abigimage.jquery.js](abigimage.jquery.js) ' + | ||
'({{= sizeText(size(src[0])) }}) ' + | ||
'[min](abigimage.jquery.min.js) ' + | ||
'({{= sizeText(size(src[1])) }}, gzipped {{= sizeText(gzipSize(src[1])) }})' + | ||
'\n* [abigimage.jquery.css](abigimage.jquery.css) ' + | ||
'({{= sizeText(size(src[2])) }}) ' + | ||
'[min](abigimage.jquery.min.css) ' + | ||
'({{= sizeText(size(src[3])) }}, gzipped {{= sizeText(gzipSize(src[3])) }})' | ||
} | ||
} | ||
} | ||
}, | ||
|
||
replace: { | ||
readme: { | ||
options: { | ||
patterns: [ | ||
{ | ||
match: /version \*\*.*\*\* \(.*\)/, | ||
replacement: 'version **<%= pkg.version %>** (<%= grunt.template.today("yyyy-mm-dd") %>)' | ||
} | ||
] | ||
}, | ||
files: [ | ||
{ | ||
src: 'README.md', | ||
dest: 'README.md' | ||
} | ||
] | ||
}, | ||
example: { | ||
options: { | ||
patterns: [ | ||
{ | ||
match: /<!-- Example -->/, | ||
replacement: '<%= grunt.file.read("tpl/example.tpl.html") %>' | ||
} | ||
] | ||
}, | ||
files: [ | ||
{ | ||
src: 'index.html', | ||
dest: 'index.html' | ||
} | ||
] | ||
} | ||
}, | ||
|
||
markdown: { | ||
index: { | ||
options: { | ||
template: 'tpl/index.tpl.html', | ||
markdownOptions: { | ||
gfm: true, | ||
highlight: 'manual', | ||
langPrefix: 'hljs lang-' | ||
} | ||
}, | ||
files: [ | ||
{ | ||
src: 'README.md', | ||
dest: 'index.html' | ||
} | ||
] | ||
} | ||
}, | ||
|
||
clean: [ | ||
"abigimage.jquery.min.js.gz" | ||
], | ||
|
||
bump: { | ||
options: { | ||
pushTo: 'origin', | ||
commitFiles: ['.'], | ||
updateConfigs: ['pkg'] | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-file-info'); | ||
grunt.loadNpmTasks('grunt-replace'); | ||
grunt.loadNpmTasks('grunt-markdown'); | ||
grunt.loadNpmTasks('grunt-bump'); | ||
grunt.loadNpmTasks('grunt-npm'); | ||
grunt.loadNpmTasks('grunt-banner'); | ||
|
||
grunt.registerTask('default', [ | ||
'bump-only:prerelease', | ||
'build' | ||
]); | ||
|
||
grunt.registerTask('build', [ | ||
'uglify', | ||
'cssmin', | ||
'usebanner', | ||
'file_info', | ||
'replace:readme', | ||
'markdown', | ||
'replace:example', | ||
'clean' | ||
]); | ||
|
||
grunt.registerTask('release', function (type) { | ||
grunt.task.run('bump-only:' + (type || 'patch')); | ||
grunt.task.run('build'); | ||
grunt.task.run('bump-commit'); | ||
grunt.task.run('npm-publish'); | ||
}); | ||
|
||
}; |
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
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,152 @@ | ||
/** | ||
* http://aeqdev.com/tools/js/abigimage/ | ||
* | ||
* MIT License | ||
* | ||
* Copyright (c) 2014-2016 Maksim Krylosov <aequiternus@gmail.com> | ||
*/ | ||
|
||
.abigimage-overlay { | ||
position: fixed; | ||
z-index: 100; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
background-color: #000; | ||
border: 1px solid #000; /* android chrome fix O_o */ | ||
opacity: .9; | ||
} | ||
|
||
.abigimage-layout { | ||
position: fixed; | ||
z-index: 100; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
user-select: none; | ||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
line-height: 2.5; | ||
} | ||
|
||
.abigimage-prevBtnBox { | ||
cursor: pointer; | ||
position: absolute; | ||
top: 0; | ||
right: 50%; | ||
bottom: 0; | ||
left: 0; | ||
} | ||
|
||
.abigimage-closeBtnBox { | ||
cursor: pointer; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 50%; | ||
} | ||
|
||
.abigimage-prevBtn { | ||
color: #fff; | ||
background-color: #000; | ||
opacity: .5; | ||
padding: 0 1em; | ||
border-radius: 0 0 1ex 0; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
transition: all .2s ease-in-out; | ||
} | ||
|
||
.abigimage-closeBtn { | ||
color: #fff; | ||
background-color: #000; | ||
opacity: .5; | ||
padding: 0 1em; | ||
border-radius: 0 0 0 1ex; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
transition: all .2s ease-in-out; | ||
} | ||
|
||
.abigimage-prevBtn:hover, .abigimage-prevBtn-hover, | ||
.abigimage-closeBtn:hover, .abigimage-closeBtn-hover { | ||
opacity: 1; | ||
} | ||
|
||
.abigimage-box { | ||
position: absolute; | ||
width: 312.5%; | ||
height: 100%; | ||
left: -106.25%; | ||
top: 0; | ||
} | ||
|
||
.abigimage-box-zoom { | ||
z-index: 101; | ||
} | ||
|
||
.abigimage-img { | ||
position: absolute; | ||
margin: auto; | ||
width: auto; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
display: block; | ||
cursor: pointer; | ||
max-width: 32%; | ||
max-height: 100%; | ||
} | ||
|
||
.abigimage-imgNext { | ||
position: absolute; | ||
margin: auto; | ||
width: auto; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 68%; | ||
display: block; | ||
max-width: 32%; | ||
max-height: 100%; | ||
} | ||
|
||
.abigimage-imgPrev { | ||
position: absolute; | ||
margin: auto; | ||
width: auto; | ||
top: 0; | ||
right: 68%; | ||
bottom: 0; | ||
left: 0; | ||
display: block; | ||
max-width: 32%; | ||
max-height: 100%; | ||
} | ||
|
||
.abigimage-bottom { | ||
position: fixed; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
-webkit-user-select: text; | ||
-moz-user-select: text; | ||
user-select: text; | ||
background-color: #000; | ||
color: #fff; | ||
opacity: .5; | ||
padding: 0 1em; | ||
text-align: center; | ||
transition: all .2s ease-in-out; | ||
} | ||
|
||
.abigimage-bottom:hover { | ||
opacity: 1; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,55 @@ | ||
{ | ||
"name": "jquery-abigimage", | ||
"description": "ABigImage - view big versions of images. Fit mobile devices. Uses CSS3 transform and transition for smooth touch sliding. Touch slide left or right opens next or previous image, touch slide up or down closes image. Multi-touch and double-tap zoom. Clicking image opens next one, clicking left side opens previous, clicking right side closes image. Hotkeys for next, previous and close buttons. Closing after viewing of all images. Preloading of next and previous images. Uses link's `href` or `data-href` attribute for large images. Fully customizable styles. Customizable bottom area. Customizable `onopen` and `onclose` event.", | ||
"main": "abigimage.jquery.min.js", | ||
"authors": [ | ||
"Maksim Krylosov <aequiternus@gmail.com> (http://aeqdev.com/)" | ||
], | ||
"license": "MIT", | ||
"keywords": [ | ||
"jquery-plugin", | ||
"ecosystem:jquery", | ||
"image", | ||
"picture", | ||
"photo", | ||
"view", | ||
"viewer", | ||
"big", | ||
"large", | ||
"enlarge", | ||
"zoom", | ||
"lightbox", | ||
"popup", | ||
"mobile", | ||
"desktop", | ||
"slideshow", | ||
"touch", | ||
"slide", | ||
"keyboard", | ||
"hotkey", | ||
"responsive", | ||
"html5", | ||
"jquery" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/makryl/ABigImage.git" | ||
}, | ||
"moduleType": [], | ||
"homepage": "http://aeqdev.com/tools/js/abigimage/", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"tpl", | ||
"img", | ||
"Gruntfile.js", | ||
"index.html", | ||
"package.json" | ||
], | ||
"dependencies": { | ||
"jquery": ">=1.9" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,24 @@ | ||
<h2 class="clearfix">Example</h2> | ||
|
||
<p> | ||
<a href="img/1-big.jpg"><img src="img/1-small.jpg" alt="First image"></a> | ||
<a href="img/2-big.jpg"><img src="img/2-small.jpg" alt="Second image"></a> | ||
<a href="img/3-big.jpg"><img src="img/3-small.jpg" alt="Third image"></a> | ||
<a href="img/4-big.jpg"><img src="img/4-small.jpg" alt="Fourth image"></a> | ||
</p> | ||
|
||
<p>Live example, where I'm using and testing this plugin at the moment: <a href="http://kawaiinyan.com/" target="_blank">kawaiinyan.com</a>.</p> | ||
|
||
<script src="http://code.jquery.com/jquery.min.js"></script> | ||
<script src="abigimage.jquery.min.js"></script> | ||
<link rel="stylesheet" href="abigimage.jquery.min.css"> | ||
|
||
<script> | ||
$('a[href$=".jpg"]').abigimage({ | ||
onopen: function(target) { | ||
this.bottom.html( | ||
$('img', target).attr('alt') | ||
); | ||
} | ||
}); | ||
</script> |
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,127 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>ABigImage | js | tools | aeqdev.com</title> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="ABigImage is jQuery plugin for viewing big versions of images."> | ||
<link rel="stylesheet" href="http://aeqdev.com/tools/css/default/adefault-light.min.css"> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
} | ||
|
||
.wrapper { | ||
max-width: 200mm; | ||
margin: 0 auto; | ||
} | ||
|
||
@media (min-width: 700px) { | ||
.coll { | ||
float: left; | ||
width: 50%; | ||
} | ||
|
||
.colr { | ||
float: right; | ||
width: 300px; | ||
} | ||
} | ||
|
||
.clearfix { | ||
clear: both; | ||
} | ||
|
||
/* Highlight.js */ | ||
/* Darkula color scheme from the JetBrains family of IDEs */ | ||
|
||
.hljs { | ||
display: block; | ||
overflow-x: auto; | ||
padding: 0.5em; | ||
background: #2b2b2b; | ||
} | ||
|
||
.hljs { | ||
color: #bababa; | ||
} | ||
|
||
.hljs-strong, | ||
.hljs-emphasis { | ||
color: #a8a8a2; | ||
} | ||
|
||
.hljs-bullet, | ||
.hljs-quote, | ||
.hljs-link, | ||
.hljs-number, | ||
.hljs-regexp, | ||
.hljs-literal { | ||
color: #6896ba; | ||
} | ||
|
||
.hljs-code, | ||
.hljs-selector-class { | ||
color: #a6e22e; | ||
} | ||
|
||
.hljs-emphasis { | ||
font-style: italic; | ||
} | ||
|
||
.hljs-keyword, | ||
.hljs-selector-tag, | ||
.hljs-section, | ||
.hljs-attribute, | ||
.hljs-name, | ||
.hljs-variable { | ||
color: #cb7832; | ||
} | ||
|
||
.hljs-params { | ||
color: #b9b9b9; | ||
} | ||
|
||
.hljs-string, | ||
.hljs-subst, | ||
.hljs-type, | ||
.hljs-built_in, | ||
.hljs-builtin-name, | ||
.hljs-symbol, | ||
.hljs-selector-id, | ||
.hljs-selector-attr, | ||
.hljs-selector-pseudo, | ||
.hljs-template-tag, | ||
.hljs-template-variable, | ||
.hljs-addition { | ||
color: #e0c46c; | ||
} | ||
|
||
.hljs-comment, | ||
.hljs-deletion, | ||
.hljs-meta { | ||
color: #7f7f7f; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="wrapper"> | ||
|
||
<%=content%> | ||
|
||
</div> | ||
|
||
<script> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
|
||
ga('create', 'UA-11259339-5', 'aeqdev.com'); | ||
ga('send', 'pageview'); | ||
</script> | ||
|
||
</body> | ||
</html> |