Initial commit
17
.editorconfig
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
|
||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
# We recommend you to keep these unchanged
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
35
.gitignore
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# Specifies intentionally untracked files to ignore when using Git
|
||||||
|
# http://git-scm.com/docs/gitignore
|
||||||
|
|
||||||
|
*~
|
||||||
|
*.sw[mnpcod]
|
||||||
|
*.log
|
||||||
|
*.tmp
|
||||||
|
*.tmp.*
|
||||||
|
log.txt
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
.vscode/
|
||||||
|
npm-debug.log*
|
||||||
|
|
||||||
|
.idea/
|
||||||
|
.sourcemaps/
|
||||||
|
.sass-cache/
|
||||||
|
.tmp/
|
||||||
|
.versions/
|
||||||
|
coverage/
|
||||||
|
dist/
|
||||||
|
node_modules/
|
||||||
|
tmp/
|
||||||
|
temp/
|
||||||
|
hooks/
|
||||||
|
platforms/
|
||||||
|
plugins/
|
||||||
|
plugins/android.json
|
||||||
|
plugins/ios.json
|
||||||
|
www/
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
UserInterfaceState.xcuserstate
|
84
config.xml
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||||
|
<name>OpenVoti</name>
|
||||||
|
<description>An awesome Ionic/Cordova app.</description>
|
||||||
|
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
|
||||||
|
<content src="index.html" />
|
||||||
|
<access origin="*" />
|
||||||
|
<allow-intent href="http://*/*" />
|
||||||
|
<allow-intent href="https://*/*" />
|
||||||
|
<allow-intent href="tel:*" />
|
||||||
|
<allow-intent href="sms:*" />
|
||||||
|
<allow-intent href="mailto:*" />
|
||||||
|
<allow-intent href="geo:*" />
|
||||||
|
<preference name="ScrollEnabled" value="false" />
|
||||||
|
<preference name="android-minSdkVersion" value="16" />
|
||||||
|
<preference name="BackupWebStorage" value="none" />
|
||||||
|
<preference name="SplashMaintainAspectRatio" value="true" />
|
||||||
|
<preference name="FadeSplashScreenDuration" value="300" />
|
||||||
|
<preference name="SplashShowOnlyFirstTime" value="false" />
|
||||||
|
<preference name="SplashScreen" value="screen" />
|
||||||
|
<preference name="SplashScreenDelay" value="3000" />
|
||||||
|
<platform name="android">
|
||||||
|
<allow-intent href="market:*" />
|
||||||
|
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
|
||||||
|
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
|
||||||
|
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
|
||||||
|
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
|
||||||
|
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
|
||||||
|
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
|
||||||
|
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
|
||||||
|
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
|
||||||
|
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
|
||||||
|
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
|
||||||
|
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
|
||||||
|
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
|
||||||
|
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
|
||||||
|
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
|
||||||
|
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
|
||||||
|
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
|
||||||
|
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
|
||||||
|
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
|
||||||
|
</platform>
|
||||||
|
<platform name="ios">
|
||||||
|
<allow-intent href="itms:*" />
|
||||||
|
<allow-intent href="itms-apps:*" />
|
||||||
|
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
|
||||||
|
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
|
||||||
|
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
|
||||||
|
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
|
||||||
|
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
|
||||||
|
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
|
||||||
|
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
|
||||||
|
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
|
||||||
|
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
|
||||||
|
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
|
||||||
|
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
|
||||||
|
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
|
||||||
|
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
|
||||||
|
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
|
||||||
|
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
|
||||||
|
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
|
||||||
|
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
|
||||||
|
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
|
||||||
|
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
|
||||||
|
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
|
||||||
|
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
|
||||||
|
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
|
||||||
|
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
|
||||||
|
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
|
||||||
|
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
|
||||||
|
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
|
||||||
|
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
|
||||||
|
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
|
||||||
|
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
|
||||||
|
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
|
||||||
|
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
|
||||||
|
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
|
||||||
|
</platform>
|
||||||
|
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
|
||||||
|
<plugin name="cordova-plugin-whitelist" spec="1.3.1" />
|
||||||
|
<plugin name="cordova-plugin-device" spec="1.1.4" />
|
||||||
|
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
|
||||||
|
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.11" />
|
||||||
|
</widget>
|
8
ionic.config.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "OpenVoti",
|
||||||
|
"app_id": "",
|
||||||
|
"type": "ionic-angular",
|
||||||
|
"integrations": {
|
||||||
|
"cordova": {}
|
||||||
|
}
|
||||||
|
}
|
5369
package-lock.json
generated
Normal file
38
package.json
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
"name": "OpenVoti",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"author": "Ionic Framework",
|
||||||
|
"homepage": "http://ionicframework.com/",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"clean": "ionic-app-scripts clean",
|
||||||
|
"build": "ionic-app-scripts build",
|
||||||
|
"lint": "ionic-app-scripts lint",
|
||||||
|
"ionic:build": "ionic-app-scripts build",
|
||||||
|
"ionic:serve": "ionic-app-scripts serve"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@angular/common": "5.0.3",
|
||||||
|
"@angular/compiler": "5.0.3",
|
||||||
|
"@angular/compiler-cli": "5.0.3",
|
||||||
|
"@angular/core": "5.0.3",
|
||||||
|
"@angular/forms": "5.0.3",
|
||||||
|
"@angular/http": "5.0.3",
|
||||||
|
"@angular/platform-browser": "5.0.3",
|
||||||
|
"@angular/platform-browser-dynamic": "5.0.3",
|
||||||
|
"@ionic-native/core": "4.4.0",
|
||||||
|
"@ionic-native/splash-screen": "4.4.0",
|
||||||
|
"@ionic-native/status-bar": "4.4.0",
|
||||||
|
"@ionic/storage": "2.1.3",
|
||||||
|
"ionic-angular": "3.9.2",
|
||||||
|
"ionicons": "3.0.0",
|
||||||
|
"rxjs": "5.5.2",
|
||||||
|
"sw-toolbox": "3.6.0",
|
||||||
|
"zone.js": "0.8.18"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@ionic/app-scripts": "3.1.6",
|
||||||
|
"typescript": "2.4.2"
|
||||||
|
},
|
||||||
|
"description": "An Ionic project"
|
||||||
|
}
|
8
resources/README.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
These are Cordova resources. You can replace icon.png and splash.png and run
|
||||||
|
`ionic cordova resources` to generate custom icons and splash screens for your
|
||||||
|
app. See `ionic cordova resources --help` for details.
|
||||||
|
|
||||||
|
Cordova reference documentation:
|
||||||
|
|
||||||
|
- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
|
||||||
|
- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
|
BIN
resources/android/icon/drawable-hdpi-icon.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
resources/android/icon/drawable-ldpi-icon.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/android/icon/drawable-mdpi-icon.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/android/icon/drawable-xhdpi-icon.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
resources/android/icon/drawable-xxhdpi-icon.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
resources/android/icon/drawable-xxxhdpi-icon.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
resources/android/splash/drawable-land-hdpi-screen.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
resources/android/splash/drawable-land-ldpi-screen.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/android/splash/drawable-land-mdpi-screen.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
resources/android/splash/drawable-land-xhdpi-screen.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
resources/android/splash/drawable-land-xxhdpi-screen.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
resources/android/splash/drawable-land-xxxhdpi-screen.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
resources/android/splash/drawable-port-hdpi-screen.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
resources/android/splash/drawable-port-ldpi-screen.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
resources/android/splash/drawable-port-mdpi-screen.png
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
resources/android/splash/drawable-port-xhdpi-screen.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
resources/android/splash/drawable-port-xxhdpi-screen.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
resources/android/splash/drawable-port-xxxhdpi-screen.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
resources/icon.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
resources/ios/icon/icon-1024.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
resources/ios/icon/icon-40.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/ios/icon/icon-40@2x.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
resources/ios/icon/icon-40@3x.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
resources/ios/icon/icon-50.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
resources/ios/icon/icon-50@2x.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
resources/ios/icon/icon-60.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
resources/ios/icon/icon-60@2x.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
resources/ios/icon/icon-60@3x.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
resources/ios/icon/icon-72.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
resources/ios/icon/icon-72@2x.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
resources/ios/icon/icon-76.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
resources/ios/icon/icon-76@2x.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
resources/ios/icon/icon-83.5@2x.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
resources/ios/icon/icon-small.png
Normal file
After Width: | Height: | Size: 818 B |
BIN
resources/ios/icon/icon-small@2x.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
resources/ios/icon/icon-small@3x.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
resources/ios/icon/icon.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/ios/icon/icon@2x.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
resources/ios/splash/Default-568h@2x~iphone.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
resources/ios/splash/Default-667h.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
resources/ios/splash/Default-736h.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
resources/ios/splash/Default-Landscape-736h.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
resources/ios/splash/Default-Landscape@2x~ipad.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
resources/ios/splash/Default-Landscape@~ipadpro.png
Normal file
After Width: | Height: | Size: 158 KiB |
BIN
resources/ios/splash/Default-Landscape~ipad.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
resources/ios/splash/Default-Portrait@2x~ipad.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
resources/ios/splash/Default-Portrait@~ipadpro.png
Normal file
After Width: | Height: | Size: 153 KiB |
BIN
resources/ios/splash/Default-Portrait~ipad.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
resources/ios/splash/Default@2x~iphone.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
resources/ios/splash/Default@2x~universal~anyany.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
resources/ios/splash/Default~iphone.png
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
resources/splash.png
Normal file
After Width: | Height: | Size: 77 KiB |
44
src/app/app.component.ts
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
import { Component, ViewChild } from '@angular/core';
|
||||||
|
import { Nav, Platform } from 'ionic-angular';
|
||||||
|
import { StatusBar } from '@ionic-native/status-bar';
|
||||||
|
import { SplashScreen } from '@ionic-native/splash-screen';
|
||||||
|
|
||||||
|
import { HomePage } from '../pages/home/home';
|
||||||
|
import { ListPage } from '../pages/list/list';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
templateUrl: 'app.html'
|
||||||
|
})
|
||||||
|
export class MyApp {
|
||||||
|
@ViewChild(Nav) nav: Nav;
|
||||||
|
|
||||||
|
rootPage: any = HomePage;
|
||||||
|
|
||||||
|
pages: Array<{title: string, component: any}>;
|
||||||
|
|
||||||
|
constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) {
|
||||||
|
this.initializeApp();
|
||||||
|
|
||||||
|
// used for an example of ngFor and navigation
|
||||||
|
this.pages = [
|
||||||
|
{ title: 'Home', component: HomePage },
|
||||||
|
{ title: 'List', component: ListPage }
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
initializeApp() {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
// Okay, so the platform is ready and our plugins are available.
|
||||||
|
// Here you can do any higher level native things you might need.
|
||||||
|
this.statusBar.styleDefault();
|
||||||
|
this.splashScreen.hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
openPage(page) {
|
||||||
|
// Reset the content nav to have just this page
|
||||||
|
// we wouldn't want the back button to show in this scenario
|
||||||
|
this.nav.setRoot(page.component);
|
||||||
|
}
|
||||||
|
}
|
19
src/app/app.html
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<ion-menu [content]="content">
|
||||||
|
<ion-header>
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-title>Menu</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<ion-list>
|
||||||
|
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
|
||||||
|
{{p.title}}
|
||||||
|
</button>
|
||||||
|
</ion-list>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
</ion-menu>
|
||||||
|
|
||||||
|
<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
|
||||||
|
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
34
src/app/app.module.ts
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
import { ErrorHandler, NgModule } from '@angular/core';
|
||||||
|
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
|
||||||
|
|
||||||
|
import { MyApp } from './app.component';
|
||||||
|
import { HomePage } from '../pages/home/home';
|
||||||
|
import { ListPage } from '../pages/list/list';
|
||||||
|
|
||||||
|
import { StatusBar } from '@ionic-native/status-bar';
|
||||||
|
import { SplashScreen } from '@ionic-native/splash-screen';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
MyApp,
|
||||||
|
HomePage,
|
||||||
|
ListPage
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
BrowserModule,
|
||||||
|
IonicModule.forRoot(MyApp),
|
||||||
|
],
|
||||||
|
bootstrap: [IonicApp],
|
||||||
|
entryComponents: [
|
||||||
|
MyApp,
|
||||||
|
HomePage,
|
||||||
|
ListPage
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
StatusBar,
|
||||||
|
SplashScreen,
|
||||||
|
{provide: ErrorHandler, useClass: IonicErrorHandler}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class AppModule {}
|
16
src/app/app.scss
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// http://ionicframework.com/docs/theming/
|
||||||
|
|
||||||
|
|
||||||
|
// App Global Sass
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Put style rules here that you want to apply globally. These
|
||||||
|
// styles are for the entire app and not just one component.
|
||||||
|
// Additionally, this file can be also used as an entry point
|
||||||
|
// to import other Sass files to be included in the output CSS.
|
||||||
|
//
|
||||||
|
// Shared Sass variables, which can be used to adjust Ionic's
|
||||||
|
// default Sass variables, belong in "theme/variables.scss".
|
||||||
|
//
|
||||||
|
// To declare rules for a specific mode, create a child rule
|
||||||
|
// for the .md, .ios, or .wp mode classes. The mode class is
|
||||||
|
// automatically applied to the <body> element in the app.
|
5
src/app/main.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
BIN
src/assets/icon/favicon.ico
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/imgs/logo.png
Normal file
After Width: | Height: | Size: 39 KiB |
49
src/index.html
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Ionic App</title>
|
||||||
|
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
<meta name="msapplication-tap-highlight" content="no">
|
||||||
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
|
||||||
|
<link rel="manifest" href="manifest.json">
|
||||||
|
<meta name="theme-color" content="#4e8ef7">
|
||||||
|
|
||||||
|
<!-- add to homescreen for ios -->
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
|
<!-- cordova.js required for cordova apps (remove if not needed) -->
|
||||||
|
<script src="cordova.js"></script>
|
||||||
|
|
||||||
|
<!-- un-comment this code to enable service worker
|
||||||
|
<script>
|
||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
navigator.serviceWorker.register('service-worker.js')
|
||||||
|
.then(() => console.log('service worker installed'))
|
||||||
|
.catch(err => console.error('Error', err));
|
||||||
|
}
|
||||||
|
</script>-->
|
||||||
|
|
||||||
|
<link href="build/main.css" rel="stylesheet">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Ionic's root component and where the app will load -->
|
||||||
|
<ion-app></ion-app>
|
||||||
|
|
||||||
|
<!-- The polyfills js is generated during the build process -->
|
||||||
|
<script src="build/polyfills.js"></script>
|
||||||
|
|
||||||
|
<!-- The vendor js is generated during the build process
|
||||||
|
It contains all of the dependencies in node_modules -->
|
||||||
|
<script src="build/vendor.js"></script>
|
||||||
|
|
||||||
|
<!-- The main bundle js is generated during the build process -->
|
||||||
|
<script src="build/main.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
13
src/manifest.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"name": "Ionic",
|
||||||
|
"short_name": "Ionic",
|
||||||
|
"start_url": "index.html",
|
||||||
|
"display": "standalone",
|
||||||
|
"icons": [{
|
||||||
|
"src": "assets/imgs/logo.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}],
|
||||||
|
"background_color": "#4e8ef7",
|
||||||
|
"theme_color": "#4e8ef7"
|
||||||
|
}
|
18
src/pages/home/home.html
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<ion-header>
|
||||||
|
<ion-navbar>
|
||||||
|
<button ion-button menuToggle>
|
||||||
|
<ion-icon name="menu"></ion-icon>
|
||||||
|
</button>
|
||||||
|
<ion-title>Home</ion-title>
|
||||||
|
</ion-navbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content padding>
|
||||||
|
<h3>Ionic Menu Starter</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you get lost, the <a href="http://ionicframework.com/docs/v2">docs</a> will show you the way.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<button ion-button secondary menuToggle>Toggle Menu</button>
|
||||||
|
</ion-content>
|
3
src/pages/home/home.scss
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
page-home {
|
||||||
|
|
||||||
|
}
|
14
src/pages/home/home.ts
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { NavController } from 'ionic-angular';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'page-home',
|
||||||
|
templateUrl: 'home.html'
|
||||||
|
})
|
||||||
|
export class HomePage {
|
||||||
|
|
||||||
|
constructor(public navCtrl: NavController) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
23
src/pages/list/list.html
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<ion-header>
|
||||||
|
<ion-navbar>
|
||||||
|
<button ion-button menuToggle>
|
||||||
|
<ion-icon name="menu"></ion-icon>
|
||||||
|
</button>
|
||||||
|
<ion-title>List</ion-title>
|
||||||
|
</ion-navbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<ion-list>
|
||||||
|
<button ion-item *ngFor="let item of items" (click)="itemTapped($event, item)">
|
||||||
|
<ion-icon [name]="item.icon" item-start></ion-icon>
|
||||||
|
{{item.title}}
|
||||||
|
<div class="item-note" item-end>
|
||||||
|
{{item.note}}
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</ion-list>
|
||||||
|
<div *ngIf="selectedItem" padding>
|
||||||
|
You navigated here from <b>{{selectedItem.title}}</b>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
3
src/pages/list/list.scss
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
page-list {
|
||||||
|
|
||||||
|
}
|
37
src/pages/list/list.ts
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { NavController, NavParams } from 'ionic-angular';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'page-list',
|
||||||
|
templateUrl: 'list.html'
|
||||||
|
})
|
||||||
|
export class ListPage {
|
||||||
|
selectedItem: any;
|
||||||
|
icons: string[];
|
||||||
|
items: Array<{title: string, note: string, icon: string}>;
|
||||||
|
|
||||||
|
constructor(public navCtrl: NavController, public navParams: NavParams) {
|
||||||
|
// If we navigated to this page, we will have an item available as a nav param
|
||||||
|
this.selectedItem = navParams.get('item');
|
||||||
|
|
||||||
|
// Let's populate this page with some filler content for funzies
|
||||||
|
this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',
|
||||||
|
'american-football', 'boat', 'bluetooth', 'build'];
|
||||||
|
|
||||||
|
this.items = [];
|
||||||
|
for (let i = 1; i < 11; i++) {
|
||||||
|
this.items.push({
|
||||||
|
title: 'Item ' + i,
|
||||||
|
note: 'This is item #' + i,
|
||||||
|
icon: this.icons[Math.floor(Math.random() * this.icons.length)]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
itemTapped(event, item) {
|
||||||
|
// That's right, we're pushing to ourselves!
|
||||||
|
this.navCtrl.push(ListPage, {
|
||||||
|
item: item
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
31
src/service-worker.js
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/**
|
||||||
|
* Check out https://googlechromelabs.github.io/sw-toolbox/ for
|
||||||
|
* more info on how to use sw-toolbox to custom configure your service worker.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
importScripts('./build/sw-toolbox.js');
|
||||||
|
|
||||||
|
self.toolbox.options.cache = {
|
||||||
|
name: 'ionic-cache'
|
||||||
|
};
|
||||||
|
|
||||||
|
// pre-cache our key assets
|
||||||
|
self.toolbox.precache(
|
||||||
|
[
|
||||||
|
'./build/main.js',
|
||||||
|
'./build/vendor.js',
|
||||||
|
'./build/main.css',
|
||||||
|
'./build/polyfills.js',
|
||||||
|
'index.html',
|
||||||
|
'manifest.json'
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// dynamically cache any other local assets
|
||||||
|
self.toolbox.router.any('/*', self.toolbox.fastest);
|
||||||
|
|
||||||
|
// for any other requests go to the network, cache,
|
||||||
|
// and then only use that cached resource if your user goes offline
|
||||||
|
self.toolbox.router.default = self.toolbox.networkFirst;
|
88
src/theme/variables.scss
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
// Ionic Variables and Theming. For more info, please see:
|
||||||
|
// http://ionicframework.com/docs/theming/
|
||||||
|
|
||||||
|
// Font path is used to include ionicons,
|
||||||
|
// roboto, and noto sans fonts
|
||||||
|
$font-path: "../assets/fonts";
|
||||||
|
|
||||||
|
|
||||||
|
// The app direction is used to include
|
||||||
|
// rtl styles in your app. For more info, please see:
|
||||||
|
// http://ionicframework.com/docs/theming/rtl-support/
|
||||||
|
$app-direction: ltr;
|
||||||
|
|
||||||
|
|
||||||
|
@import "ionic.globals";
|
||||||
|
|
||||||
|
|
||||||
|
// Shared Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
// To customize the look and feel of this app, you can override
|
||||||
|
// the Sass variables found in Ionic's source scss files.
|
||||||
|
// To view all the possible Ionic variables, see:
|
||||||
|
// http://ionicframework.com/docs/theming/overriding-ionic-variables/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Named Color Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Named colors makes it easy to reuse colors on various components.
|
||||||
|
// It's highly recommended to change the default colors
|
||||||
|
// to match your app's branding. Ionic uses a Sass map of
|
||||||
|
// colors so you can add, rename and remove colors as needed.
|
||||||
|
// The "primary" color is the only required color in the map.
|
||||||
|
|
||||||
|
$colors: (
|
||||||
|
primary: #488aff,
|
||||||
|
secondary: #32db64,
|
||||||
|
danger: #f53d3d,
|
||||||
|
light: #f4f4f4,
|
||||||
|
dark: #222
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// App iOS Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
// iOS only Sass variables can go here
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// App Material Design Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Material Design only Sass variables can go here
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// App Windows Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Windows only Sass variables can go here
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// App Theme
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Ionic apps can have different themes applied, which can
|
||||||
|
// then be future customized. This import comes last
|
||||||
|
// so that the above variables are used and Ionic's
|
||||||
|
// default are overridden.
|
||||||
|
|
||||||
|
@import "ionic.theme.default";
|
||||||
|
|
||||||
|
|
||||||
|
// Ionicons
|
||||||
|
// --------------------------------------------------
|
||||||
|
// The premium icon font for Ionic. For more info, please see:
|
||||||
|
// http://ionicframework.com/docs/ionicons/
|
||||||
|
|
||||||
|
@import "ionic.ionicons";
|
||||||
|
|
||||||
|
|
||||||
|
// Fonts
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
@import "roboto";
|
||||||
|
@import "noto-sans";
|
31
tsconfig.json
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"declaration": false,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"es2015"
|
||||||
|
],
|
||||||
|
"module": "es2015",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"sourceMap": true,
|
||||||
|
"target": "es5",
|
||||||
|
"typeRoots": [
|
||||||
|
"../node_modules/@types"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"src/**/*.spec.ts",
|
||||||
|
"src/**/__tests__/*.ts"
|
||||||
|
],
|
||||||
|
"compileOnSave": false,
|
||||||
|
"atom": {
|
||||||
|
"rewriteTsconfig": false
|
||||||
|
}
|
||||||
|
}
|
11
tslint.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"rules": {
|
||||||
|
"no-duplicate-variable": true,
|
||||||
|
"no-unused-variable": [
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rulesDirectory": [
|
||||||
|
"node_modules/tslint-eslint-rules/dist/rules"
|
||||||
|
]
|
||||||
|
}
|