Skip to content

Commit

Permalink
Merge pull request #157 from IgniteUI/IGanchev/ng-cli-mockup
Browse files Browse the repository at this point in the history
Implement igx-ts empty project mockup
  • Loading branch information
bazal4o authored Feb 16, 2018
2 parents 9740945 + 7254119 commit 1ac4f4d
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 36 deletions.
2 changes: 1 addition & 1 deletion lib/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as fsExtra from "fs-extra";
import * as glob from "glob";
import * as path from "path";
import through2 = require("through2");
const imageExtensions = [".png", ".jpg", "jpeg", "gif", "bmp"];
const imageExtensions = [".png", ".jpg", ".jpeg", ".gif", ".bmp"];
const applyConfig = (configuration: { [key: string]: string }) => {
return through2((data, enc, cb) => {
cb(null, new Buffer(Util.applyConfigTransformation(data.toString(), configuration)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
PagingError,
SortingDirection,
StableSortingStrategy,
IgxIcon
IgxIconComponent
} from 'igniteui-angular/main';
import { IgxGridComponent } from 'igniteui-angular/grid/grid.component';
import { timer } from 'rxjs/observable/timer';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<p>igx-date-picker component. You can read more about configuring the igx-date-picker component
<a href="https://github.com/IgniteUI/igniteui-angular/blob/master/src/date-picker/README.md" target="_blank">here</a>.</p>
<igx-datePicker [cancelButtonLabel]="'Close'"[todayButtonLabel]="'Today'"></igx-datePicker>
<igx-datePicker [cancelButtonLabel]="'Close'"[todayButtonLabel]="'Today'" [value]="today"></igx-datePicker>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ export class $(ClassName)Component implements OnInit {

public ngOnInit() {
}

public today: Date = new Date(Date.now());
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit, ViewEncapsulation } from "@angular/core";
import { IgxFilterOptions, IgxListItem } from 'igniteui-angular/main';
import { IgxFilterOptions, IgxListItemComponent } from 'igniteui-angular/main';

@Component({
selector: "$(filePrefix)",
Expand Down Expand Up @@ -47,7 +47,7 @@ export class $(ClassName)Component implements OnInit {

ngOnInit() { }

public toggleFavorite(item: IgxListItem) {
public toggleFavorite(item: IgxListItemComponent) {
const contact = this.contacts[item.index - 1];
contact.isFavorite = !contact.isFavorite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css",
"../node_modules/igniteui-angular/igniteui-angular.css"
"styles.sass"
],
"scripts": ["../node_modules/hammerjs/hammer.min.js"],
"environmentSource": "environments/environment.ts",
Expand Down Expand Up @@ -55,7 +54,7 @@
}
},
"defaults": {
"styleExt": "css",
"styleExt": "sass",
"component": {}
}
}
2 changes: 1 addition & 1 deletion templates/angular/igx-ts/projects/empty/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@angular/router": "^5.0.0",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"igniteui-angular": "^5.1.3",
"igniteui-angular": "5.2.0-beta.1",
"igniteui-cli": "^1.0.4",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.main {
width: 100%;
}

h3 {
padding-left: 16px;
}

.content {
flex: 1 1 100%;
padding: 20px;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<nav style="display: flex; justify-content: center; flex-wrap: wrap">
<span igxButton *ngFor="let route of topNavLinks" routerLink="{{route.path}}">{{route.name}}</span>
</nav>
<router-outlet></router-outlet>
<div class="main" igxLayout>
<igx-nav-drawer #nav id="project-menu" isOpen="true" [enableGestures]='true' width="280px">
<ng-template igxDrawer>
<span igxDrawerItem [isHeader]="true">Views</span>
<span *ngFor="let route of topNavLinks" igxDrawerItem igxRipple routerLinkActive="igx-nav-drawer__item--active" routerLink="{{route.path}}">{{route.name}}</span>
</ng-template>
</igx-nav-drawer>
<div igxFlex>
<igx-navbar title="IgniteUI for Angular!" actionButtonIcon="menu" (onAction)="nav.toggle()" igxFlex></igx-navbar>
<div class="content">
<router-outlet></router-outlet>
</div>
</div>
</div>

33 changes: 18 additions & 15 deletions templates/angular/igx-ts/projects/empty/files/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@ import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

import { IgxButtonModule } from 'igniteui-angular/main';
import { IgxNavigationDrawerModule, IgxNavbarModule, IgxLayoutModule, IgxRippleModule } from 'igniteui-angular/main';
import { HomeComponent } from './home/home.component';

@NgModule({
declarations: [
AppComponent,
HomeComponent
],
imports: [
BrowserModule,
FormsModule,
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
IgxButtonModule
],
providers: [],
bootstrap: [AppComponent]

declarations: [
AppComponent,
HomeComponent
],
imports: [
FormsModule,
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
IgxNavigationDrawerModule,
IgxNavbarModule,
IgxLayoutModule,
IgxRippleModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
a {
color: #731963;
}

.links{
display: inline-block;
text-align: center;
flex: 1 1 33%;
}

ul#linksContainer {
display: flex;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
<h1>
Welcome to {{title}}!
</h1>
<img src="assets/Ignite-header-apps-960.png" alt="Ignite UI" height="602" width="602" >
<img src="assets/responsive.gif" alt="Ignite UI CLI">
</div>
<h2>Here are some links to help you start: </h2>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://www.infragistics.com/products/ignite-ui-angular">Ignite UI for Angular</a></h2>

<ul id="linksContainer">
<li class="links">
<h3><a target="_blank" rel="noopener" href="https://github.com/IgniteUI/ignite-ui-cli">Ignite UI CLI </a></h3>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://github.com/IgniteUI/ignite-ui-cli">Ignite UI CLI </a></h2>
<li class="links">
<h3><a target="_blank" rel="noopener" href="https://www.infragistics.com/products/ignite-ui-angular">Component Demos</a></h3>
</li>
<li class="links">
<h3><a target="_blank" rel="noopener" href="https://github.com/IgniteUI/igniteui-angular-ui-kits">Sketch UI Kit</a></h3>
</li>
</ul>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions templates/angular/igx-ts/projects/empty/files/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">
</head>
<body>
<app-root></app-root>
Expand Down

This file was deleted.

28 changes: 28 additions & 0 deletions templates/angular/igx-ts/projects/empty/files/src/styles.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* You can add global styles to this file, and also import other style files */
@import "~igniteui-angular/core/styles/themes/index"

@include igx-core()
@include igx-theme()

$purple: #731963 !default
$grey: #f0f0f0 !default

$app-palette: igx-palette($purple, $grey);
@include igx-theme($app-palette)

//$navbar-theme: igx-navbar-theme($background: #731963)
//@include igx-navbar($navbar-theme)
$title-margin: 15px

$carosel-width: 80%
$datepicker-width: 200px

.content p
margin: $title-margin

.igx-carousel
width: $carosel-width

.igx-date-picker
width: $datepicker-width

0 comments on commit 1ac4f4d

Please sign in to comment.