Skip to content

Commit 1e9bf5d

Browse files
Christian KellnerChristian Kellner
Christian Kellner
authored and
Christian Kellner
committed
init
0 parents  commit 1e9bf5d

Some content is hidden

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

66 files changed

+12660
-0
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
project
2+
*.iml
3+
.idea
4+
node_modules
5+
dest
6+
*.MF
7+
.DS_Store
8+
reports
9+
.grunt
10+
test-output

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"

Gruntfile.js

+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
module.exports = function (grunt) {
2+
3+
var expandFiles = function (glob) {
4+
return grunt.file.expand({
5+
filter: 'isFile'
6+
}, glob);
7+
};
8+
var proxyquire = require('proxyquireify');
9+
10+
grunt.initConfig({
11+
pkg: grunt.file.readJSON('package.json'),
12+
clean: ["dest/"],
13+
copy: {
14+
sound: {
15+
files: [
16+
{expand: true, cwd: './assets/sounds', src: ['**/*.*'], dest: 'dest/assets/sounds'}
17+
]
18+
}
19+
},
20+
htmlmin: {
21+
min: {
22+
options: {
23+
removeComments: true,
24+
collapseWhitespace: true
25+
},
26+
files: {
27+
'dest/index.html': 'dest/index.html'
28+
}
29+
}
30+
},
31+
cssmin: {
32+
combine: {
33+
files: {
34+
'dest/assets/css/bundle.css': ['assets/css/**/*.css']
35+
}
36+
}
37+
},
38+
watch: {
39+
main: {
40+
files: ['./assets/js/**/*.js', './assets/css/**/*.css', './*.html', './templates/**/*.hbs'],
41+
tasks: ['htmlmin:min', 'browserify:main', 'cssmin:combine'],
42+
options: {
43+
spawn: false,
44+
livereload: true
45+
}
46+
},
47+
test: {
48+
files: ['./assets/js/**/*.js', 'test/**/*.js'],
49+
tasks: ['browserify:test', 'jasmine']
50+
}
51+
},
52+
connect: {
53+
main: {
54+
options: {
55+
port: 9090,
56+
livereload: true,
57+
middleware: function (connect) {
58+
return [
59+
function (req, res, next) {
60+
res.setHeader('Access-Control-Allow-Origin', '*');
61+
res.setHeader('Access-Control-Allow-Methods', '*');
62+
next();
63+
} ,
64+
// Serve static files.
65+
connect.static('dest'),
66+
// Make empty directories browsable.
67+
connect.directory('dest')
68+
]
69+
}
70+
}
71+
}
72+
},
73+
browserify: {
74+
main: {
75+
src: [ './assets/js/**/*.js' ],
76+
dest: './dest/assets/js/bundle.js',
77+
options: {
78+
bundleOptions: {
79+
require: expandFiles(['./assets/js/**/*.js'])
80+
},
81+
transform: ['browserify-handlebars']
82+
}
83+
},
84+
test: {
85+
src: ['test/spec/**/*.js'],
86+
dest: 'dest/test_bundle.js',
87+
options: {
88+
transform: ['browserify-handlebars'],
89+
plugin: [proxyquire.plugin]
90+
}
91+
}
92+
},
93+
uglify: {
94+
build: {
95+
files: {
96+
'dest/assets/js/bundle.js': ['dest/assets/js/bundle.js']
97+
}
98+
}
99+
},
100+
imagemin: {
101+
min: {
102+
files: [
103+
{
104+
expand: true,
105+
cwd: './assets/img',
106+
src: ['**/*.{png,jpg,gif}'],
107+
dest: 'dest/assets/img'
108+
}
109+
]
110+
}
111+
},
112+
jasmine: {
113+
src: 'dest/assets/js/bundle.js',
114+
options: {
115+
specs: 'dest/test_bundle.js'
116+
}
117+
},
118+
jshint: {
119+
files: [
120+
'assets/js/**/*.js'
121+
],
122+
options: {
123+
ignores: [
124+
'assets/js/libs/**/*.js'
125+
],
126+
reporter: require('jshint-stylish'),
127+
"boss": true,
128+
"browser": true,
129+
"sub": true,
130+
"eqnull": true,
131+
"expr": true,
132+
"forin": true,
133+
"evil": true,
134+
"newcap": true,
135+
"globals": {
136+
"define": true,
137+
"jQuery": true
138+
}
139+
}
140+
},
141+
bumper: {
142+
options: {
143+
files: ["package.json"],
144+
updateConfigs: ['pkg'],
145+
runTasks: false,
146+
add: true,
147+
addFiles: ["."],
148+
commit: true,
149+
commitMessage: "Release v%VERSION%",
150+
commitFiles: ["-a"],
151+
createTag: true,
152+
tagName: "v%VERSION%",
153+
tagMessage: "Version %VERSION%",
154+
push: true,
155+
pushTo: "origin",
156+
npm: false,
157+
npmTag: "Release v%VERSION%",
158+
gitDescribeOptions: "--tags --always --abbrev=1 --dirty=-d"
159+
}
160+
},
161+
htmlbuild: {
162+
dist: {
163+
src: 'index.html',
164+
dest: 'dest/',
165+
options: {
166+
beautify: true,
167+
data: {
168+
version: grunt.file.readJSON('package.json').version
169+
}
170+
}
171+
}
172+
}
173+
}
174+
);
175+
/** Use a plugin to load each and every task (instead of using loadNpmTasks **/
176+
require('load-grunt-tasks')(grunt);
177+
178+
/** main dev task with livereload and so on **/
179+
grunt.registerTask('default', ['clean', 'copy:sound', 'htmlbuild', 'htmlmin','imagemin', 'cssmin:combine', 'browserify:main', 'connect:main', "watch:main"]);
180+
181+
/** to release a new version, this task increases the version tag and commit it to git **/
182+
grunt.registerTask('release', ['lint', 'clean', 'browserify', 'jasmine', 'bumper']);
183+
184+
/** roughly the same than the dev taks but without livereload. This generates a dest folder which contains everything that is needed for Photobooth.JS **/
185+
grunt.registerTask('deploy', ['clean', 'copy:sound', 'htmlbuild', 'htmlmin', 'cssmin:combine', 'imagemin', 'browserify:main', 'uglify:build']);
186+
187+
188+
grunt.registerTask('test', ['lint', 'clean', 'browserify', 'jasmine', 'watch:test']);
189+
190+
grunt.registerTask('travis', ['lint', 'clean', 'browserify', 'jasmine']);
191+
192+
grunt.registerTask('lint', ['jshint']);
193+
194+
};
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.animation div {
2+
width: 15px;
3+
height: 15px;
4+
position: absolute;
5+
background-color: #ccc;
6+
top: 4%;
7+
border-radius: 50%;
8+
}
9+
10+
.animation div:nth-child(1) {
11+
background-color: #0099ff;
12+
box-shadow: 0px 5px 20px #0099ff;
13+
animation: move 5s infinite cubic-bezier(.2, .64, .81, .23);
14+
-webkit-animation: move 5s infinite cubic-bezier(.2, .64, .81, .23);
15+
}
16+
17+
.animation div:nth-child(2) {
18+
background-color: #FF9D84;
19+
box-shadow: 0px 5px 20px #0099ff;
20+
animation: move 5s 150ms infinite cubic-bezier(.2, .64, .81, .23);
21+
-webkit-animation: move 5s 150ms infinite cubic-bezier(.2, .64, .81, .23);
22+
}
23+
24+
.animation div:nth-child(3) {
25+
background-color: #F0E797;
26+
box-shadow: 0px 5px 20px #0099ff;
27+
animation: move 5s 300ms infinite cubic-bezier(.2, .64, .81, .23);
28+
-webkit-animation: move 5s 300ms infinite cubic-bezier(.2, .64, .81, .23);
29+
}
30+
31+
.animation div:nth-child(4) {
32+
background-color: #75B08A;
33+
box-shadow: 0px 5px 20px #0099ff;
34+
animation: move 5s 450ms infinite cubic-bezier(.2, .64, .81, .23);
35+
-webkit-animation: move 5s 450ms infinite cubic-bezier(.2, .64, .81, .23);
36+
}
37+
@-webkit-keyframes move {
38+
0% {
39+
left: 0%;
40+
}
41+
100% {
42+
left: 100%;
43+
}
44+
}
45+
@keyframes move {
46+
0% {
47+
left: 0%;
48+
}
49+
100% {
50+
left: 100%;
51+
}
52+
}
53+
54+
.cam_hint {
55+
border: 1px solid white;
56+
border-radius: 5px;
57+
color: #ffffff;
58+
height: 38px;
59+
padding-top: 15px;
60+
text-align: center;
61+
width: 300px;
62+
margin: 90px auto 0;
63+
-moz-box-shadow: 0px 5px 20px #0099ff;
64+
-webkit-box-shadow: 0px 5px 20px #0099ff;
65+
box-shadow: 0px 5px 20px #0099ff;
66+
}

