forked from t1m0n/air-datepicker
-
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.
- Loading branch information
0 parents
commit 44aea71
Showing
15 changed files
with
297 additions
and
0 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,2 @@ | ||
/.idea | ||
node_modules |
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,4 @@ | ||
# Datepicker plugin | ||
|
||
|
||
|
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,56 @@ | ||
/* ------------------------------------------------- | ||
Reset | ||
------------------------------------------------- */ | ||
applet, object, iframe, h1, h2, h3, h4, h5, h6, p, | ||
blockquote, pre, a, abbr, acronym, address, big, | ||
cite, code, del, dfn, em, img, ins, kbd, q, s, samp, | ||
small, strike, sub, sup, tt, var, u, i, center, dl, | ||
dt, dd, ol, ul, li, fieldset, form, label, legend, | ||
table, caption, tbody, tfoot, thead, tr, th, td, | ||
article, aside, canvas, details, embed, figure, figcaption, | ||
footer, header, menu, nav, output, ruby, section, | ||
summary, time, mark, audio, video { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font: inherit; | ||
vertical-align: baseline; } | ||
|
||
body { | ||
margin: 0; } | ||
|
||
html, body { | ||
width: 100%; | ||
height: 100%; } | ||
|
||
* { | ||
box-sizing: border-box; } | ||
|
||
*:after, *:before { | ||
box-sizing: border-box; } | ||
|
||
article, | ||
aside, | ||
details, | ||
figcaption, | ||
figure, | ||
footer, | ||
header, | ||
main, | ||
menu, | ||
nav, | ||
section, | ||
summary { | ||
display: block; } | ||
|
||
b, strong { | ||
font-weight: bold; } | ||
|
||
i { | ||
font-style: italic; } | ||
|
||
a { | ||
outline: none; } | ||
|
||
textarea { | ||
overflow: auto; } |
Empty file.
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,36 @@ | ||
;(function () { | ||
var pluginName = 'datepicker'; | ||
|
||
function Datepicker () { | ||
|
||
} | ||
|
||
Datepicker.prototype = { | ||
init: function () { | ||
|
||
} | ||
}; | ||
|
||
|
||
$.fn[pluginName] = function ( options ) { | ||
if (Datepicker.prototype[options]) { | ||
Datepicker.prototype[options].apply(this.data(pluginName), Array.prototype.slice.call(arguments, 1)); | ||
} else { | ||
return this.each(function () { | ||
if (!$.data(this, pluginName)) { | ||
$.data(this, pluginName, | ||
new Datepicker( this, options )); | ||
} else { | ||
var _this = $.data(this, pluginName), | ||
oldOpts = _this.opts; | ||
|
||
_this.opts = $.extend({}, oldOpts, options); | ||
} | ||
}); | ||
} | ||
}; | ||
|
||
})(); | ||
Datepicker.Cell = function () { | ||
|
||
}; |
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,48 @@ | ||
var gulp = require('gulp'), | ||
watch = require('gulp-watch'), | ||
rename = require('gulp-rename'), | ||
sass = require('gulp-sass'), | ||
livereload = require('gulp-livereload'), | ||
concat = require('gulp-concat'); | ||
|
||
gulp.task('js', function () { | ||
gulp.src(['js/datepicker/datepicker.js', 'js/datepicker/cell.js']) | ||
.pipe(concat('datepicker.js')) | ||
.pipe(gulp.dest('dist/js/')) | ||
.pipe(livereload()) | ||
}); | ||
|
||
gulp.task('sass', function () { | ||
gulp.src('sass/datepicker.scss') | ||
.pipe(sass().on('error', sass.logError)) | ||
.pipe(rename('datepicker.css')) | ||
.pipe(gulp.dest('dist/css/')) | ||
.pipe(livereload()) | ||
}); | ||
|
||
gulp.task('build', ['js', 'sass']); | ||
|
||
gulp.task('pageSass', function () { | ||
gulp.src('sass/page-init.scss') | ||
.pipe(sass().on('error', sass.logError)) | ||
.pipe(rename('style.css')) | ||
.pipe(gulp.dest('css/')) | ||
.pipe(livereload()) | ||
}); | ||
|
||
gulp.task('watch', function () { | ||
livereload.listen(); | ||
|
||
gulp.watch('sass/**/*.scss', ['pageSass', 'sass']).on('change', function (file) { | ||
livereload.changed(file) | ||
}); | ||
|
||
gulp.watch('js/**/*.js', ['js']).on('change', function (file) { | ||
livereload.changed(file) | ||
}); | ||
}); | ||
|
||
gulp.task('default', ['build', 'pageSass', 'watch']); | ||
|
||
|
||
|
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,17 @@ | ||
<!doctype html> | ||
<html lang="en-US"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Datepicker</title> | ||
<link rel="stylesheet" href="css/style.css"/> | ||
<link rel="stylesheet" href="dist/css/datepicker.css"/> | ||
<script type="text/javascript" src="dist/js/datepicker.js"></script> | ||
</head> | ||
<body> | ||
<div class="calendar"></div> | ||
|
||
<script type="text/javascript"> | ||
$('.calendar').datepicker(); | ||
</script> | ||
</body> | ||
</html> |
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,3 @@ | ||
Datepicker.Cell = function () { | ||
|
||
}; |
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,33 @@ | ||
;(function () { | ||
var pluginName = 'datepicker'; | ||
|
||
function Datepicker () { | ||
|
||
} | ||
|
||
Datepicker.prototype = { | ||
init: function () { | ||
|
||
} | ||
}; | ||
|
||
|
||
$.fn[pluginName] = function ( options ) { | ||
if (Datepicker.prototype[options]) { | ||
Datepicker.prototype[options].apply(this.data(pluginName), Array.prototype.slice.call(arguments, 1)); | ||
} else { | ||
return this.each(function () { | ||
if (!$.data(this, pluginName)) { | ||
$.data(this, pluginName, | ||
new Datepicker( this, options )); | ||
} else { | ||
var _this = $.data(this, pluginName), | ||
oldOpts = _this.opts; | ||
|
||
_this.opts = $.extend({}, oldOpts, options); | ||
} | ||
}); | ||
} | ||
}; | ||
|
||
})(); |
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,13 @@ | ||
{ | ||
"name": "datepicker", | ||
"version": "0.0.1", | ||
"devDependencies": { | ||
"gulp": "^3.9.0", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-livereload": "^3.8.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-sass": "^2.0.4", | ||
"gulp-uglify": "^1.2.0", | ||
"gulp-watch": "^4.3.5" | ||
} | ||
} |
Empty file.
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,82 @@ | ||
/* ------------------------------------------------- | ||
Reset | ||
------------------------------------------------- */ | ||
|
||
applet, object, iframe, h1, h2, h3, h4, h5, h6, p, | ||
blockquote, pre, a, abbr, acronym, address, big, | ||
cite, code, del, dfn, em, img, ins, kbd, q, s, samp, | ||
small, strike, sub, sup, tt, var, u, i, center, dl, | ||
dt, dd, ol, ul, li, fieldset, form, label, legend, | ||
table, caption, tbody, tfoot, thead, tr, th, td, | ||
article, aside, canvas, details, embed, figure, figcaption, | ||
footer, header, menu, nav, output, ruby, section, | ||
summary, time, mark, audio, video { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font: inherit; | ||
vertical-align: baseline; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
} | ||
|
||
html, body { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
*:after, *:before { | ||
box-sizing: border-box; | ||
} | ||
|
||
// HTML 5 roles for ie8/eie9 | ||
// ------------------------------------------------- | ||
|
||
article, | ||
aside, | ||
details, | ||
figcaption, | ||
figure, | ||
footer, | ||
header, | ||
main, | ||
menu, | ||
nav, | ||
section, | ||
summary { | ||
display: block; | ||
} | ||
|
||
// Default font weight | ||
// ------------------------------------------------- | ||
|
||
b, strong { | ||
font-weight: bold; | ||
} | ||
|
||
// Default font style | ||
// ------------------------------------------------- | ||
|
||
i { | ||
font-style: italic; | ||
} | ||
|
||
// Remove link outline | ||
// ------------------------------------------------- | ||
|
||
a { | ||
outline: none; | ||
} | ||
|
||
// Remove scroll in ie | ||
// ------------------------------------------------- | ||
|
||
textarea { | ||
overflow: auto; | ||
} |
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 @@ | ||
@import "datepicker/datepicker"; |
Empty file.
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,2 @@ | ||
@import "reset"; | ||
@import "page"; |