Skip to content

Commit b0253ed

Browse files
committed
add iconic
1 parent 72b59d1 commit b0253ed

Some content is hidden

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

53 files changed

+241656
-0
lines changed

lesson2/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
color: #ff5500;
5252
}
5353
#video{
54+
5455
width: 10rem;
5556
/*height: 5rem;*/
5657
}

lesson3/a.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"name": "towne",
4+
"age": "24"
5+
},
6+
{
7+
"name": "rows",
8+
"age": "22"
9+
},
10+
{
11+
"name": "lili",
12+
"age": "28"
13+
}
14+
]

lesson3/index.html

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>myApp</title>
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" />
7+
<link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css">
8+
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js"></script>
9+
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.10/angular-route.min.js"></script>
10+
<style type="text/css">
11+
html,body{
12+
margin: 0;
13+
background-color: #ffffff;
14+
overflow-y: scroll;
15+
}
16+
div,p,ul,li,h1,h2,h3,h4,h5,h6,span,em,strong,i,a{
17+
font-size: 0.375rem;
18+
font-weight: 100;
19+
margin: 0;
20+
padding: 0;
21+
}
22+
.ui_bar{
23+
height: 1.25rem;
24+
border-bottom: 1px solid #333333;
25+
background-color: #ff5500;
26+
}
27+
</style>
28+
29+
</head>
30+
<body ng-app="myApp">
31+
<!-- <div ng-controller="bar" class="ui_bar" id="bar">
32+
<a href="">{{ name }}</a>
33+
<h1>{{name}}</h1>
34+
<p>{{name}}</p>
35+
<a href="{{}}">{{}}</a>
36+
</div> -->
37+
<div ng-view></div>
38+
</body>
39+
<script>
40+
var window_click = true;
41+
window.addEventListener("click", function(){
42+
if(window_click){
43+
window_click = false;
44+
function launchFullScreen(element) {
45+
if(element.requestFullscreen) {
46+
element.requestFullscreen();
47+
}else if(element.mozRequestFullScreen) {
48+
element.mozRequestFullScreen();
49+
}else if(element.webkitRequestFullscreen) {
50+
element.webkitRequestFullscreen();
51+
}else if(element.msRequestFullscreen) {
52+
element.msRequestFullscreen();
53+
}
54+
}
55+
launchFullScreen(document.documentElement);
56+
(function reSetRem(){
57+
var body = document.getElementsByTagName("html")[0];
58+
var rem = screen.availWidth/10;
59+
body.style.fontSize = rem+"px";
60+
body.style.height = screen.availHeight+"px";
61+
})();
62+
}else{
63+
return false;
64+
}
65+
});
66+
</script>
67+
<script type="text/javascript">
68+
var myApp = angular.module("myApp", ["ngRoute"]);
69+
70+
myApp.config(function ($routeProvider){
71+
72+
$routeProvider.when("/", {
73+
template: '<ul><li ng-repeat="name in names"><a href="#{{name.name}}">{{name.name}}</a></li><ul>',
74+
controller: "NameListCtrl"
75+
}).when("/:id", {
76+
template: '<h1>TODO create country detail view</h1>',
77+
controller: "NameCtrl"
78+
}).otherwise({
79+
redirectTo: "/"
80+
})
81+
82+
});
83+
84+
myApp.controller("NameListCtrl", function ($scope, $http){
85+
$http.get("a.json").success(function (data){
86+
$scope.names = data;
87+
});
88+
});
89+
90+
myApp.controller("NameCtrl", function ($scope, $routeParams){
91+
console.log($routeParams);
92+
})
93+
94+
// myApp.controller("bar", function ($scope){
95+
// $scope.name = "Index";
96+
// // console.log($scope);
97+
// });
98+
</script>
99+
</html>

lesson4/css/ionic.css

Lines changed: 7600 additions & 0 deletions
Large diffs are not rendered by default.

lesson4/css/ionic.min.css

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

lesson4/demo.html

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<html ng-app="ionicApp">
2+
<head>
3+
<meta charset="utf-8">
4+
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
5+
6+
<title>Checkboxes</title>
7+
8+
<link href="http://code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
9+
<script src="http://code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
10+
</head>
11+
12+
<body ng-controller="MainCtrl">
13+
14+
<ion-header-bar class="bar-positive">
15+
<h1 class="title">Checkboxes</h1>
16+
</ion-header-bar>
17+
18+
<ion-content>
19+
20+
<div class="list">
21+
22+
<ion-checkbox ng-repeat="item in devList"
23+
ng-model="item.checked"
24+
ng-checked="item.checked">
25+
{{ item.text }}
26+
</ion-checkbox>
27+
28+
<div class="item">
29+
<pre ng-bind="devList | json"></pre>
30+
</div>
31+
32+
<div class="item item-divider">
33+
Notifications
34+
</div>
35+
36+
<ion-checkbox ng-model="pushNotification.checked"
37+
ng-change="pushNotificationChange()">
38+
Push Notifications
39+
</ion-checkbox>
40+
41+
<div class="item">
42+
<pre ng-bind="pushNotification | json"></pre>
43+
</div>
44+
45+
<ion-checkbox ng-model="emailNotification"
46+
ng-true-value="'Subscribed'"
47+
ng-false-value="'Unubscribed'">
48+
Newsletter
49+
</ion-checkbox>
50+
<div class="item">
51+
<pre ng-bind="emailNotification | json"></pre>
52+
</div>
53+
54+
</div>
55+
56+
</ion-content>
57+
58+
</body>
59+
<script type="text/javascript">
60+
angular.module('ionicApp', ['ionic'])
61+
62+
.controller('MainCtrl', function($scope) {
63+
64+
$scope.devList = [
65+
{ text: "HTML5", checked: true },
66+
{ text: "CSS3", checked: false },
67+
{ text: "JavaScript", checked: false }
68+
];
69+
70+
$scope.pushNotificationChange = function() {
71+
console.log('Push Notification Change', $scope.pushNotification.checked);
72+
};
73+
74+
$scope.pushNotification = { checked: true };
75+
$scope.emailNotification = 'Subscribed';
76+
77+
});
78+
</script>
79+
</html>

0 commit comments

Comments
 (0)