assets/css/button.css

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/**
2+
http://robots.thoughtbot.com/make-css3-buttons-like-a-boss
3+
**/
4+
button {
5+
background: #3b88d8;
6+
background: -moz-linear-gradient(0% 100% 90deg, #377ad0, #52a8e8);
7+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#52a8e8), to(#377ad0));
8+
border-top: 1px solid #4081af;
9+
border-right: 1px solid #2e69a3;
10+
border-bottom: 1px solid #20559a;
11+
border-left: 1px solid #2e69a3;
12+
-moz-border-radius: 16px;
13+
-webkit-border-radius: 16px;
14+
border-radius: 16px;
15+
-moz-box-shadow: inset 0 1px 0 0 #72b9eb, 0 1px 2px 0 #b3b3b3;
16+
-webkit-box-shadow: inset 0 1px 0 0 #72b9eb, 0 1px 2px 0 #b3b3b3;
17+
color: #fff;
18+
font-family: "lucida grande", sans-serif;
19+
font-size: 11px;
20+
font-weight: normal;
21+
line-height: 1;
22+
padding: 3px 0 5px 0;
23+
text-align: center;
24+
text-shadow: 0 -1px 1px #3275bc;
25+
width: 112px;
26+
-webkit-background-clip: padding-box;
27+
}
28+
29+
button:hover {
30+
background: #2a81d7;
31+
background: -moz-linear-gradient(0% 100% 90deg, #206bcb, #3e9ee5);
32+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#3e9ee5), to(#206bcb));
33+
border-top: 1px solid #2a73a6;
34+
border-right: 1px solid #165899;
35+
border-bottom: 1px solid #07428f;
36+
border-left: 1px solid #165899;
37+
-moz-box-shadow: inset 0 1px 0 0 #62b1e9;
38+
-webkit-box-shadow: inset 0 1px 0 0 #62b1e9;
39+
cursor: pointer;
40+
text-shadow: 0 -1px 1px #1d62ab;
41+
-webkit-background-clip: padding-box;
42+
}
43+
44+
button:active {
45+
background: #3282d3;
46+
border: 1px solid #154c8c;
47+
border-bottom: 1px solid #0e408e;
48+
-moz-box-shadow: inset 0 0 6px 3px #1657b5, 0 1px 0 0 #fff;
49+
-webkit-box-shadow: inset 0 0 6px 3px #1657b5, 0 1px 0 0 #fff;
50+
text-shadow: 0 -1px 1px #2361a4;
51+
-webkit-background-clip: padding-box;
52+
}
53+
54+
button[disabled],
55+
button[disabled]:hover,
56+
button[disabled]:active {
57+
background: #999;
58+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dadada), to(#f3f3f3));
59+
border-top: 1px solid #c5c5c5;
60+
border-right: 1px solid #cecece;
61+
border-bottom: 1px solid #d9d9d9;
62+
border-left: 1px solid #cecece;
63+
color: #8f8f8f;
64+
box-shadow: none;
65+
-moz-box-shadow: none;
66+
-webkit-box-shadow: none;
67+
cursor: not-allowed;
68+
text-shadow: 0 -1px 1px #ebebeb;
69+
}
70+
71+
button::-moz-focus-inner {
72+
border: 0;
73+
padding: 0;
74+
}
75+
76+

0 commit comments

Comments
 (0)