Skip to content

Commit fca01ce

Browse files
structured project
added grunt added LICENSE More mocking up
1 parent 0eba2fa commit fca01ce

File tree

7 files changed

+399
-152
lines changed

7 files changed

+399
-152
lines changed

Gruntfile.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
module.exports = function(grunt) {
2+
// Load Grunt tasks declared in the package.json file
3+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
4+
5+
// Configure Grunt
6+
grunt.initConfig({
7+
8+
// Grunt express - our webserver
9+
// https://github.com/blai/grunt-express
10+
express: {
11+
all: {
12+
options: {
13+
bases: ['.'],
14+
port: 8080,
15+
hostname: "0.0.0.0",
16+
livereload: true
17+
}
18+
}
19+
},
20+
21+
// grunt-watch will monitor the projects files
22+
// https://github.com/gruntjs/grunt-contrib-watch
23+
watch: {
24+
all: {
25+
files: '**/*.html',
26+
options: {
27+
livereload: true
28+
}
29+
}
30+
},
31+
32+
// grunt-open will open your browser at the project's URL
33+
// https://www.npmjs.org/package/grunt-open
34+
open: {
35+
all: {
36+
path: 'http://localhost:8080/index.html'
37+
}
38+
}
39+
});
40+
41+
// Creates the `server` task
42+
grunt.registerTask('server', [
43+
'express',
44+
'open',
45+
'watch'
46+
]);
47+
};

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) 2014 Sebastian Metzger
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 all
13+
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 THE
21+
SOFTWARE.

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"tests"
1111
],
1212
"devDependencies": {
13-
"angular-material": "~0.5.1"
13+
"angular-material": "~0.5.1",
14+
"material-design-icons": "~1.0.1"
1415
}
1516
}

controllers/controllers.js

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
// Include app dependency on ngMaterial
2+
var app = angular.module( 'YourApp', [ 'ngMaterial' ] );
3+
app.controller("YourController", ['$scope', '$mdDialog', function($scope, $mdDialog) {
4+
5+
$scope.openDialog = function($event) {
6+
$mdDialog.show({
7+
targetEvent: $event,
8+
template:
9+
'<md-dialog>' +
10+
' <md-content>Hello {{ userName }}!</md-content>' +
11+
' <div class="md-actions">' +
12+
' <md-button ng-click="closeDialog()">' +
13+
' Close' +
14+
' </md-button>' +
15+
' </div>' +
16+
'</md-dialog>',
17+
controller: 'DialogController',
18+
onComplete: afterShowAnimation,
19+
locals: { name: 'Bobby' }
20+
});
21+
// When the 'enter' animation finishes...
22+
function afterShowAnimation(scope, element, options) {
23+
// post-show code here: DOM element focus, etc.
24+
}
25+
};
26+
27+
$scope.chunks = [
28+
{
29+
title: "Something",
30+
description: "Lorem Ipsum Dolor Set Shalalala",
31+
expanded: false,
32+
content: {
33+
type: "QUOTE",
34+
quote: "And he saw that it was good"
35+
}
36+
},
37+
{
38+
title: "Another Something",
39+
description: "Lorem Ipsum Dolor Set Shalalala",
40+
expanded: false,
41+
content: {
42+
type: "QUOTE",
43+
quote: "And he saw that it was good"
44+
}
45+
},
46+
{
47+
title: "And even another Something",
48+
description: "Lorem Ipsum Dolor Set Shalalala",
49+
expanded: false,
50+
content: {
51+
type: "QUOTE",
52+
quote: "And he saw that it was good"
53+
}
54+
},
55+
{
56+
title: "And even another Something",
57+
description: "Lorem Ipsum Dolor Set Shalalala",
58+
expanded: false,
59+
content: {
60+
type: "QUOTE",
61+
quote: "And he saw that it was good"
62+
}
63+
},
64+
{
65+
title: "And even another Something",
66+
description: "Lorem Ipsum Dolor Set Shalalala",
67+
expanded: false,
68+
content: {
69+
type: "QUOTE",
70+
quote: "And he saw that it was good"
71+
}
72+
},
73+
{
74+
title: "And even another Something",
75+
description: "Lorem Ipsum Dolor Set Shalalala",
76+
expanded: false,
77+
content: {
78+
type: "QUOTE",
79+
quote: "And he saw that it was good"
80+
}
81+
},
82+
{
83+
title: "And even another Something",
84+
description: "Lorem Ipsum Dolor Set Shalalala",
85+
expanded: false,
86+
content: {
87+
type: "QUOTE",
88+
quote: "And he saw that it was good"
89+
}
90+
},
91+
{
92+
title: "And even another Something",
93+
description: "Lorem Ipsum Dolor Set Shalalala",
94+
expanded: false,
95+
content: {
96+
type: "QUOTE",
97+
quote: "And he saw that it was good"
98+
}
99+
},
100+
{
101+
title: "And even another Something",
102+
description: "Lorem Ipsum Dolor Set Shalalala",
103+
expanded: false,
104+
content: {
105+
type: "QUOTE",
106+
quote: "And he saw that it was good"
107+
}
108+
},
109+
{
110+
title: "And even another Something",
111+
description: "Lorem Ipsum Dolor Set Shalalala",
112+
expanded: false,
113+
content: {
114+
type: "QUOTE",
115+
quote: "And he saw that it was good"
116+
}
117+
},
118+
{
119+
title: "And even another Something",
120+
description: "Lorem Ipsum Dolor Set Shalalala",
121+
expanded: false,
122+
content: {
123+
type: "QUOTE",
124+
quote: "And he saw that it was good"
125+
}
126+
},
127+
{
128+
title: "And even another Something",
129+
description: "Lorem Ipsum Dolor Set Shalalala",
130+
expanded: false,
131+
content: {
132+
type: "QUOTE",
133+
quote: "And he saw that it was good"
134+
}
135+
},
136+
{
137+
title: "And even another Something",
138+
description: "Lorem Ipsum Dolor Set Shalalala",
139+
expanded: false,
140+
content: {
141+
type: "QUOTE",
142+
quote: "And he saw that it was good"
143+
}
144+
}
145+
];
146+
147+
$scope.items = [
148+
{ name: 'Share', icon: 'share' },
149+
{ name: 'Upload', icon: 'upload' },
150+
{ name: 'Copy', icon: 'copy' },
151+
{ name: 'Print this page', icon: 'print' },
152+
];
153+
154+
$scope.listItemClick = function($index) {
155+
var clickedItem = $scope.items[$index];
156+
$mdBottomSheet.hide(clickedItem);
157+
};
158+
}]);
159+
160+
app.controller('DialogController', function($scope, $mdDialog, name) {
161+
$scope.userName = name;
162+
$scope.closeDialog = function() {
163+
$mdDialog.hide();
164+
};
165+
});

0 commit comments

Comments
 (0)