Skip to content

Commit d9640bb

Browse files
Lec10
0 parents  commit d9640bb

File tree

83 files changed

+531
-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.

83 files changed

+531
-0
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
2+
# editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
10+
# We recommend you to keep these unchanged
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
16+
[*.md]
17+
trim_trailing_whitespace = false

.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Specifies intentionally untracked files to ignore when using Git
2+
# http://git-scm.com/docs/gitignore
3+
4+
*~
5+
*.sw[mnpcod]
6+
*.log
7+
*.tmp
8+
*.tmp.*
9+
log.txt
10+
*.sublime-project
11+
*.sublime-workspace
12+
.vscode/
13+
npm-debug.log*
14+
15+
.idea/
16+
.sass-cache/
17+
.tmp/
18+
.versions/
19+
coverage/
20+
dist/
21+
node_modules/
22+
tmp/
23+
temp/
24+
hooks/
25+
platforms/
26+
plugins/
27+
plugins/android.json
28+
plugins/ios.json
29+
www/
30+
$RECYCLE.BIN/
31+
32+
.DS_Store
33+
Thumbs.db
34+
UserInterfaceState.xcuserstate

config.xml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<widget id="com.ionicframework.wooionic523845" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3+
<name>WooIonic</name>
4+
<description>An awesome Ionic/Cordova app.</description>
5+
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
6+
<content src="index.html"/>
7+
<access origin="*"/>
8+
<allow-navigation href="http://ionic.local/*"/>
9+
<allow-intent href="http://*/*"/>
10+
<allow-intent href="https://*/*"/>
11+
<allow-intent href="tel:*"/>
12+
<allow-intent href="sms:*"/>
13+
<allow-intent href="mailto:*"/>
14+
<allow-intent href="geo:*"/>
15+
<platform name="android">
16+
<allow-intent href="market:*"/>
17+
</platform>
18+
<platform name="ios">
19+
<allow-intent href="itms:*"/>
20+
<allow-intent href="itms-apps:*"/>
21+
</platform>
22+
<preference name="webviewbounce" value="false"/>
23+
<preference name="UIWebViewBounce" value="false"/>
24+
<preference name="DisallowOverscroll" value="true"/>
25+
<preference name="android-minSdkVersion" value="16"/>
26+
<preference name="BackupWebStorage" value="none"/>
27+
<preference name="SplashMaintainAspectRatio" value="true"/>
28+
<preference name="FadeSplashScreenDuration" value="300"/>
29+
<preference name="SplashShowOnlyFirstTime" value="false"/>
30+
<feature name="StatusBar">
31+
<param name="ios-package" onload="true" value="CDVStatusBar"/>
32+
</feature>
33+
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
34+
<plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
35+
<plugin name="cordova-plugin-console" spec="1.0.5"/>
36+
<plugin name="cordova-plugin-statusbar" spec="2.2.1"/>
37+
<plugin name="cordova-plugin-device" spec="1.1.4"/>
38+
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
39+
</widget>

desktop.ini

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[ViewState]
2+
Mode=
3+
Vid=
4+
FolderType=Generic

ionic.config.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "WooIonic",
3+
"app_id": "",
4+
"v2": true,
5+
"typescript": true
6+
}

package.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "ionic-hello-world",
3+
"author": "Ionic Framework",
4+
"homepage": "http://ionicframework.com/",
5+
"private": true,
6+
"scripts": {
7+
"clean": "ionic-app-scripts clean",
8+
"build": "ionic-app-scripts build",
9+
"ionic:build": "ionic-app-scripts build",
10+
"ionic:serve": "ionic-app-scripts serve"
11+
},
12+
"dependencies": {
13+
"@angular/common": "4.0.0",
14+
"@angular/compiler": "4.0.0",
15+
"@angular/compiler-cli": "4.0.0",
16+
"@angular/core": "4.0.0",
17+
"@angular/forms": "4.0.0",
18+
"@angular/http": "4.0.0",
19+
"@angular/platform-browser": "4.0.0",
20+
"@angular/platform-browser-dynamic": "4.0.0",
21+
"@ionic-native/core": "3.4.2",
22+
"@ionic-native/splash-screen": "3.4.2",
23+
"@ionic-native/status-bar": "3.4.2",
24+
"@ionic/storage": "2.0.1",
25+
"ionic-angular": "3.0.1",
26+
"ionicons": "3.0.0",
27+
"rxjs": "5.1.1",
28+
"sw-toolbox": "3.4.0",
29+
"zone.js": "^0.8.4"
30+
},
31+
"devDependencies": {
32+
"@ionic/app-scripts": "1.3.0",
33+
"typescript": "~2.2.1"
34+
},
35+
"cordovaPlugins": [
36+
"cordova-plugin-whitelist",
37+
"cordova-plugin-console",
38+
"cordova-plugin-statusbar",
39+
"cordova-plugin-device",
40+
"ionic-plugin-keyboard",
41+
"cordova-plugin-splashscreen"
42+
],
43+
"cordovaPlatforms": [],
44+
"description": "WooIonic: An Ionic project"
45+
}
2.81 KB
1.13 KB
1.76 KB
4.22 KB
7.61 KB
11.5 KB

