diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 00000000..f35b902f --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,15 @@ +FROM node:4.4.5-wheezy + +RUN mkdir /app +WORKDIR /app + + +# Get the usual suspects ;-) +RUN npm install typings webpack-dev-server webpack rimraf -g + + +ADD . /app +EXPOSE 3000 +VOLUME ["/app"] + +CMD bash diff --git a/app b/app new file mode 100755 index 00000000..86ac3790 --- /dev/null +++ b/app @@ -0,0 +1,26 @@ +#!/bin/bash + +registry=docker.sharpen-it.se:5000 +user=sharpertraining +repo=ng2-test +version=latest + +for i in $*; +do + params="$params $i" +done + +params=$(echo "$params" | sed 's/^ *//g' | sed 's/ *$//g') + +case $params in + build) + docker build -t $registry/$user/$repo:$version -f Dockerfile.dev . + ;; + push) + docker push $registry/$user/$repo:$version + ;; + *) + echo "Starting Frontend App Image in [$PWD] using arguments [$params]" + docker run -it --rm -p 3000:3000 --net host -v $PWD:/app:rw $registry/$user/$repo:$version $params + +esac diff --git a/package.json b/package.json index cf510e1f..ce0672d1 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "gh-pages": "wintersmith build -C docs && gh-pages -d docs/build", "start": "npm run server:dev", "start:hmr": "npm run server:dev:hmr", - "postinstall": "npm run typings -- install && bower install", + "postinstall": "npm run typings -- install", "version": "npm run build", "postversion": "git push && git push --tags" }, diff --git a/src/app/app.menu.ts b/src/app/app.menu.ts index 57b6b889..e182d889 100644 --- a/src/app/app.menu.ts +++ b/src/app/app.menu.ts @@ -2,7 +2,7 @@ export const menuItems = [ { title: 'Dashboard', component: 'Dashboard', - icon: 'ion-android-home', + icon: 'fa fa-home', selected: false, expanded: false, order: 0 @@ -10,7 +10,7 @@ export const menuItems = [ { title: 'Charts', component: 'Charts', - icon: 'ion-stats-bars', + icon: 'fa fa-bar-chart', selected: false, expanded: false, order: 200, @@ -24,7 +24,7 @@ export const menuItems = [ { title: 'UI Features', component: 'Ui', - icon: 'ion-android-laptop', + icon: 'fa fa-laptop', selected: false, expanded: false, order: 300, @@ -50,7 +50,7 @@ export const menuItems = [ { title: 'Form Elements', component: 'Forms', - icon: 'ion-compose', + icon: 'fa fa-pencil-square-o', selected: false, expanded: false, order: 400, @@ -68,7 +68,7 @@ export const menuItems = [ { title: 'Tables', component: 'Tables', - icon: 'ion-grid', + icon: 'fa fa-table', selected: false, expanded: false, order: 500, @@ -82,7 +82,7 @@ export const menuItems = [ { title: 'Maps', component: 'Maps', - icon: 'ion-ios-location-outline', + icon: 'fa fa-map-marker', selected: false, expanded: false, order: 600, @@ -107,7 +107,7 @@ export const menuItems = [ }, { title: 'Pages', - icon: 'ion-document', + icon: 'fa fa-sticky-note', selected: false, expanded: false, order: 650, @@ -124,7 +124,7 @@ export const menuItems = [ }, { title: 'Menu Level 1', - icon: 'ion-ios-more', + icon: 'fa fa-level-down', selected: false, expanded: false, order: 700, diff --git a/src/app/pages/ui/components/incons/icons.html b/src/app/pages/ui/components/incons/icons.html index 538a838a..267330b7 100644 --- a/src/app/pages/ui/components/incons/icons.html +++ b/src/app/pages/ui/components/incons/icons.html @@ -28,13 +28,6 @@ See all Kamaleon icons - -
-
-
- See all ionicons icons -
-
diff --git a/src/app/pages/ui/components/incons/icons.service.ts b/src/app/pages/ui/components/incons/icons.service.ts index 4723ef20..ed581946 100644 --- a/src/app/pages/ui/components/incons/icons.service.ts +++ b/src/app/pages/ui/components/incons/icons.service.ts @@ -203,7 +203,6 @@ export class IconsService { name: 'Boss' } ], - ionicons: ['ion-ionic', 'ion-arrow-right-b', 'ion-arrow-down-b', 'ion-arrow-left-b', 'ion-arrow-up-c', 'ion-arrow-right-c', 'ion-arrow-down-c', 'ion-arrow-left-c', 'ion-arrow-return-right', 'ion-arrow-return-left', 'ion-arrow-swap', 'ion-arrow-shrink', 'ion-arrow-expand', 'ion-arrow-move', 'ion-arrow-resize', 'ion-chevron-up', 'ion-chevron-right', 'ion-chevron-down', 'ion-chevron-left', 'ion-navicon-round', 'ion-navicon', 'ion-drag', 'ion-log-in', 'ion-log-out', 'ion-checkmark-round', 'ion-checkmark', 'ion-checkmark-circled', 'ion-close-round', 'ion-plus-round', 'ion-minus-round', 'ion-information', 'ion-help', 'ion-backspace-outline', 'ion-help-buoy', 'ion-asterisk', 'ion-alert', 'ion-alert-circled', 'ion-refresh', 'ion-loop', 'ion-shuffle', 'ion-home', 'ion-search', 'ion-flag', 'ion-star', 'ion-heart', 'ion-heart-broken', 'ion-gear-a', 'ion-gear-b', 'ion-toggle-filled', 'ion-toggle', 'ion-settings', 'ion-wrench', 'ion-hammer', 'ion-edit', 'ion-trash-a', 'ion-trash-b', 'ion-document', 'ion-document-text', 'ion-clipboard', 'ion-scissors', 'ion-funnel', 'ion-bookmark', 'ion-email', 'ion-email-unread', 'ion-folder', 'ion-filing', 'ion-archive', 'ion-reply', 'ion-reply-all', 'ion-forward'], fontAwesomeIcons: ['fa fa-adjust', 'fa fa-anchor', 'fa fa-archive', 'fa fa-area-chart', 'fa fa-arrows', 'fa fa-arrows-h', 'fa fa-arrows-v', 'fa fa-asterisk', 'fa fa-at', 'fa fa-automobile', 'fa fa-ban', 'fa fa-bank', 'fa fa-bar-chart', 'fa fa-bar-chart-o', 'fa fa-barcode', 'fa fa-bars', 'fa fa-bed', 'fa fa-beer', 'fa fa-bell', 'fa fa-bell-o', 'fa fa-bell-slash', 'fa fa-bell-slash-o', 'fa fa-bicycle', 'fa fa-binoculars', 'fa fa-birthday-cake', 'fa fa-bolt', 'fa fa-bomb', 'fa fa-book', 'fa fa-bookmark', 'fa fa-bookmark-o', 'fa fa-briefcase', 'fa fa-bug', 'fa fa-building', 'fa fa-building-o', 'fa fa-bullhorn'], socicon: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', ',', ';', ':', '+', '@', '=', '-', '^', '?', '$', '*', '&', '(', '#', '.', '_', ']', ')', '\'', '"', '}', '{'] }; diff --git a/src/app/theme/components/baSidebar/baSidebar.component.ts b/src/app/theme/components/baSidebar/baSidebar.component.ts index 7cf37c05..929b4662 100644 --- a/src/app/theme/components/baSidebar/baSidebar.component.ts +++ b/src/app/theme/components/baSidebar/baSidebar.component.ts @@ -35,7 +35,7 @@ export class BaSidebar { private _state:AppState) { this.menuItems = this._sidebarService.getMenuItems(); - this._onRouteChange = this._router.root.subscribe((path) => this._selectMenuItem(path)); + this._onRouteChange = this._router.root.subscribe((path) => this._selectMenuItem()); this._state.subscribe('menu.isCollapsed', (isCollapsed) => { this.isMenuCollapsed = isCollapsed; }); @@ -113,9 +113,9 @@ export class BaSidebar { return window.innerWidth <= layoutSizes.resWidthCollapseSidebar; } - private _selectMenuItem(currentPath = null):void { + private _selectMenuItem():void { - let currentMenu = this._sidebarService.setRouter(this._router).selectMenuItem(this.menuItems, currentPath); + let currentMenu = this._sidebarService.setRouter(this._router).selectMenuItem(this.menuItems); this._state.notifyDataChanged('menu.activeLink', currentMenu); // hide menu after natigation on mobile devises if (this._shouldMenuCollapse()) { diff --git a/src/app/theme/components/baSidebar/baSidebar.service.ts b/src/app/theme/components/baSidebar/baSidebar.service.ts index 198811d8..432a1101 100644 --- a/src/app/theme/components/baSidebar/baSidebar.service.ts +++ b/src/app/theme/components/baSidebar/baSidebar.service.ts @@ -15,19 +15,19 @@ export class BaSidebarService { return this; } - public selectMenuItem(items:Array, currentPath:string) { - let currentMenu; + public selectMenuItem(items:Array) { + let currentMenu = null; let assignCurrent = (menu) => (menu.selected ? currentMenu = menu : null); items.forEach((menu: any) => { - this._selectItem(currentPath, [menu.component], menu); + this._selectItem([menu.component], menu); assignCurrent(menu); if (menu.subMenu) { menu.subMenu.forEach((subMenu) => { - this._selectItem(currentPath, [menu.component, subMenu.component], subMenu, menu); + this._selectItem([menu.component, subMenu.component], subMenu, menu); assignCurrent(subMenu); }); } @@ -35,9 +35,9 @@ export class BaSidebarService { return currentMenu; } - private _selectItem(currentPath, instructions, item, parentMenu = null) { + private _selectItem(instructions, item, parentMenu = null) { let route = this._generateRoute(instructions); - item.selected = !item.disabled && this._isCurrent(route) && this._resolvePath(route, '') == currentPath; + item.selected = !item.disabled && this._isCurrent(route); if (parentMenu) { parentMenu.expanded = parentMenu.expanded || item.selected; } diff --git a/src/app/theme/initial.scss b/src/app/theme/initial.scss index 0d3b970f..de6439b3 100644 --- a/src/app/theme/initial.scss +++ b/src/app/theme/initial.scss @@ -1,3 +1,2 @@ @import 'sass/conf/conf'; @import 'sass/preloader'; -@import 'sass/ionicons'; diff --git a/src/app/theme/sass/_ionicons.scss b/src/app/theme/sass/_ionicons.scss deleted file mode 100644 index 213ad922..00000000 --- a/src/app/theme/sass/_ionicons.scss +++ /dev/null @@ -1,3 +0,0 @@ -$ionicons-font-path: "~Ionicons/fonts"; - -@import "~Ionicons/scss/ionicons";