Skip to content

Commit 8a6fd1e

Browse files
author
Nathan Mc Grath
committed
seed project commit
0 parents  commit 8a6fd1e

38 files changed

+920
-0
lines changed

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
# Cordova
3+
hooks/
4+
platforms/
5+
plugins/
6+
7+
# Dependencies
8+
node_modules/
9+
typings/
10+
11+
# Build
12+
www/
13+
14+
# VS Code
15+
.vscode/

config.xml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3+
<name>HelloCordova</name>
4+
<description>
5+
A sample Apache Cordova application that responds to the deviceready event.
6+
</description>
7+
<author email="[email protected]" href="http://cordova.io">
8+
Apache Cordova Team
9+
</author>
10+
<content src="index.html" />
11+
<plugin name="cordova-plugin-whitelist" spec="1" />
12+
<access origin="*" />
13+
<allow-intent href="http://*/*" />
14+
<allow-intent href="https://*/*" />
15+
<allow-intent href="tel:*" />
16+
<allow-intent href="sms:*" />
17+
<allow-intent href="mailto:*" />
18+
<allow-intent href="geo:*" />
19+
<platform name="android">
20+
<allow-intent href="market:*" />
21+
</platform>
22+
<platform name="ios">
23+
<allow-intent href="itms:*" />
24+
<allow-intent href="itms-apps:*" />
25+
</platform>
26+
</widget>

package.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "big-bin-mobile-angular",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "webpack.config.js",
6+
"dependencies": {},
7+
"devDependencies": {
8+
"angular": "^1.5.3",
9+
"angular-animate": "^1.5.3",
10+
"angular-aria": "^1.5.3",
11+
"angular-cookies": "^1.5.5",
12+
"angular-i18n": "^1.5.5",
13+
"angular-material": "^1.0.7",
14+
"angular-material-data-table": "^0.10.9",
15+
"angular-messages": "^1.5.3",
16+
"angular-mocks": "^1.5.5",
17+
"angular-route": "^1.5.5",
18+
"angular-sanitize": "^1.5.5",
19+
"angular-ui-router": "^0.2.18",
20+
"autoprefixer": "^6.3.6",
21+
"babel-core": "^6.7.6",
22+
"babel-loader": "^6.2.4",
23+
"babel-preset-es2015": "^6.6.0",
24+
"browser-sync": "^2.11.2",
25+
"cordova": "^6.1.1",
26+
"css-loader": "^0.23.1",
27+
"file-loader": "^0.8.5",
28+
"html-loader": "^0.4.3",
29+
"html-webpack-plugin": "^2.15.0",
30+
"moment": "^2.13.0",
31+
"node-sass": "^3.4.2",
32+
"postcss-loader": "^0.8.2",
33+
"ripple-emulator": "^0.9.35",
34+
"sass-loader": "^3.2.0",
35+
"style-loader": "^0.13.1",
36+
"taco": "^1.6.0",
37+
"ts-loader": "^0.8.1",
38+
"tslint": "^3.7.1",
39+
"tslint-loader": "^2.1.3",
40+
"typescript": "^1.8.9",
41+
"typings": "^0.7.12",
42+
"webpack": "^1.12.14",
43+
"webpack-dev-server": "^1.14.1"
44+
},
45+
"scripts": {
46+
"postinstall": "typings install",
47+
"build": "webpack",
48+
"start": "webpack-dev-server --content-base www --inline",
49+
"prestart:browser": "npm run build",
50+
"start:browser": "cordova run browser",
51+
"prestart:ripple": "npm run build",
52+
"start:ripple": "cd www && ripple emulate"
53+
},
54+
"author": "",
55+
"license": "ISC"
56+
}

readme.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Coolest Projects Web App
2+
3+
## How to run
4+
5+
- Clone Project Locally
6+
- Run `npm install` in the root of the project
7+
- Set NODE_ENV environment variable (either snapshot or production)
8+
- Run `npm start` in the root of the project

src/app.scss

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
@import './styles/index';

src/app.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
/**
3+
* Libraries
4+
*/
5+
require('moment');
6+
7+
/**
8+
* App
9+
*/
10+
require('./app.scss');
11+
require('./modules/app/app-module.ts');

src/custom-typings/index.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
declare var require: {
3+
(path: string): any;
4+
(paths: string[], callback: (...modules: any[]) => void): void;
5+
ensure: (paths: string[], callback: (require: <T>(path: string) => T) => void) => void;
6+
};

src/data/endpoints.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
export interface IEndpoints {
3+
Authentication: string;
4+
User: String;
5+
}

src/data/flash.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
export interface IFlashContent {
3+
message: string;
4+
type: string;
5+
}
6+
7+
export interface IFlashService {
8+
display(content: IFlashContent): void;
9+
}

src/data/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export * from './endpoints';
3+
export * from './flash';
4+
export * from './utils';

src/data/utils.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export interface IDatetimeUtilService {
3+
removeTimeFromDate(date: Date): Date;
4+
}

src/index.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
5+
<meta charset="utf-8">
6+
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src fonts.googleapis.com 'self' 'unsafe-inline'; font-src 'self' fonts.gstatic.com; media-src *; connect-src ws: 'self' ">
7+
<meta name="format-detection" content="telephone=no">
8+
<meta name="msapplication-tap-highlight" content="no">
9+
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
10+
11+
<title>Coolest Projects</title>
12+
13+
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
14+
15+
</head>
16+
<body ng-controller="AppController as appCtrl">
17+
18+
<!-- Loading Screen -->
19+
<section id="loading-screen" ng-show="!appCtrl.contentLoaded"
20+
layout="column" layout-align="center center">
21+
<md-progress-circular md-diameter="100" md-mode='indeterminate'>
22+
</md-progress-circular>
23+
</section>
24+
<!-- /Loading Screen -->
25+
26+
<!-- App Content -->
27+
<section id="content" ng-show="appCtrl.contentLoaded">
28+
<ui-view flex></ui-view>
29+
</section>
30+
<!-- /App Content -->
31+
32+
<script type="text/javascript" src="cordova.js"></script>
33+
34+
</body>
35+
</html>

