Skip to content

Commit a087217

Browse files
committed
first commit
0 parents  commit a087217

File tree

127 files changed

+7735
-0
lines changed

Some content is hidden

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

127 files changed

+7735
-0
lines changed

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License
2+
3+
Copyright (c) 2014- Ando Yasushi. https://github.com/technohippy
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.
22+

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# AngularDart Phone Catalog Tutorial Application
2+
3+
see. http://docs.angularjs.org/tutorial

pubspec.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: angular-dart-phonecat
2+
version: 0.0.1
3+
environment:
4+
sdk: '>=1.0.0'
5+
dependencies:
6+
angular: any
7+
browser: any

step_11/controllers.dart

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
library phonecat_controller;
2+
3+
import 'package:angular/angular.dart';
4+
import './services.dart';
5+
6+
@NgController(
7+
selector: '[phone-list]',
8+
publishAs: 'ctrl',
9+
map: const {
10+
'phones': '=>phones'
11+
}
12+
)
13+
class PhoneListCtrl {
14+
PhonecatService _phonecatService;
15+
16+
List<Map> phones = [];
17+
String query = '';
18+
String orderProp = 'age';
19+
20+
PhoneListCtrl(PhonecatService this._phonecatService) {
21+
this._phonecatService.query().then(
22+
(List<Map> phones) {
23+
this.phones = phones;
24+
}
25+
);
26+
}
27+
}
28+
29+
@NgController(
30+
selector: '[phone-detail]',
31+
publishAs: 'ctrl',
32+
map: const {
33+
'phone': '=>phone',
34+
'mainImageUrl': '@mainImageUrl'
35+
}
36+
)
37+
class PhoneDetailCtrl {
38+
PhonecatService _phonecatService;
39+
Map phone;
40+
String mainImageUrl;
41+
42+
PhoneDetailCtrl(RouteProvider routeProvider, PhonecatService this._phonecatService) {
43+
String phoneId = routeProvider.parameters['phoneId'];
44+
_phonecatService.getByPhoneId(phoneId).then(
45+
(Map phone) {
46+
this.phone = phone;
47+
this.mainImageUrl = phone['images'][0];
48+
}
49+
);
50+
}
51+
52+
set image(imageUrl) => mainImageUrl = imageUrl;
53+
}

step_11/css/.gitkeep

Whitespace-only changes.

step_11/css/animations.css

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*
2+
* animations css stylesheet
3+
*/
4+
5+
/* animate ngRepeat in phone listing */
6+
7+
.phone-listing.ng-enter,
8+
.phone-listing.ng-leave,
9+
.phone-listing.ng-move {
10+
-webkit-transition: 0.5s linear all;
11+
-moz-transition: 0.5s linear all;
12+
-o-transition: 0.5s linear all;
13+
transition: 0.5s linear all;
14+
}
15+
16+
.phone-listing.ng-enter,
17+
.phone-listing.ng-move {
18+
opacity: 0;
19+
height: 0;
20+
overflow: hidden;
21+
}
22+
23+
.phone-listing.ng-move.ng-move-active,
24+
.phone-listing.ng-enter.ng-enter-active {
25+
opacity: 1;
26+
height: 120px;
27+
}
28+
29+
.phone-listing.ng-leave {
30+
opacity: 1;
31+
overflow: hidden;
32+
}
33+
34+
.phone-listing.ng-leave.ng-leave-active {
35+
opacity: 0;
36+
height: 0;
37+
padding-top: 0;
38+
padding-bottom: 0;
39+
}
40+
41+
/* cross fading between routes with ngView */
42+
43+
.view-container {
44+
position: relative;
45+
}
46+
47+
.view-frame.ng-enter,
48+
.view-frame.ng-leave {
49+
background: white;
50+
position: absolute;
51+
top: 0;
52+
left: 0;
53+
right: 0;
54+
}
55+
56+
.view-frame.ng-enter {
57+
-webkit-animation: 0.5s fade-in;
58+
-moz-animation: 0.5s fade-in;
59+
-o-animation: 0.5s fade-in;
60+
animation: 0.5s fade-in;
61+
z-index: 100;
62+
}
63+
64+
.view-frame.ng-leave {
65+
-webkit-animation: 0.5s fade-out;
66+
-moz-animation: 0.5s fade-out;
67+
-o-animation: 0.5s fade-out;
68+
animation: 0.5s fade-out;
69+
z-index: 99;
70+
}
71+
72+
@keyframes fade-in {
73+
from { opacity: 0; }
74+
to { opacity: 1; }
75+
}
76+
@-moz-keyframes fade-in {
77+
from { opacity: 0; }
78+
to { opacity: 1; }
79+
}
80+
@-webkit-keyframes fade-in {
81+
from { opacity: 0; }
82+
to { opacity: 1; }
83+
}
84+
85+
@keyframes fade-out {
86+
from { opacity: 1; }
87+
to { opacity: 0; }
88+
}
89+
@-moz-keyframes fade-out {
90+
from { opacity: 1; }
91+
to { opacity: 0; }
92+
}
93+
@-webkit-keyframes fade-out {
94+
from { opacity: 1; }
95+
to { opacity: 0; }
96+
}
97+

step_11/css/app.css

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/* app css stylesheet */
2+
3+
body {
4+
padding-top: 20px;
5+
}
6+
7+
.phones {
8+
list-style: none;
9+
}
10+
11+
.thumb {
12+
float: left;
13+
margin: -1em 1em 1.5em 0em;
14+
padding-bottom: 1em;
15+
height: 100px;
16+
width: 100px;
17+
}
18+
19+
.phones li {
20+
clear: both;
21+
height: 100px;
22+
padding-top: 15px;
23+
}
24+
25+
/** Detail View **/
26+
img.phone {
27+
float: left;
28+
border: 1px solid black;
29+
margin-right: 3em;
30+
margin-bottom: 2em;
31+
background-color: white;
32+
padding: 2em;
33+
height: 400px;
34+
width: 400px;
35+
}
36+
37+
ul.phone-thumbs {
38+
margin: 0;
39+
list-style: none;
40+
}
41+
42+
ul.phone-thumbs li {
43+
border: 1px solid black;
44+
display: inline-block;
45+
margin: 1em;
46+
background-color: white;
47+
}
48+
49+
ul.phone-thumbs img {
50+
height: 100px;
51+
width: 100px;
52+
padding: 1em;
53+
}
54+
55+
ul.phone-thumbs img:hover {
56+
cursor: pointer;
57+
}
58+
59+
60+
ul.specs {
61+
clear: both;
62+
margin: 0;
63+
padding: 0;
64+
list-style: none;
65+
}
66+
67+
ul.specs > li{
68+
display: inline-block;
69+
width: 200px;
70+
vertical-align: top;
71+
}
72+
73+
ul.specs > li > span{
74+
font-weight: bold;
75+
font-size: 1.2em;
76+
}
77+
78+
ul.specs dt {
79+
font-weight: bold;
80+
}
81+
82+
h1 {
83+
border-bottom: 1px solid gray;
84+
}

0 commit comments

Comments
 (0)