Commit b09e2d18 by Arjun

style correction

parent 49001fd8
...@@ -11706,8 +11706,7 @@ ...@@ -11706,8 +11706,7 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
...@@ -11718,8 +11717,7 @@ ...@@ -11718,8 +11717,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -11836,8 +11834,7 @@ ...@@ -11836,8 +11834,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -11849,7 +11846,6 @@ ...@@ -11849,7 +11846,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -11879,7 +11875,6 @@ ...@@ -11879,7 +11875,6 @@
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -11898,7 +11893,6 @@ ...@@ -11898,7 +11893,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -11992,7 +11986,6 @@ ...@@ -11992,7 +11986,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -12078,8 +12071,7 @@ ...@@ -12078,8 +12071,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -12115,7 +12107,6 @@ ...@@ -12115,7 +12107,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -12135,7 +12126,6 @@ ...@@ -12135,7 +12126,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -12179,14 +12169,12 @@ ...@@ -12179,14 +12169,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -12709,7 +12697,6 @@ ...@@ -12709,7 +12697,6 @@
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -12728,7 +12715,6 @@ ...@@ -12728,7 +12715,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -12908,8 +12894,7 @@ ...@@ -12908,8 +12894,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -13015,8 +13000,7 @@ ...@@ -13015,8 +13000,7 @@
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
......
...@@ -102,4 +102,4 @@ ...@@ -102,4 +102,4 @@
"android" "android"
] ]
} }
} }
\ No newline at end of file
...@@ -95,6 +95,10 @@ const routes: Routes = [ ...@@ -95,6 +95,10 @@ const routes: Routes = [
{ {
path: "searchmodal", path: "searchmodal",
loadChildren: "./searchmodal/searchmodal.module#SearchmodalPageModule" loadChildren: "./searchmodal/searchmodal.module#SearchmodalPageModule"
},
{
path: "noresult",
loadChildren: "./noresult/noresult.module#NoresultPageModule"
} }
]; ];
@NgModule({ @NgModule({
......
import { Component, OnInit, ViewChild, } from '@angular/core'; import { Component, OnInit, ViewChild } from "@angular/core";
import { IonSlides } from '@ionic/angular'; import { IonSlides } from "@ionic/angular";
import { Router, ActivatedRoute } from '@angular/router'; import { Router, ActivatedRoute } from "@angular/router";
import { ServiceService } from './../../config/service.service'; import { ServiceService } from "./../../config/service.service";
@Component({ @Component({
selector: 'app-landing', selector: "app-landing",
templateUrl: './landing.page.html', templateUrl: "./landing.page.html",
styleUrls: ['./landing.page.scss'], styleUrls: ["./landing.page.scss"]
}) })
export class LandingPage implements OnInit { export class LandingPage implements OnInit {
slideOpts = { slideOpts = {
initialSlide: 0, initialSlide: 0,
speed: 1000, speed: 1000,
allowTouchMove: false allowTouchMove: false
}; };
@ViewChild(IonSlides, { static: false })slides: IonSlides; @ViewChild(IonSlides, { static: false }) slides: IonSlides;
currentIndex: any; currentIndex: any;
constructor( constructor(
private router: Router, private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
private service: ServiceService private service: ServiceService
) { ) {
this.service.get('landing').then((data) => { this.service.get("landing").then(data => {
if (data === true) { if (data === true) {
const user = JSON.parse(localStorage.getItem('user')); const user = JSON.parse(localStorage.getItem("user"));
console.log(user); console.log(user);
if (user) { if (user) {
this.goToPage('home'); this.goToPage("noresult");
} else { } else {
this.goToPage('login'); this.goToPage("login");
}
} }
}); }
} });
ngOnInit() {
} }
ngOnInit() {}
goToPage(path, data = null) { goToPage(path, data = null) {
this.service.set('landing', true); this.service.set("landing", true);
this.router.navigateByUrl(path, { queryParams: data }); this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0; document.body.scrollTop = document.documentElement.scrollTop = 0;
} }
...@@ -51,7 +49,6 @@ export class LandingPage implements OnInit { ...@@ -51,7 +49,6 @@ export class LandingPage implements OnInit {
allowTouchMove: false allowTouchMove: false
}; };
next() { next() {
this.slides.slideNext(); this.slides.slideNext();
} }
...@@ -64,8 +61,6 @@ export class LandingPage implements OnInit { ...@@ -64,8 +61,6 @@ export class LandingPage implements OnInit {
this.slides.getActiveIndex().then(index => { this.slides.getActiveIndex().then(index => {
this.currentIndex = index; this.currentIndex = index;
console.log(this.currentIndex); console.log(this.currentIndex);
}); });
} }
} }
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { NoresultPage } from './noresult.page';
const routes: Routes = [
{
path: '',
component: NoresultPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [NoresultPage]
})
export class NoresultPageModule {}
<div class="nav_header">
<ion-menu-toggle>
<button class="nav_btn nav_menu floatLeft">
</button>
</ion-menu-toggle>
<div class="nav_title floatLeft">
<h4>Shirts</h4>
</div>
<button class="nav_btn nav_search floatRight" *ngIf="!searchShow">
</button>
<div class="clear"></div>
</div>
<ion-content>
<div class="no-result-wrapper">
<img src="../../assets/basket.png">
<h1>No result found</h1>
<button>home</button>
</div>
</ion-content>
\ No newline at end of file
.no-result-wrapper {
text-align: center;
padding-top: 40%;
img {
width: 100px;
}
h1 {
font-size: 22px;
font-weight: bolder;
text-transform: uppercase;
color: #3B394D;
}
button {
background-color: #29285b;
border-radius: 8px;
height: 50px;
width: 48%;
color: #fff;
font-size: 22px;
font-weight: lighter;
text-transform: uppercase;
margin-top: 10px;
}
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NoresultPage } from './noresult.page';
describe('NoresultPage', () => {
let component: NoresultPage;
let fixture: ComponentFixture<NoresultPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NoresultPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NoresultPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-noresult',
templateUrl: './noresult.page.html',
styleUrls: ['./noresult.page.scss'],
})
export class NoresultPage implements OnInit {
constructor() { }
ngOnInit() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment