Skip to content

Commit e26f322

Browse files
committed
Initial commit
0 parents  commit e26f322

File tree

10 files changed

+1044
-0
lines changed

10 files changed

+1044
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.idea/

Gruntfile.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
module.exports = function (grunt)
2+
{
3+
// Project configuration.
4+
grunt.initConfig({
5+
6+
pkg: grunt.file.readJSON('package.json'),
7+
8+
minBanner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
9+
'(c) <%= pkg.author %>, <%= pkg.repository.url %> - ' +
10+
'<%= grunt.template.today("yyyy-mm-dd") %> */\n',
11+
12+
recess: {
13+
options: {
14+
compile: true
15+
},
16+
17+
slider: {
18+
src: ['rzslider.less'],
19+
dest: 'dist/rzslider.css'
20+
},
21+
22+
min: {
23+
options: {
24+
compress: true,
25+
banner: '<%= minBanner %>'
26+
},
27+
src: ['dist/rzslider.css'],
28+
dest: 'dist/rzslider.min.css'
29+
}
30+
},
31+
32+
uglify: {
33+
options: {
34+
report: 'min',
35+
banner: '<%= minBanner %>'
36+
},
37+
rzslider: {
38+
files: {
39+
'dist/rzslider.min.js': [
40+
'rzslider.js'
41+
]
42+
}
43+
}
44+
}
45+
});
46+
47+
grunt.loadNpmTasks('grunt-contrib-uglify');
48+
grunt.loadNpmTasks('grunt-recess');
49+
50+
grunt.registerTask('default', ['css', 'js']);
51+
52+
grunt.registerTask('css', ['recess']);
53+
grunt.registerTask('js', ['uglify']);
54+
};

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013 Rafal Zajac <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## AngularJS slider directive with no external dependencies
2+
3+
Slider directive implementation for AngularJS, without any dependencies.
4+
5+
## Example
6+
7+
```html
8+
<div>
9+
<rzslider
10+
rz-slider-floor="priceSlider.floor"
11+
rz-slider-ceil="priceSlider.ceil"
12+
rz-slider-low="priceSlider.min"
13+
rz-slider-high="priceSlider.max"
14+
rz-slider-step="5"></rzslider>
15+
</div>
16+
```
17+
18+
## License
19+
20+
Licensed under the MIT license

dist/rzslider.css

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/**
2+
* Angular JS slider directive
3+
*
4+
* (c) Rafal Zajac <[email protected]>
5+
* http://github.com/rzajac/angularjs-slider
6+
*
7+
* Licensed under the MIT license
8+
*/
9+
10+
rzslider {
11+
position: relative;
12+
display: inline-block;
13+
width: 100%;
14+
height: 2px;
15+
margin: 30px 0 15px 0;
16+
vertical-align: middle;
17+
}
18+
19+
rzslider span {
20+
position: absolute;
21+
display: inline-block;
22+
white-space: nowrap;
23+
}
24+
25+
rzslider span.base {
26+
width: 100%;
27+
height: 100%;
28+
padding: 0;
29+
}
30+
31+
rzslider span.bar {
32+
z-index: 0;
33+
width: 100%;
34+
height: 100%;
35+
background: #fff;
36+
}
37+
38+
rzslider span.bar.selection {
39+
z-index: 1;
40+
width: 0;
41+
background: #67b700;
42+
}
43+
44+
rzslider span.pointer {
45+
top: -15px;
46+
z-index: 2;
47+
width: 32px;
48+
height: 32px;
49+
cursor: pointer;
50+
background-color: #fff;
51+
-webkit-border-radius: 16px;
52+
-moz-border-radius: 16px;
53+
border-radius: 16px;
54+
}
55+
56+
rzslider span.pointer:after {
57+
position: absolute;
58+
top: 12px;
59+
left: 12px;
60+
width: 8px;
61+
height: 8px;
62+
background: #71818e;
63+
-webkit-border-radius: 4px;
64+
-moz-border-radius: 4px;
65+
border-radius: 4px;
66+
content: '';
67+
}
68+
69+
rzslider span.pointer:hover:after {
70+
background-color: #67b700;
71+
}
72+
73+
rzslider span.pointer.active:after {
74+
background-color: #67b700;
75+
}
76+
77+
rzslider span.bubble {
78+
top: -32px;
79+
padding: 1px 3px 1px 3px;
80+
color: #67b700;
81+
cursor: default;
82+
}
83+
84+
rzslider span.bubble.selection {
85+
top: 15px;
86+
}
87+
88+
rzslider span.bubble.limit {
89+
/*color: #808080;*/
90+
91+
}

dist/rzslider.min.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "angularjs-slider",
3+
"version": "0.0.1",
4+
"description": "Slider directive for AngularJS. No dependencies.",
5+
"main": "rzslider.js",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/rzajac/angularjs-slider.git"
9+
},
10+
"keywords": [
11+
"angular",
12+
"slider"
13+
],
14+
"devDependencies": {
15+
"grunt": "~0.4.2",
16+
"grunt-contrib-uglify": "~0.2.2",
17+
"grunt-contrib-mincss": "~0.3.2",
18+
"grunt-recess": "~0.4.0",
19+
"recess": "~1.1.9"
20+
},
21+
"author": "Rafal Zajac <[email protected]>",
22+
"license": "MIT",
23+
"readmeFilename": "README.md"
24+
}

0 commit comments

Comments
 (0)