Skip to content

Commit 87a09ee

Browse files
committed
Fix the "login page"
Fix the icons Add an ActionBar property to hide it Fix the hr class Fix the images in a ListView Fix the bootstrap theme Update deps Remove last remains of ntw
1 parent d06e42d commit 87a09ee

36 files changed

+356
-344
lines changed

app/action-bar/action-bar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export class ActionBarViewModel extends BaseModel {
88
super(page);
99

1010
this.actionBar = page;
11+
this.actionBar.page.actionBarHidden = page && page.hidden;
1112
this.backButton = this.topFrame.canGoBack();
1213

1314
if (isAndroid) {

app/action-bar/action-bar.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ActionBar title="{{ title }}" loaded="onLoad">
1+
<ActionBar title="{{ title }}" loaded="onLoad" actionBarHidden="{{ actionBarHidden }}">
22
<android>
33
<NavigationButton icon="{{ backButton ? 'res://chevron_left' : 'res://menu' }}"
44
tap="{{ backButton ? goBack : toggleSideDrawer }}" />

app/app-root/app-root.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<ListView row="1" items="{{ pages }}" itemTap="{{ onNavigationItemTap }}">
1616
<ListView.itemTemplate>
1717
<StackLayout orientation="horizontal">
18-
<Label text="{{ icon | fonticon }}" class="fa" />
18+
<Label text="{{ 'fa-' + icon | fonticon }}" class="fa nt-icon" />
1919
<Label text="{{ text || value }}" />
2020
</StackLayout>
2121
</ListView.itemTemplate>

app/app.scss

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// for example '~nativescript-theme-core/scss/dark'.
44
@import '~nativescript-theme-core/styles/core';
55

6-
@import '~nativescript-theme-widgets/theme.css';
76
@import '~/assets/css/font-awesome.scss';
87

98
FlexboxLayout {
@@ -32,3 +31,55 @@ FlexboxLayout {
3231
.ns-compat .compat-components + * {
3332
visibility: collapsed;
3433
}
34+
35+
#login-background {
36+
margin-top: -20;
37+
background-size: cover;
38+
background-position: center;
39+
}
40+
41+
42+
/* Login page Styling */
43+
44+
.login-wrap {
45+
padding: 0 40;
46+
}
47+
48+
.logo-wrap {
49+
margin: 60 0 10 0 ;
50+
padding: 20 0;
51+
52+
.login-logo {
53+
text-align: center;
54+
font-size: 30;
55+
font-weight: bold;
56+
margin-bottom: 10;
57+
opacity: 1;
58+
color: $primary;
59+
opacity: .9;
60+
}
61+
62+
.login-logo-sub {
63+
color: $primary;
64+
opacity: .8;
65+
text-align: center;
66+
}
67+
}
68+
69+
.login-wrapper {
70+
padding: 20;
71+
background-color: #fff;
72+
border-radius: 3;
73+
74+
TextField {
75+
padding: 10 10;
76+
margin: 10 0 0 0;
77+
}
78+
}
79+
80+
.go-back {
81+
font-size: 14;
82+
text-align: center;
83+
color: $primary;
84+
margin-top: 10;
85+
}

app/navigation-vm.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,76 +9,77 @@ export class NavigationViewModel extends BaseModel {
99

1010
this.selectedPage = "";
1111
this.pages = new ObservableArray({
12-
text: "home",
12+
text: "Home",
1313
value: "root",
1414
icon: "home"
1515
}, {
16-
value: "basics",
16+
value: "Basics",
1717
icon: "font"
1818
}, {
19-
value: "buttons",
19+
value: "Buttons",
2020
icon: "square"
2121
}, {
22-
text: "active buttons",
22+
text: "Active Buttons",
2323
value: "buttons-active",
2424
icon: "square-o"
2525
}, {
26-
value: "colors",
26+
value: "Colors",
2727
icon: "eyedropper"
2828
}, {
29-
value: "dialogs",
29+
value: "Dialogs",
3030
icon: "newspaper-o"
3131
}, {
32-
value: "forms",
32+
value: "Forms",
3333
icon: "i-cursor"
3434
}, {
35-
value: "pickers",
35+
value: "Pickers",
3636
icon: "list-alt"
3737
}, {
38+
text: "DataForm",
3839
value: "dataform",
3940
icon: "database"
4041
}, {
4142
text: "ListView",
4243
value: "listview",
4344
icon: "list"
4445
}, {
45-
text: "login",
46+
text: "Login",
4647
value: "login-landing",
4748
icon: "user"
4849
}, {
49-
value: "modal",
50+
value: "Modal",
5051
icon: "window-maximize"
5152
}, {
52-
value: "progress",
53+
value: "Progress",
5354
icon: "spinner"
5455
}, {
55-
value: "search",
56+
value: "Search",
5657
icon: "search"
5758
}, {
5859
text: "SegmentedBar",
5960
value: "segmentedbar",
6061
icon: "columns"
6162
}, {
62-
value: "sliders",
63+
value: "Sliders",
6364
icon: "sliders"
6465
}, {
65-
value: "switches",
66+
value: "Switches",
6667
icon: "toggle-on"
6768
}, {
68-
value: "tabs",
69+
value: "Tabs",
6970
icon: "road"
7071
});
7172
}
7273

7374
onNavigationItemTap({ object: list, index }) {
7475
const page = (list.items[index] || list.items.getItem(index)).value;
7576

76-
if (page === "modal") {
77+
if (page === "Modal") {
7778
return this.openModal();
7879
}
7980

8081
topmost().navigate({
81-
moduleName: `pages/${page}`,
82+
moduleName: `pages/${page.toLowerCase()}`,
8283
transition: {
8384
name: "slide"
8485
}

app/pages/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class BaseModel extends Observable {
1010
this.page = page;
1111
this.topFrame = topmost();
1212
this.sideDrawer = app.getRootView();
13-
this.title = page && page.ActionBarTitle;
13+
this.title = page && page.actionBarTitle;
1414
}
1515

1616
goBack() {

app/pages/basics.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
22
xmlns:actionBar="/action-bar"
33
navigatingTo="navigatingTo">
4-
<actionBar:action-bar ActionBarTitle="Basics" />
4+
<actionBar:action-bar actionBarTitle="Basics" />
55
<ScrollView class="page">
66
<StackLayout class="p-20">
77
<GridLayout rows="auto" columns="*,*" class="h1 m-5 w-full">
@@ -38,7 +38,7 @@
3838
</GridLayout>
3939
<StackLayout class="page m-t-10">
4040
<Label text="Text" class="h2" />
41-
<StackLayout class="hr-light m-b-2"></StackLayout>
41+
<StackLayout class="hr m-b-2" />
4242
<!--<Label text="Note: text-transform is not working." textWrap="true" class="t-14 c-grey-d-20 m-b-5" />-->
4343

4444
<GridLayout rows="auto" columns="*,*" class="text-lowercase m-t-5 w-full">

app/pages/buttons-active.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
22
xmlns:actionBar="/action-bar"
33
navigatingTo="navigatingTo">
4-
<actionBar:action-bar ActionBarTitle="Buttons Active" />
4+
<actionBar:action-bar actionBarTitle="Buttons Active" />
55
<StackLayout class="page">
66
<Button text="btn btn-active" tap="" class="btn btn-active" />
77
<Button text="btn btn-primary btn-active" tap="" class="btn btn-primary btn-active" />

app/pages/buttons.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
22
xmlns:actionBar="/action-bar"
3-
xmlns:ui="nativescript-theme-widgets"
43
navigatingTo="navigatingTo">
5-
<actionBar:action-bar ActionBarTitle="Buttons"/>
4+
<actionBar:action-bar actionBarTitle="Buttons"/>
65
<ScrollView>
76
<StackLayout>
87
<StackLayout class="compat-components">
@@ -25,7 +24,7 @@
2524
<Button text="Button.-primary" class="-primary"/>
2625
<Button class="-primary">
2726
<FormattedString>
28-
<Span text="{{ 'twitter' | fonticon }}"/>
27+
<Span text="{{ 'fa-twitter' | fonticon }}" class="fa nt-icon"/>
2928
<Span text=" Button.-primary with icon"/>
3029
</FormattedString>
3130
</Button>

app/pages/colors.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
22
xmlns:actionBar="/action-bar"
33
navigatingTo="navigatingTo">
4-
<actionBar:action-bar ActionBarTitle="Colors" />
4+
<actionBar:action-bar actionBarTitle="Colors" />
55
<ScrollView class="page">
66
<StackLayout class="p-10">
77
<Label text="Set color property:" class="h2 font-italic" />

0 commit comments

Comments
 (0)