From 11829fef6ac6a9bce83e41df0fb737baa09018df Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
Date: Fri, 16 Sep 2016 02:55:10 -0400
Subject: [PATCH] converted home page to angular material look.

---
 src/client/app/components/app.component.html  |  8 ++--
 .../app/components/home/home.component.html   | 47 +++++++++++--------
 .../app/components/home/home.component.scss   | 34 ++++++--------
 src/client/app/components/home/home.module.ts | 24 ++++++++++
 src/client/web.module.ts                      | 13 +++--
 5 files changed, 75 insertions(+), 51 deletions(-)
 create mode 100644 src/client/app/components/home/home.module.ts

diff --git a/src/client/app/components/app.component.html b/src/client/app/components/app.component.html
index 95a011d1..3be3b054 100755
--- a/src/client/app/components/app.component.html
+++ b/src/client/app/components/app.component.html
@@ -1,5 +1,3 @@
-<div platform>
-  <sd-toolbar></sd-toolbar>
-  <sd-navbar></sd-navbar>
-  <router-outlet></router-outlet>
-</div>
+<sd-toolbar></sd-toolbar>
+<sd-navbar></sd-navbar>
+<router-outlet></router-outlet>
diff --git a/src/client/app/components/home/home.component.html b/src/client/app/components/home/home.component.html
index 1e66db2d..cc948beb 100755
--- a/src/client/app/components/home/home.component.html
+++ b/src/client/app/components/home/home.component.html
@@ -1,23 +1,32 @@
-<h2>
-  {{ 'LOVE_TECH' | translate }} <div class="smile"></div>
-</h2>
+<div class="home-card-container">
+  <md-card>
+    <md-card-title>{{ 'LOVE_TECH' | translate }}</md-card-title>
+    <md-card-content>
+      <p>
+        {{'ABOUT_REWARD' | translate}}
+      </p>
+      <p>
+        {{'ABOUT_ADD' | translate}}
+      </p>
 
-<p>
-  {{'ABOUT_REWARD' | translate}}
-</p>
-<p>
-  {{'ABOUT_ADD' | translate}}
-</p>
+      <form (submit)="addName()" class="home-form">
+        <div>
+          <md-input [(ngModel)]="newName" name="newName" class="home-input" [placeholder]="'INPUT_HINT' | translate" ngDefaultControl></md-input>
+          <button md-raised-button color="primary" type="submit" class="home-button">{{'ADD_BTN_TEXT' | translate}}</button>
+        </div>
+      </form>
 
-<form (submit)="addName()">
-  <input [(ngModel)]="newName" name="newName" [placeholder]="'INPUT_HINT' | translate">
-  <button type="submit">{{'ADD_BTN_TEXT' | translate}}</button>
-</form>
+      <md-list class="home-list">
+        <md-list-item *ngFor="let name of (nameListService.names | async)">
+          <h3 md-line>{{name}}</h3>
+          <p md-line class="demo-secondary-text">secondary text</p>
+        </md-list-item>
+      </md-list>
 
-<ul>
-  <li *ngFor="let name of (nameListService.names | async)">{{name}}</li>
-</ul>
+      <p>
+        <a class="link" (click)="readAbout()">About - RouterExtensions example</a>
+      </p>
 
-<p>
-  <a class="link" (click)="readAbout()">About - RouterExtensions example</a>
-</p>
+    </md-card-content>
+  </md-card>
+</div>
diff --git a/src/client/app/components/home/home.component.scss b/src/client/app/components/home/home.component.scss
index d8addab9..78203250 100755
--- a/src/client/app/components/home/home.component.scss
+++ b/src/client/app/components/home/home.component.scss
@@ -3,32 +3,26 @@
   padding: 0 16px;
 }
 
-input {
-  width: 250px;
+.home-card-container {
+  padding-top: 20px;
+  padding-left: 20px;
 }
 
-ul {
-  list-style-type: none;
-  padding: 0 0 0 8px;
+.home-card {
+  font-size: 14px;
+  width: 400px;
 }
 
-.smile {
-  background: url("./assets/svg/smile.svg");
-  height: 48px;
-  width: 48px;
-  display: inline-block;
-  transform: scale(0.6);
-  margin-top: -25px;
-  position: relative;
-  top: 16px;
+.home-form {
+  padding: 20px;
 }
 
-a.link {
-  color: #00e;
-  cursor: pointer;
-  text-decoration: underline;
+.home-input {
+  font-size: 14px;
+  width: 250px;
 }
 
-a.link:hover {
-  color: #f00;
+.home-button {
+  font-size: 16px;
+  margin: 10px;
 }
diff --git a/src/client/app/components/home/home.module.ts b/src/client/app/components/home/home.module.ts
new file mode 100644
index 00000000..972880cb
--- /dev/null
+++ b/src/client/app/components/home/home.module.ts
@@ -0,0 +1,24 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { HomeComponent } from './home.component';
+import {NameListService} from "../../frameworks/sample/services/name-list.service";
+import {MdListModule} from '@angular2-material/list';
+import { MdCardModule } from '@angular2-material/card';
+import {MdInputModule} from '@angular2-material/input';
+import {MultilingualModule} from "../../frameworks/i18n/multilingual.module";
+
+@NgModule({
+  imports: [
+    CommonModule,
+    MdCardModule,
+    MdListModule,
+    MultilingualModule,
+    FormsModule,
+    MdInputModule
+  ],
+  declarations: [HomeComponent],
+  exports: [HomeComponent],
+  providers: [NameListService]
+})
+export class HomeModule { }
diff --git a/src/client/web.module.ts b/src/client/web.module.ts
index 180b4edd..0381d933 100644
--- a/src/client/web.module.ts
+++ b/src/client/web.module.ts
@@ -6,9 +6,9 @@ import { RouterModule } from '@angular/router';
 
 // app
 import { AppComponent } from './app/components/app.component';
-import { HomeComponent } from './app/components/home/home.component';
-import { AboutComponent } from './app/components/about/about.component';
 import { routes } from './app/components/app.routes';
+import { AboutModule } from './app/components/about/about.module';
+import { HomeModule } from "./app/components/home/home.module";
 
 // feature modules
 import { CoreModule } from './app/frameworks/core/core.module';
@@ -16,8 +16,6 @@ import { AnalyticsModule } from './app/frameworks/analytics/analytics.module';
 import { MultilingualModule } from './app/frameworks/i18n/multilingual.module';
 import { SampleModule } from './app/frameworks/sample/sample.module';
 
-import { AboutModule } from './app/components/about/about.module';
-
 // config
 import { Config, WindowService, ConsoleService } from './app/frameworks/core/index';
 Config.PLATFORM_TARGET = Config.PLATFORMS.WEB;
@@ -26,6 +24,7 @@ Config.DEBUG.LEVEL_4 = true;
 // sample config (extra)
 import { AppConfig } from './app/frameworks/sample/services/app-config';
 import { MultilingualService } from './app/frameworks/i18n/services/multilingual.service';
+
 // custom i18n language support
 MultilingualService.SUPPORTED_LANGUAGES = AppConfig.SUPPORTED_LANGUAGES;
 
@@ -48,11 +47,11 @@ if (String('<%= TARGET_DESKTOP %>') === 'true') {
     AnalyticsModule,
     MultilingualModule,
     SampleModule,
-    AboutModule
+    AboutModule,
+    HomeModule
   ],
   declarations: [
-    AppComponent,
-    HomeComponent
+    AppComponent
   ],
   providers: [
     {
-- 
GitLab