This commit is contained in:
Ronny Roos 2016-06-23 16:07:43 +00:00 committed by GitHub
commit b3b1ec3d9c
10 changed files with 59 additions and 30 deletions

15
Dockerfile.dev Normal file
View file

@ -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

26
app Executable file
View file

@ -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

View file

@ -116,7 +116,7 @@
"gh-pages": "wintersmith build -C docs && gh-pages -d docs/build", "gh-pages": "wintersmith build -C docs && gh-pages -d docs/build",
"start": "npm run server:dev", "start": "npm run server:dev",
"start:hmr": "npm run server:dev:hmr", "start:hmr": "npm run server:dev:hmr",
"postinstall": "npm run typings -- install && bower install", "postinstall": "npm run typings -- install",
"version": "npm run build", "version": "npm run build",
"postversion": "git push && git push --tags" "postversion": "git push && git push --tags"
}, },

View file

@ -2,7 +2,7 @@ export const menuItems = [
{ {
title: 'Dashboard', title: 'Dashboard',
component: 'Dashboard', component: 'Dashboard',
icon: 'ion-android-home', icon: 'fa fa-home',
selected: false, selected: false,
expanded: false, expanded: false,
order: 0 order: 0
@ -10,7 +10,7 @@ export const menuItems = [
{ {
title: 'Charts', title: 'Charts',
component: 'Charts', component: 'Charts',
icon: 'ion-stats-bars', icon: 'fa fa-bar-chart',
selected: false, selected: false,
expanded: false, expanded: false,
order: 200, order: 200,
@ -24,7 +24,7 @@ export const menuItems = [
{ {
title: 'UI Features', title: 'UI Features',
component: 'Ui', component: 'Ui',
icon: 'ion-android-laptop', icon: 'fa fa-laptop',
selected: false, selected: false,
expanded: false, expanded: false,
order: 300, order: 300,
@ -50,7 +50,7 @@ export const menuItems = [
{ {
title: 'Form Elements', title: 'Form Elements',
component: 'Forms', component: 'Forms',
icon: 'ion-compose', icon: 'fa fa-pencil-square-o',
selected: false, selected: false,
expanded: false, expanded: false,
order: 400, order: 400,
@ -68,7 +68,7 @@ export const menuItems = [
{ {
title: 'Tables', title: 'Tables',
component: 'Tables', component: 'Tables',
icon: 'ion-grid', icon: 'fa fa-table',
selected: false, selected: false,
expanded: false, expanded: false,
order: 500, order: 500,
@ -82,7 +82,7 @@ export const menuItems = [
{ {
title: 'Maps', title: 'Maps',
component: 'Maps', component: 'Maps',
icon: 'ion-ios-location-outline', icon: 'fa fa-map-marker',
selected: false, selected: false,
expanded: false, expanded: false,
order: 600, order: 600,
@ -107,7 +107,7 @@ export const menuItems = [
}, },
{ {
title: 'Pages', title: 'Pages',
icon: 'ion-document', icon: 'fa fa-sticky-note',
selected: false, selected: false,
expanded: false, expanded: false,
order: 650, order: 650,
@ -124,7 +124,7 @@ export const menuItems = [
}, },
{ {
title: 'Menu Level 1', title: 'Menu Level 1',
icon: 'ion-ios-more', icon: 'fa fa-level-down',
selected: false, selected: false,
expanded: false, expanded: false,
order: 700, order: 700,

View file

@ -28,13 +28,6 @@
<a href="http://www.kameleon.pics/" target="_blank" class="see-all-icons">See all Kamaleon icons</a> <a href="http://www.kameleon.pics/" target="_blank" class="see-all-icons">See all Kamaleon icons</a>
</ba-card> </ba-card>
<ba-card title="Ionicons" baCardClass="with-scroll">
<div class="row icons-list primary">
<div class="col-xs-2" *ngFor="let icon of icons.ionicons"><i class="{{ icon }}"></i></div>
</div>
<a href="http://ionicons.com/" target="_blank" class="see-all-icons">See all ionicons icons</a>
</ba-card>
<ba-card title="Font Awesome Icons" baCardClass="with-scroll"> <ba-card title="Font Awesome Icons" baCardClass="with-scroll">
<div class="row icons-list success awesomeIcons"> <div class="row icons-list success awesomeIcons">
<div class="col-xs-2" *ngFor="let icon of icons.fontAwesomeIcons"><i class="fa {{ icon }}"></i></div> <div class="col-xs-2" *ngFor="let icon of icons.fontAwesomeIcons"><i class="fa {{ icon }}"></i></div>

View file

@ -203,7 +203,6 @@ export class IconsService {
name: 'Boss' 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'], 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', ',', ';', ':', '+', '@', '=', '-', '^', '?', '$', '*', '&', '(', '#', '.', '_', ']', ')', '\'', '"', '}', '{'] 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', ',', ';', ':', '+', '@', '=', '-', '^', '?', '$', '*', '&', '(', '#', '.', '_', ']', ')', '\'', '"', '}', '{']
}; };

View file

@ -35,7 +35,7 @@ export class BaSidebar {
private _state:AppState) { private _state:AppState) {
this.menuItems = this._sidebarService.getMenuItems(); 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._state.subscribe('menu.isCollapsed', (isCollapsed) => {
this.isMenuCollapsed = isCollapsed; this.isMenuCollapsed = isCollapsed;
}); });
@ -113,9 +113,9 @@ export class BaSidebar {
return window.innerWidth <= layoutSizes.resWidthCollapseSidebar; 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); this._state.notifyDataChanged('menu.activeLink', currentMenu);
// hide menu after natigation on mobile devises // hide menu after natigation on mobile devises
if (this._shouldMenuCollapse()) { if (this._shouldMenuCollapse()) {

View file

@ -15,19 +15,19 @@ export class BaSidebarService {
return this; return this;
} }
public selectMenuItem(items:Array<any>, currentPath:string) { public selectMenuItem(items:Array<any>) {
let currentMenu; let currentMenu = null;
let assignCurrent = (menu) => (menu.selected ? currentMenu = menu : null); let assignCurrent = (menu) => (menu.selected ? currentMenu = menu : null);
items.forEach((menu: any) => { items.forEach((menu: any) => {
this._selectItem(currentPath, [menu.component], menu); this._selectItem([menu.component], menu);
assignCurrent(menu); assignCurrent(menu);
if (menu.subMenu) { if (menu.subMenu) {
menu.subMenu.forEach((subMenu) => { menu.subMenu.forEach((subMenu) => {
this._selectItem(currentPath, [menu.component, subMenu.component], subMenu, menu); this._selectItem([menu.component, subMenu.component], subMenu, menu);
assignCurrent(subMenu); assignCurrent(subMenu);
}); });
} }
@ -35,9 +35,9 @@ export class BaSidebarService {
return currentMenu; return currentMenu;
} }
private _selectItem(currentPath, instructions, item, parentMenu = null) { private _selectItem(instructions, item, parentMenu = null) {
let route = this._generateRoute(instructions); 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) { if (parentMenu) {
parentMenu.expanded = parentMenu.expanded || item.selected; parentMenu.expanded = parentMenu.expanded || item.selected;
} }

View file

@ -1,3 +1,2 @@
@import 'sass/conf/conf'; @import 'sass/conf/conf';
@import 'sass/preloader'; @import 'sass/preloader';
@import 'sass/ionicons';

View file

@ -1,3 +0,0 @@
$ionicons-font-path: "~Ionicons/fonts";
@import "~Ionicons/scss/ionicons";