resources/icon.png

59.4 KB

resources/ios/icon/icon-40.png

1.22 KB

resources/ios/icon/[email protected]

3.48 KB

resources/ios/icon/[email protected]

5.87 KB

resources/ios/icon/icon-50.png

1.86 KB

resources/ios/icon/[email protected]

4.58 KB

resources/ios/icon/icon-60.png

2.39 KB

resources/ios/icon/[email protected]

5.9 KB

resources/ios/icon/[email protected]

10.6 KB

resources/ios/icon/icon-72.png

2.8 KB

resources/ios/icon/[email protected]

7.61 KB

resources/ios/icon/icon-76.png

3.24 KB

resources/ios/icon/[email protected]

8.11 KB

resources/ios/icon/[email protected]

9.34 KB

resources/ios/icon/icon-small.png

818 Bytes

resources/ios/icon/[email protected]

2.23 KB

resources/ios/icon/[email protected]

3.77 KB

resources/ios/icon/icon.png

2.06 KB

resources/ios/icon/[email protected]

5.58 KB
31.2 KB

resources/ios/splash/Default-667h.png

39.5 KB

resources/ios/splash/Default-736h.png

44 KB
43.9 KB
22.1 KB
22.2 KB
18.4 KB
7.04 KB

resources/splash.png

60.8 KB

src/app/app.component.ts

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Component, ViewChild } from '@angular/core';
2+
import { Nav, Platform } from 'ionic-angular';
3+
import { StatusBar } from '@ionic-native/status-bar';
4+
import { SplashScreen } from '@ionic-native/splash-screen';
5+
6+
import { Menu } from '../pages/menu/menu';
7+
8+
@Component({
9+
templateUrl: 'app.html'
10+
})
11+
export class MyApp {
12+
@ViewChild(Nav) nav: Nav;
13+
14+
rootPage: any = Menu;
15+
16+
17+
constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) {
18+
this.initializeApp();
19+
20+
21+
22+
}
23+
24+
initializeApp() {
25+
this.platform.ready().then(() => {
26+
// Okay, so the platform is ready and our plugins are available.
27+
// Here you can do any higher level native things you might need.
28+
this.statusBar.styleDefault();
29+
this.splashScreen.hide();
30+
});
31+
}
32+
33+
}

src/app/app.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
4+
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>

src/app/app.module.ts

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { BrowserModule } from '@angular/platform-browser';
2+
import { ErrorHandler, NgModule } from '@angular/core';
3+
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
4+
5+
import { MyApp } from './app.component';
6+
import { HomePage } from '../pages/home/home';
7+
import { Menu } from '../pages/menu/menu';
8+
9+
import { StatusBar } from '@ionic-native/status-bar';
10+
import { SplashScreen } from '@ionic-native/splash-screen';
11+
12+
@NgModule({
13+
declarations: [
14+
MyApp,
15+
HomePage,
16+
Menu
17+
],
18+
imports: [
19+
BrowserModule,
20+
IonicModule.forRoot(MyApp),
21+
],
22+
bootstrap: [IonicApp],
23+
entryComponents: [
24+
MyApp,
25+
HomePage,
26+
Menu
27+
],
28+
providers: [
29+
StatusBar,
30+
SplashScreen,
31+
{provide: ErrorHandler, useClass: IonicErrorHandler}
32+
]
33+
})
34+
export class AppModule {}

src/app/app.scss

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// http://ionicframework.com/docs/v2/theming/
2+
3+
4+
// App Global Sass
5+
// --------------------------------------------------
6+
// Put style rules here that you want to apply globally. These
7+
// styles are for the entire app and not just one component.
8+
// Additionally, this file can be also used as an entry point
9+
// to import other Sass files to be included in the output CSS.
10+
//
11+
// Shared Sass variables, which can be used to adjust Ionic's
12+
// default Sass variables, belong in "theme/variables.scss".
13+
//
14+
// To declare rules for a specific mode, create a child rule
15+
// for the .md, .ios, or .wp mode classes. The mode class is
16+
// automatically applied to the <body> element in the app.

