Skip to content
This repository was archived by the owner on Oct 22, 2018. It is now read-only.

Commit 2f8017a

Browse files
committed
Fix card styles
1 parent cc08603 commit 2f8017a

File tree

11 files changed

+26
-41
lines changed

11 files changed

+26
-41
lines changed

src/app/+about/about.module.tns.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2-
import { NativeScriptRouterModule } from 'nativescript-angular';
32
import { SHARED_MODULES, COMPONENT_DECLARATIONS } from './about.common';
43

54
@NgModule({
65
imports: [
7-
NativeScriptRouterModule,
86
...SHARED_MODULES,
97
],
108
declarations: [

src/app/+about/components/about/about.component.tns.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Page>
22
<ActionBar title="About">
3-
<ActionItem ios.position="left" [nsRouterLink]="['/home']">
3+
<ActionItem ios.position="left" [nsRouterLink]="['/home']" clearHistory="true">
44
<Button class="ion-icon" text="{{ '\uF30C' }}"></Button>
55
</ActionItem>
66
</ActionBar>

src/app/+about/components/about/about.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
22

33
@Component({
44
moduleId: module.id,
5-
selector: 'seed-about',
5+
selector: 'about-page',
66
templateUrl: './about.component.html',
77
styleUrls: ['./about.component.scss']
88
})

src/app/app-routing.module.tns.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { AppRoutes } from './app.routes';
66

77
@NgModule({
88
imports: [
9+
NativeScriptRouterModule,
910
NativeScriptRouterModule.forRoot(<any>AppRoutes),
1011
],
1112
exports: [NativeScriptRouterModule]

src/app/app.component.tns.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<router-outlet></router-outlet>
1+
<page-router-outlet></page-router-outlet>

src/app/app.routes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ import { Routes } from '@angular/router';
44
* (do not place feature module routes here, use an own -routing.module.ts in the feature instead)
55
*/
66
export const AppRoutes: Routes = [
7-
{ path: '', pathMatch: 'full', redirectTo: '/home' }
7+
{ path: '', pathMatch: 'full', redirectTo: '/home' },
8+
{ path: 'about', loadChildren: './+about/about.module#AboutModule' }
89
];

src/app/home/components/home/home.component.tns.html

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,29 @@
11
<Page xmlns:Card="nativescript-cardview">
22
<ActionBar title="NativeScript Mobile App, yay!">
3-
<ActionItem ios.position="right" [nsRouterLink]="['/about']">
4-
<Button class="ion-icon" text="{{ '\uf41a' }}"></Button>
3+
<ActionItem ios.position="right">
4+
<Button class="ion-icon" [nsRouterLink]="['/about']" text="{{ '\uf41a' }}" pageTransition="flip"></Button>
55
</ActionItem>
66
</ActionBar>
77
<scroll-view>
88
<GridLayout rows="auto, *">
99
<SearchBar row="0" hint="Search hint" [text]="Search"></SearchBar>
1010
<StackLayout row="1">
11-
<Card:CardView class="cardStyle" margin="10" elevation="40" radius="5">
12-
<grid-layout rows="300, auto, auto" columns="*, *, *">
13-
<image src="http://ionicframework.com/img/home/cta-iphone-2.png" stretch="aspectFill" colSpan="3" row="0" />
14-
<label text="NativeScript Mobile App" class="info" textWrap="true" row="1" colSpan="3" />
15-
<button text="Favorite" tap="goAway" row="3" col="0" />
16-
<button text="Listen" row="3" col="1" />
17-
<button text="Share" row="3" col="2" />
11+
<Card:CardView class="cardStyle" radius="10" elevation="50" margin="20">
12+
<grid-layout rows="*, *, *" columns="*, *, *">
13+
<Image src="http://ionicframework.com/img/home/cta-iphone-2.png" margin="20" stretch="aspectFill" colSpan="3" row="0"></Image>
14+
<TextView class="description" editable="false" text="The most popular template to create web (Ionic) and native (NativeScript) mobile apps!" textWrap="true" row="1" colSpan="3"></TextView>
15+
<Button text="Favorite" tap="goAway" row="3" col="0"></Button>
16+
<Button text="Listen" row="3" col="1"></Button>
17+
<Button text="Share" row="3" col="2"></Button>
1818
</grid-layout>
1919
</Card:CardView>
20-
<Card:CardView class="cardStyle" margin="10" elevation="40" radius="5">
21-
<grid-layout rows="200, auto, auto" columns="auto, auto, *">
22-
<image src="http://ionicframework.com/img/home/cta-iphone-2.png" stretch="aspectFill" colSpan="3" row="0" />
23-
<label text="NativeScript Mobile App" class="info" textWrap="true" row="1" colSpan="3" />
24-
<TextView text="I'm batman!" returnKeyType="send" [editable]="false" class="input input-border" class="info" textWrap="true" row="2" colSpan="3"></TextView>
25-
<button text="Favorite" tap="goAway" row="3" col="0" />
26-
<button text="Listen" row="3" col="1" />
27-
<button text="Share" row="3" col="2" />
28-
</grid-layout>
29-
</Card:CardView>
30-
<Card:CardView class="cardStyle" margin="10" elevation="40" radius="5">
31-
<grid-layout rows="200, auto, auto" columns="auto, auto, *">
32-
<image src="http://ionicframework.com/img/home/cta-iphone-2.png" stretch="aspectFill" colSpan="3" row="0" />
33-
<label text="NativeScript Mobile App" class="info" textWrap="true" row="1" colSpan="3" />
34-
<TextView text="I'm batman!" returnKeyType="send" [editable]="false" class="input input-border" class="info" textWrap="true" row="2" colSpan="3"></TextView>
35-
<button text="Favorite" tap="goAway" row="3" col="0" />
36-
<button text="Listen" row="3" col="1" />
37-
<button text="Share" row="3" col="2" />
20+
<Card:CardView class="cardStyle" margin="20" elevation="40" radius="5">
21+
<grid-layout rows="*, *, *" columns="*, *, *">
22+
<Image src="https://upload.wikimedia.org/wikipedia/en/1/17/Batman-BenAffleck.jpg" stretch="aspectFill" colSpan="3" row="0" />
23+
<Label class="description" text="I'm batman!" textWrap="true" row="1" colSpan="3"></Label>
24+
<Button text="Favorite" tap="goAway" row="2" col="0" />
25+
<Button text="Listen" row="2" col="1" />
26+
<Button text="Share" row="2" col="2" />
3827
</grid-layout>
3928
</Card:CardView>
4029
</StackLayout>

src/app/home/components/home/home.component.tns.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.cardStyle{
2-
label{
2+
background-color:#fff;
3+
4+
.description {
35
margin-top:10px;
46
margin-bottom: 10px;
57
padding: 15px;

src/app/home/components/home/home.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
22

33
@Component({
44
moduleId: module.id,
5-
selector: 'seed-home',
5+
selector: 'home-page',
66
templateUrl: './home.component.html',
77
styleUrls: ['./home.component.scss']
88
})

src/app/home/home.module.tns.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { NgModule, Optional, SkipSelf, NO_ERRORS_SCHEMA } from '@angular/core';
2-
import { NativeScriptRouterModule } from 'nativescript-angular';
32
// app
43
import { HomeComponent } from './components/home/home.component';
54
import { SHARED_MODULES } from './home.common';
65

76
@NgModule({
87
imports: [
9-
NativeScriptRouterModule,
108
...SHARED_MODULES
119
],
1210
declarations: [HomeComponent],

0 commit comments

Comments
 (0)