src/modules/app/app-config.ts

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* AppConfig
3+
*/
4+
5+
import {IStateProvider, IState} from 'angular-ui-router';
6+
import {material, IHttpProvider} from 'angular';
7+
import * as moment from 'moment';
8+
9+
let appTemplate: string = require('./app-template.html');
10+
let appState: IState = {
11+
name: 'App',
12+
abstract: true,
13+
url: '',
14+
template: appTemplate
15+
};
16+
17+
export default function AppConfig(
18+
$stateProvider: IStateProvider,
19+
$mdThemingProvider: material.IThemingProvider,
20+
$mdDateLocaleProvider: material.IDateLocaleProvider,
21+
$httpProvider: IHttpProvider
22+
): void {
23+
$stateProvider.state(appState);
24+
$mdThemingProvider.definePalette('Big-Bin-Tipp-Palette', {
25+
'50': '#d0ebff',
26+
'100': '#84cbff',
27+
'200': '#4cb3ff',
28+
'300': '#0495ff',
29+
'400': '#0084e5',
30+
'500': '#0072c6',
31+
'600': '#0060a7',
32+
'700': '#004f89',
33+
'800': '#003d6a',
34+
'900': '#002c4c',
35+
'A100': '#d0ebff',
36+
'A200': '#84cbff',
37+
'A400': '#0084e5',
38+
'A700': '#004f89',
39+
'contrastDefaultColor': 'light',
40+
'contrastDarkColors': '50 100 200 A100 A200'
41+
});
42+
$mdThemingProvider.theme('default').primaryPalette('Big-Bin-Tipp-Palette');
43+
$mdDateLocaleProvider.formatDate = function(date: Date): string {
44+
return moment(date).format('L');
45+
};
46+
}
47+
AppConfig.$inject = [
48+
'$stateProvider', '$mdThemingProvider',
49+
'$mdDateLocaleProvider', '$httpProvider'
50+
];

src/modules/app/app-controller.ts

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
import {IScope, IRootScopeService, ILocaleService} from 'angular';
3+
import {IStateService, IStateParamsService} from 'angular-ui-router';
4+
import * as moment from 'moment';
5+
6+
export default class AppController {
7+
8+
public static $inject: string[] = ['$rootScope', '$scope', '$state', '$stateParams', '$locale'];
9+
10+
public contentLoaded: boolean;
11+
12+
private $rootScope: IRootScopeService;
13+
private $scope: IScope;
14+
private $state: IStateService;
15+
private $stateParams: IStateParamsService;
16+
private $locale: ILocaleService;
17+
18+
constructor(
19+
$rootScope: IRootScopeService,
20+
$scope: IScope,
21+
$state: IStateService,
22+
$stateParams: IStateParamsService,
23+
$locale: ILocaleService
24+
) {
25+
26+
this.$rootScope = $rootScope;
27+
this.$scope = $scope;
28+
this.$state = $state;
29+
this.$stateParams = $stateParams;
30+
this.$locale = $locale;
31+
32+
moment.locale(this.$locale.id);
33+
34+
this.$rootScope.$on('$viewContentLoading', () => {
35+
this.contentLoaded = false;
36+
});
37+
38+
this.$scope.$on('$viewContentLoaded', () => {
39+
this.contentLoaded = true;
40+
});
41+
42+
}
43+
44+
}

src/modules/app/app-module.ts

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
/**
3+
* Core Angular
4+
*/
5+
require('angular');
6+
require('angular-animate');
7+
require('angular-aria');
8+
require('angular-cookies');
9+
require('angular-messages');
10+
require('angular-ui-router');
11+
require('angular-i18n/en-ie.js');
12+
13+
/**
14+
* 3rd Party Angular
15+
*/
16+
require('angular-material');
17+
require('angular-material-data-table');
18+
require('angular-material-data-table/dist/md-data-table.css');
19+
20+
/**
21+
* App Modules
22+
*/
23+
require('config');
24+
require('./nav/nav-module.ts');
25+
26+
/**
27+
* Other Modules
28+
*/
29+
require('../utils/utils-module.ts');
30+
31+
/**
32+
* Imports
33+
*/
34+
import AppConfig from './app-config';
35+
import AppController from './app-controller';
36+
37+
angular.module('App', [
38+
'ngAnimate', 'ngAria', 'ngMessages', 'ngLocale', 'ngCookies',
39+
'ngMaterial', 'ui.router', 'md.data.table',
40+
'App.Config', 'App.Nav', 'App.Utils'
41+
])
42+
.config(AppConfig)
43+
.controller('AppController', AppController);
44+
45+
window.onload = function (): void {
46+
angular.bootstrap(document, ['App']);
47+
};

src/modules/app/app-template.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
<div id="app">
3+
4+
<div ui-view="sidenav"></div>
5+
6+
<div ui-view="toolbar"></div>
7+
8+
<md-content layout="column" layout-padding>
9+
10+
<div ui-view="content"></div>
11+
12+
</md-content>
13+
14+
</div>

src/modules/app/config/production.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
angular.module('App.Config', [])
3+
.constant('ENDPOINTS', {
4+
Projects: '',
5+
Firebase: ''
6+
});

src/modules/app/config/snapshot.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
angular.module('App.Config', [])
3+
.constant('ENDPOINTS', {
4+
Projects: '',
5+
Firebase: ''
6+
});

0 commit comments

Comments
 (0)