src/app/main.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2+
3+
import { AppModule } from './app.module';
4+
5+
platformBrowserDynamic().bootstrapModule(AppModule);

src/assets/icon/favicon.ico

1.93 KB
Binary file not shown.

src/assets/images/1.jpg

46.2 KB

src/assets/images/2.jpg

61.1 KB

src/assets/images/3.jpg

82.4 KB

src/assets/images/4.jpg

85.9 KB

src/assets/images/banner.jpg

36.9 KB

src/assets/images/banner2.jpg

164 KB

src/assets/images/clothing.jpg

87.7 KB

src/assets/images/logo.png

14 KB

src/assets/images/music.jpg

88.4 KB

src/assets/images/poster.jpg

60.3 KB

src/declarations.d.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
Declaration files are how the Typescript compiler knows about the type information(or shape) of an object.
3+
They're what make intellisense work and make Typescript know all about your code.
4+
5+
A wildcard module is declared below to allow third party libraries to be used in an app even if they don't
6+
provide their own type declarations.
7+
8+
To learn more about using third party libraries in an Ionic app, check out the docs here:
9+
http://ionicframework.com/docs/v2/resources/third-party-libs/
10+
11+
For more info on type definition files, check out the Typescript docs here:
12+
https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
13+
*/
14+
declare module '*';

src/index.html

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html lang="en" dir="ltr">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Ionic App</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
7+
<meta name="format-detection" content="telephone=no">
8+
<meta name="msapplication-tap-highlight" content="no">
9+
10+
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
11+
<link rel="manifest" href="manifest.json">
12+
<meta name="theme-color" content="#4e8ef7">
13+
14+
<!-- cordova.js required for cordova apps -->
15+
<script src="cordova.js"></script>
16+
17+
<!-- un-comment this code to enable service worker
18+
<script>
19+
if ('serviceWorker' in navigator) {
20+
navigator.serviceWorker.register('service-worker.js')
21+
.then(() => console.log('service worker installed'))
22+
.catch(err => console.log('Error', err));
23+
}
24+
</script>-->
25+
26+
<link href="build/main.css" rel="stylesheet">
27+
28+
</head>
29+
<body>
30+
31+
<!-- Ionic's root component and where the app will load -->
32+
<ion-app></ion-app>
33+
34+
<!-- The polyfills js is generated during the build process -->
35+
<script src="build/polyfills.js"></script>
36+
37+
<!-- The bundle js is generated during the build process -->
38+
<script src="build/main.js"></script>
39+
40+
</body>
41+
</html>

src/manifest.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "Ionic",
3+
"short_name": "Ionic",
4+
"start_url": "index.html",
5+
"display": "standalone",
6+
"icons": [{
7+
"src": "assets/imgs/logo.png",
8+
"sizes": "512x512",
9+
"type": "image/png"
10+
}],
11+
"background_color": "#4e8ef7",
12+
"theme_color": "#4e8ef7"
13+
}

src/pages/home/home.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<ion-header>
2+
<ion-navbar>
3+
<button ion-button menuToggle>
4+
<ion-icon name="menu"></ion-icon>
5+
</button>
6+
<ion-title>Home</ion-title>
7+
</ion-navbar>
8+
</ion-header>
9+
10+
<ion-content padding>
11+
<h3>Ionic Menu Starter</h3>
12+
13+
<p>
14+
If you get lost, the <a href="http://ionicframework.com/docs/v2">docs</a> will show you the way.
15+
</p>
16+
17+
<button ion-button secondary menuToggle>Toggle Menu</button>
18+
</ion-content>

src/pages/home/home.scss

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
3+
ion-card {
4+
margin: 0 !important;
5+
width: 100% !important;
6+
}
7+

src/pages/home/home.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Component } from '@angular/core';
2+
import { NavController } from 'ionic-angular';
3+
4+
@Component({
5+
selector: 'page-home',
6+
templateUrl: 'home.html'
7+
})
8+
export class HomePage {
9+
10+
constructor(public navCtrl: NavController) {
11+
12+
}
13+
14+
}

src/pages/menu/menu.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<ion-menu [content]="content">
2+
<ion-header>
3+
<ion-toolbar>
4+
<ion-title>Menu</ion-title>
5+
</ion-toolbar>
6+
</ion-header>
7+
8+
<ion-content>
9+
<ion-list>
10+
<button menuClose ion-item>
11+
Home
12+
</button>
13+
</ion-list>
14+
</ion-content>
15+
16+
</ion-menu>
17+
18+
<ion-nav #content [root]="homePage"></ion-nav>

src/pages/menu/menu.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
page-menu {
2+
3+
}

0 commit comments

Comments
 (0)