Skip to content

Commit 107d84d

Browse files
committed
Reorganization
1 parent b3a7379 commit 107d84d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+273
-80
lines changed

Gruntfile.js

-49
This file was deleted.

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
## Documentation
22

33
Install using NPM:
4-
`npm install --save captionjs`
4+
5+
```js
6+
npm install --save captionjs
7+
```
58

69
Below is the basic setup for caption.js. For more info, please see [captionjs.com](http://captionjs.com).
710

captionjs.min.css

-1
This file was deleted.

dist/captionjs.css

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.captionjs{line-height:0}
2+
.captionjs figcaption{line-height:1;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:100%}
3+
.captionjs.animated,.captionjs.hide,.captionjs.stacked{position:relative;overflow:hidden}
4+
.captionjs.animated figcaption,.captionjs.hide figcaption,.captionjs.stacked figcaption{position:absolute}
5+
.captionjs.stacked figcaption{bottom:0}
6+
.captionjs.animated figcaption{-webkit-transition:.25s bottom;transition:.25s bottom}
7+
.captionjs.animated:hover figcaption{bottom:0!important}
8+
.captionjs.hide figcaption{-webkit-transition:.25s margin-bottom;transition:.25s margin-bottom}
9+
.captionjs.hide:hover figcaption{margin-bottom:0!important}

dist/captionjs.min.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

dist/jquery.caption.min.js

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
var gulp = require('gulp'),
2+
jshint = require('gulp-jshint'),
3+
uglify = require('gulp-uglify'),
4+
concat = require('gulp-concat'),
5+
autoprefixer = require('gulp-autoprefixer'),
6+
clean = require('gulp-clean-css');
7+
8+
gulp.task('css', function () {
9+
return gulp
10+
.src('src/main.css')
11+
.pipe(autoprefixer())
12+
.pipe(clean({
13+
compatibility: 'ie8',
14+
processImport: true,
15+
keepBreaks: true
16+
// level: 0,
17+
// format: {
18+
// breaks: {
19+
// afterAtRule: false, // controls if a line break comes after an at-rule; e.g. `@charset`; defaults to `false`
20+
// afterBlockBegins: true, // controls if a line break comes after a block begins; e.g. `@media`; defaults to `false`
21+
// afterBlockEnds: true, // controls if a line break comes after a block ends, defaults to `false`
22+
// afterComment: true, // controls if a line break comes after a comment; defaults to `false`
23+
// afterProperty: true, // controls if a line break comes after a property; defaults to `false`
24+
// afterRuleBegins: false, // controls if a line break comes after a rule begins; defaults to `false`
25+
// afterRuleEnds: true, // controls if a line break comes after a rule ends; defaults to `false`
26+
// beforeBlockEnds: true, // controls if a line break comes before a block ends; defaults to `false`
27+
// betweenSelectors: true // controls if a line break comes between selectors; defaults to `false`
28+
// },
29+
// indentBy: 4,
30+
// spaces: {
31+
// aroundSelectorRelation: true,
32+
// beforeBlockBegins: true,
33+
// beforeValue: true
34+
// }
35+
// }
36+
}))
37+
.pipe(concat('captionjs.css'))
38+
.pipe(gulp.dest('dist/'))
39+
.pipe(clean({
40+
compatibility: 'ie8',
41+
processImport: true,
42+
keepBreaks: false
43+
}))
44+
.pipe(concat('captionjs.min.css'))
45+
.pipe(gulp.dest('dist/'));
46+
});
47+
48+
gulp.task('js', ['jshint'], function () {
49+
return gulp
50+
.src('src/main.js')
51+
.pipe(concat('jquery.caption.js'))
52+
.pipe(gulp.dest('dist/'))
53+
.pipe(uglify({preserveComments: 'license'}))
54+
.pipe(concat('jquery.caption.min.js'))
55+
.pipe(gulp.dest('dist/'));
56+
});
57+
58+
gulp.task('jshint', function () {
59+
return gulp
60+
.src('src/main.js')
61+
.pipe(jshint())
62+
.pipe(jshint.reporter('jshint-stylish'))
63+
.pipe(jshint.reporter('fail'));
64+
});
65+
66+
gulp.task('watch', ['css', 'js'], function () {
67+
gulp.watch('src/main.css', ['css']);
68+
gulp.watch('src/main.js', ['js']);
69+
});
70+
71+
gulp.task('default', ['css', 'js']);

index.html

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
<meta charset="utf-8"/>
55
<title>caption.js | Easily and semantically add captions to images</title>
66
<meta name="description" content="An open-source jQuery plugin to easily and semantically add captions to images."/>
7-
<link rel="icon" type="image/png" href="site/favicon.png"/>
7+
<link rel="icon" type="image/png" href="web/favicon.png"/>
88
<!--[if IE]><script src="//html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script><![endif]-->
99
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic|Abril+Fatface"/>
10-
<link rel="stylesheet" href="site/scripts/syntaxhighlighter/styles/shCore.css"/>
11-
<link rel="stylesheet" href="site/scripts/syntaxhighlighter/styles/shThemeDefault.css"/>
12-
<link rel="stylesheet" href="site/styles/main.css"/>
10+
<link rel="stylesheet" href="web/scripts/syntaxhighlighter/styles/shCore.css"/>
11+
<link rel="stylesheet" href="web/scripts/syntaxhighlighter/styles/shThemeDefault.css"/>
12+
<link rel="stylesheet" href="web/styles/main.css"/>
1313
<script type="text/javascript">document.documentElement.className+='js';</script>
1414
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
15-
<script src="site/scripts/jquery.lettering.js" type="text/javascript"></script>
16-
<script src="site/scripts/syntaxhighlighter/scripts/shCore.min.js" type="text/javascript"></script>
17-
<script src="site/scripts/syntaxhighlighter/scripts/shAutoloader.js" type="text/javascript"></script>
18-
<script src="site/scripts/jquery.scrollTo-1.4.3.1-min.js" type="text/javascript"></script>
19-
<script src="site/scripts/jquery.localscroll-1.2.7-min.js" type="text/javascript"></script>
20-
<script src="jquery.caption.js" type="text/javascript"></script>
21-
<script src="site/scripts/main.js" type="text/javascript"></script>
15+
<script src="web/scripts/jquery.lettering.js" type="text/javascript"></script>
16+
<script src="web/scripts/syntaxhighlighter/scripts/shCore.min.js" type="text/javascript"></script>
17+
<script src="web/scripts/syntaxhighlighter/scripts/shAutoloader.js" type="text/javascript"></script>
18+
<script src="web/scripts/jquery.scrollTo-1.4.3.1-min.js" type="text/javascript"></script>
19+
<script src="web/scripts/jquery.localscroll-1.2.7-min.js" type="text/javascript"></script>
20+
<script src="dist/jquery.caption.js" type="text/javascript"></script>
21+
<script src="web/scripts/main.js" type="text/javascript"></script>
2222

2323

2424

2525
<!--///////////////////////////// Required CSS /////////////////////////////-->
26-
<link rel="stylesheet" href="captionjs.css"/>
26+
<link rel="stylesheet" href="dist/captionjs.css"/>
2727

2828
<!--///////////////////////////// Sample CSS /////////////////////////////-->
2929
<style>
@@ -165,7 +165,7 @@ <h2><a id="examples">Examples</a></h2>
165165
<p>If you&rsquo;re using caption.js in a responsive setting, be sure to enable the <code>is_responsive</code> setting, and make sure your original image is wrapped in a responsive container (in other words, the direct parent container should be responsive, or have a variable width). See below for an example.</p>
166166
</div>
167167
<div style="width: 100%">
168-
<img id="example-5" class="caption" src="site/img/Evening_Return-wide.jpg" alt="View of Koh Phi Phi Leh at sunset during the return trip home."/>
168+
<img id="example-5" class="caption" src="web/img/Evening_Return-wide.jpg" alt="View of Koh Phi Phi Leh at sunset during the return trip home."/>
169169
</div>
170170
<div class="wrapper">
171171
<h2><a id="contribute">Contribute</a></h2>

jquery.caption.min.js

-12
This file was deleted.

package.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
"url": "https://github.com/ericmagnuson/captionjs.git"
1010
},
1111
"devDependencies": {
12-
"grunt-contrib-cssmin": "~0.9.0",
13-
"grunt-contrib-uglify": "~0.4.0",
14-
"grunt-contrib-jshint": "~0.10.0",
15-
"grunt": "~0.4.4"
12+
"gulp": "^3.9.1",
13+
"gulp-autoprefixer": "^3.1.1",
14+
"gulp-clean-css": "^2.3.2",
15+
"gulp-concat": "^2.6.0",
16+
"gulp-jshint": "^2.0.0",
17+
"gulp-uglify": "^1.5.3",
18+
"jshint": "^2.9.1",
19+
"jshint-stylish": "^2.1.0"
1620
}
1721
}

captionjs.css src/main.css

File renamed without changes.

0 commit comments

Comments
 (0)