").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
--------------------------------------------------------------------------------
/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dmitrykhramov/Admin-Portal-Angular2/2ea6608348fa541a07f8497078003cb5e2db557b/src/favicon.ico
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
AdminPortal
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
Loading...
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 | import './polyfills.ts';
2 |
3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4 | import { enableProdMode } from '@angular/core';
5 | import { environment } from './environments/environment';
6 | import { AppModule } from './app/app.module';
7 |
8 | if (environment.production) {
9 | enableProdMode();
10 | }
11 |
12 | platformBrowserDynamic().bootstrapModule(AppModule);
13 |
--------------------------------------------------------------------------------
/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | // This file includes polyfills needed by Angular 2 and is loaded before
2 | // the app. You can add your own extra polyfills to this file.
3 | import 'core-js/es6/symbol';
4 | import 'core-js/es6/object';
5 | import 'core-js/es6/function';
6 | import 'core-js/es6/parse-int';
7 | import 'core-js/es6/parse-float';
8 | import 'core-js/es6/number';
9 | import 'core-js/es6/math';
10 | import 'core-js/es6/string';
11 | import 'core-js/es6/date';
12 | import 'core-js/es6/array';
13 | import 'core-js/es6/regexp';
14 | import 'core-js/es6/map';
15 | import 'core-js/es6/set';
16 | import 'core-js/es6/reflect';
17 |
18 | import 'core-js/es7/reflect';
19 | import 'zone.js/dist/zone';
20 |
--------------------------------------------------------------------------------
/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | /* You can add global styles to this file, and also import other style files */
3 | @import url('http://fonts.googleapis.com/css?family=Raleway:400,200');
4 | @import url('http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css');
5 |
6 |
7 | html {
8 | background: #ffffff;
9 | width: 100%;
10 | width: 100vw;
11 | height: 100%;
12 | height: 100vh;
13 | font-family: 'Raleway', sans-serif;
14 | }
15 |
16 | .clean-font {
17 | color: #8f8f8f;
18 | font-weight: 200;
19 | }
20 |
21 | .navbar.navbar-clean {
22 | background: #fff;
23 | border-radius: 0;
24 | border-bottom: 1px solid #bfbfbf;
25 | color: #8f8f8f;
26 | }
27 |
28 | .navbar.navbar-clean .navbar-brand {
29 | font-weight: 200;
30 | }
31 |
32 | .navbar.navbar-clean a {
33 | color: #8f8f8f;
34 | }
35 |
36 | .navbar.navbar-clean ul > li > a:hover,
37 | .navbar.navbar-clean li.open a {
38 | background: #fafafa;
39 | }
40 |
41 | .navbar.navbar-clean a i {
42 | position: relative;
43 | top: 1px;
44 | margin-left: 6px;
45 | }
46 |
47 | Required for Dropdowns
48 | .dropdown {
49 | position: relative;
50 | }
51 | .dropdown-toggle:focus {
52 | outline: 0;
53 | }
54 | .dropdown-menu {
55 | position: absolute;
56 | top: 100%;
57 | width: 100%;
58 | left: 0;
59 | z-index: 1000;
60 | display: none;
61 | float: left;
62 | min-width: 200px;
63 | padding: 5px 0;
64 | margin: 15px 0 0;
65 | list-style: none;
66 | font-size: 14px;
67 | text-align: left;
68 | background-color: #fafafa;
69 | border: 1px solid #bfbfbf;
70 | border-radius: 2px;
71 | box-shadow: none;
72 | }
73 | .dropdown-menu:before {
74 | content: "\00a0";
75 | display: block;
76 | height: 10px;
77 | width: 10px;
78 | position: absolute;
79 | top: -6px;
80 | border: 1px solid #8f8f8f;
81 | border-right: 0;
82 | border-bottom: 0;
83 | background-color: #fafafa;
84 | left: 10px;
85 | -webkit-transform: rotate(48deg) skew(5deg);
86 | transform: rotate(48deg) skew(5deg);
87 | }
88 |
89 | li .dropdown-menu:before {
90 | height: 0;
91 | width: 0;
92 | }
93 | .dropdown-menu.pull-right {
94 | right: 0;
95 | left: auto;
96 | }
97 | .dropdown-menu .divider {
98 | height: 1px;
99 | margin: 9px 0;
100 | overflow: hidden;
101 | background-color: #bfbfbf;
102 | }
103 | .dropdown-menu > li > a {
104 | display: block;
105 | padding: 3px 20px;
106 | clear: both;
107 | font-weight: normal;
108 | text-decoration: none;
109 | line-height: 2;
110 | color: #8f8f8f;
111 | white-space: nowrap;
112 | }
113 | .dropdown-menu > li > a:hover,
114 | .dropdown-menu > li > a:focus {
115 | text-decoration: none;
116 | color: #808080;
117 | background-color: #f3f3f3;
118 | }
119 | .open > .dropdown-menu {
120 | display: block;
121 | }
122 | .open > a {
123 | outline: 0;
124 | }
125 | .dropdown-menu-right {
126 | left: auto;
127 | right: 0;
128 | }
129 | .dropdown-menu-left {
130 | left: 0;
131 | right: auto;
132 | }
133 | .dropdown-header {
134 | display: block;
135 | padding: 3px 20px;
136 | font-size: 12px;
137 | line-height: 1.42857143;
138 | color: #777777;
139 | white-space: nowrap;
140 | }
141 | .dropdown-backdrop {
142 | position: fixed;
143 | left: 0;
144 | right: 0;
145 | bottom: 0;
146 | top: 0;
147 | z-index: 990;
148 | }
149 | .pull-right > .dropdown-menu {
150 | right: 0;
151 | left: auto;
152 | }
153 | .dropup .caret,
154 | .navbar-fixed-bottom .dropdown .caret {
155 | border-top: 0;
156 | border-bottom: 4px solid;
157 | content: "";
158 | }
159 | .dropup .dropdown-menu,
160 | .navbar-fixed-bottom .dropdown .dropdown-menu {
161 | top: auto;
162 | bottom: 100%;
163 | margin-bottom: 2px;
164 | }
165 |
166 | .form-signin {
167 | max-width: 380px;
168 | padding: 15px 35px 45px;
169 | margin: 0 auto;
170 | background-color: #fff;
171 | border: 1px solid rgba(0,0,0,0.1);
172 | }
173 |
174 | @media (min-width: 768px) {
175 | .navbar-right .dropdown-menu {
176 | left: auto;
177 | right: 0;
178 | }
179 | .navbar-right .dropdown-menu-left {
180 | left: 0;
181 | right: auto;
182 | }
183 | }
184 | .button-group,
185 | .button-group-vertical {
186 | position: relative;
187 | display: inline-block;
188 | vertical-align: middle;
189 | }
190 | .button-group > .button,
191 | .button-group-vertical > .button {
192 | position: relative;
193 | float: left;
194 | }
195 |
--------------------------------------------------------------------------------
/src/test.ts:
--------------------------------------------------------------------------------
1 | import './polyfills.ts';
2 |
3 | import 'zone.js/dist/long-stack-trace-zone';
4 | import 'zone.js/dist/proxy.js';
5 | import 'zone.js/dist/sync-test';
6 | import 'zone.js/dist/jasmine-patch';
7 | import 'zone.js/dist/async-test';
8 | import 'zone.js/dist/fake-async-test';
9 | import { getTestBed } from '@angular/core/testing';
10 | import {
11 | BrowserDynamicTestingModule,
12 | platformBrowserDynamicTesting
13 | } from '@angular/platform-browser-dynamic/testing';
14 |
15 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
16 | declare var __karma__: any;
17 | declare var require: any;
18 |
19 | // Prevent Karma from running prematurely.
20 | __karma__.loaded = function () {};
21 |
22 | // First, initialize the Angular testing environment.
23 | getTestBed().initTestEnvironment(
24 | BrowserDynamicTestingModule,
25 | platformBrowserDynamicTesting()
26 | );
27 | // Then we find all the tests.
28 | let context = require.context('./', true, /\.spec\.ts$/);
29 | // And load the modules.
30 | context.keys().map(context);
31 | // Finally, start Karma to run the tests.
32 | __karma__.start();
33 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "",
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": ["es6", "dom"],
8 | "mapRoot": "./",
9 | "module": "es6",
10 | "moduleResolution": "node",
11 | "outDir": "../dist/out-tsc",
12 | "sourceMap": true,
13 | "target": "es5",
14 | "typeRoots": [
15 | "../node_modules/@types"
16 | ]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "class-name": true,
7 | "comment-format": [
8 | true,
9 | "check-space"
10 | ],
11 | "curly": true,
12 | "eofline": true,
13 | "forin": true,
14 | "indent": [
15 | true,
16 | "spaces"
17 | ],
18 | "label-position": true,
19 | "max-line-length": [
20 | true,
21 | 140
22 | ],
23 | "member-access": false,
24 | "member-ordering": [
25 | true,
26 | "static-before-instance",
27 | "variables-before-functions"
28 | ],
29 | "no-arg": true,
30 | "no-bitwise": true,
31 | "no-console": [
32 | true,
33 | "debug",
34 | "info",
35 | "time",
36 | "timeEnd",
37 | "trace"
38 | ],
39 | "no-construct": true,
40 | "no-debugger": true,
41 | "no-duplicate-variable": true,
42 | "no-empty": false,
43 | "no-eval": true,
44 | "no-inferrable-types": true,
45 | "no-shadowed-variable": true,
46 | "no-string-literal": false,
47 | "no-switch-case-fall-through": true,
48 | "no-trailing-whitespace": true,
49 | "no-unused-expression": true,
50 | "no-use-before-declare": true,
51 | "no-var-keyword": true,
52 | "object-literal-sort-keys": false,
53 | "one-line": [
54 | true,
55 | "check-open-brace",
56 | "check-catch",
57 | "check-else",
58 | "check-whitespace"
59 | ],
60 | "quotemark": [
61 | true,
62 | "single"
63 | ],
64 | "radix": true,
65 | "semicolon": [
66 | "always"
67 | ],
68 | "triple-equals": [
69 | true,
70 | "allow-null-check"
71 | ],
72 | "typedef-whitespace": [
73 | true,
74 | {
75 | "call-signature": "nospace",
76 | "index-signature": "nospace",
77 | "parameter": "nospace",
78 | "property-declaration": "nospace",
79 | "variable-declaration": "nospace"
80 | }
81 | ],
82 | "variable-name": false,
83 | "whitespace": [
84 | true,
85 | "check-branch",
86 | "check-decl",
87 | "check-operator",
88 | "check-separator",
89 | "check-type"
90 | ],
91 |
92 | "directive-selector": [true, "attribute", "app", "camelCase"],
93 | "component-selector": [true, "element", "app", "kebab-case"],
94 | "use-input-property-decorator": true,
95 | "use-output-property-decorator": true,
96 | "use-host-property-decorator": true,
97 | "no-input-rename": true,
98 | "no-output-rename": true,
99 | "use-life-cycle-interface": true,
100 | "use-pipe-transform-interface": true,
101 | "component-class-suffix": true,
102 | "directive-class-suffix": true,
103 | "no-access-missing-member": true,
104 | "templates-use-public": true,
105 | "invoke-injectable": true
106 | }
107 | }
108 |
--------------------------------------------------------------------------------