diff --git a/src/app/pages/edit-profile/edit-profile.page.html b/src/app/pages/edit-profile/edit-profile.page.html index db128ac..1ff610d 100644 --- a/src/app/pages/edit-profile/edit-profile.page.html +++ b/src/app/pages/edit-profile/edit-profile.page.html @@ -1,11 +1,4 @@ - + @@ -18,6 +11,18 @@ +
+
+
+ +
+
+
+ {{firstname}} {{lastname}} + {{email}} +
+
+ diff --git a/src/app/pages/edit-profile/edit-profile.page.scss b/src/app/pages/edit-profile/edit-profile.page.scss index 9cfb930..d50dd25 100644 --- a/src/app/pages/edit-profile/edit-profile.page.scss +++ b/src/app/pages/edit-profile/edit-profile.page.scss @@ -1,11 +1,4 @@ -/* - Authors : initappz (Rahul Jograna) - Website : https://initappz.com/ - App Name : E-Learning App Template - This App Template Source code is licensed as per the - terms found in the Website https://initappz.com/license - Copyright and Good Faith Purchasers © 2021-present initappz. -*/ + ion-header { ion-toolbar { --background: var(--ion-color-primary); @@ -22,6 +15,40 @@ ion-header { ion-content { + .profile { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + padding: 16px; + padding-bottom: 30px; + + .back_image { + height: 90px; + width: 90px; + border-radius: 100%; + position: relative; + + .icon { + position: absolute; + bottom: 0; + right: 0; + + ion-icon { + background: var(--ion-color-primary); + color: white; + padding: 5px; + border-radius: 100%; + } + } + } + + .title { + display: flex; + flex-direction: column; + } + } + ion-item { margin-top: 20px; --background: #f7f7f7; diff --git a/src/app/pages/edit-profile/edit-profile.page.ts b/src/app/pages/edit-profile/edit-profile.page.ts index 3c53684..513d425 100644 --- a/src/app/pages/edit-profile/edit-profile.page.ts +++ b/src/app/pages/edit-profile/edit-profile.page.ts @@ -1,13 +1,7 @@ -/* - Authors : initappz (Rahul Jograna) - Website : https://initappz.com/ - App Name : E-Learning App Template - This App Template Source code is licensed as per the - terms found in the Website https://initappz.com/license - Copyright and Good Faith Purchasers © 2021-present initappz. -*/ import { NavController } from '@ionic/angular'; import { Component, OnInit } from '@angular/core'; +import { SessionDataProviderService } from 'src/app/store/session-data-provider.service'; + @Component({ selector: 'app-edit-profile', @@ -17,10 +11,18 @@ import { Component, OnInit } from '@angular/core'; export class EditProfilePage implements OnInit { constructor( - private navctr: NavController + private navctr: NavController, + public sessionDataProviderService:SessionDataProviderService ) { } + firstname:string=''; + lastname:string=''; + email:string=''; + ngOnInit() { + this.firstname = this.sessionDataProviderService.firstname; + this.lastname = this.sessionDataProviderService.lastname; + this.email = this.sessionDataProviderService.username; } onBack() { diff --git a/src/app/pages/home/home.page.html b/src/app/pages/home/home.page.html index 02fcba0..113bfc9 100644 --- a/src/app/pages/home/home.page.html +++ b/src/app/pages/home/home.page.html @@ -4,7 +4,7 @@
- Good Morning + Hello {{firstname}}
@@ -58,6 +58,7 @@ --> +
@@ -78,4 +79,19 @@
+ +
+ Recomended Blog + See all +
+
+
+
+
+ {{item.post_title}} +
+
+ +
+
diff --git a/src/app/pages/home/home.page.scss b/src/app/pages/home/home.page.scss index f5fe786..ea1d45e 100644 --- a/src/app/pages/home/home.page.scss +++ b/src/app/pages/home/home.page.scss @@ -177,7 +177,9 @@ ion-content { box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.1); border-radius: 10px; margin-bottom: 20px; - + &.bg_alice{ + background-color: aliceblue; + } .list { display: flex; align-items: center; diff --git a/src/app/pages/home/home.page.ts b/src/app/pages/home/home.page.ts index 45b4ae2..c82069e 100644 --- a/src/app/pages/home/home.page.ts +++ b/src/app/pages/home/home.page.ts @@ -1,6 +1,9 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { SessionDataProviderService } from 'src/app/store/session-data-provider.service'; +import { BlogDataService } from 'src/app/store/blog-data.service'; +import { WrenchService } from 'src/app/services/wrench.service'; + @Component({ selector: 'app-home', @@ -9,22 +12,40 @@ import { SessionDataProviderService } from 'src/app/store/session-data-provider. }) export class HomePage implements OnInit { - firstname:string=''; + firstname: string = ''; + blogData: []; constructor( private router: Router, - public sessionDataProviderService:SessionDataProviderService + public sessionDataProviderService: SessionDataProviderService, + private wrenchService: WrenchService, + public blogDataService: BlogDataService ) { this.firstname = this.sessionDataProviderService.firstname; + // debugger; + this.blogData = this.blogDataService.blogData; + console.log("BLOG HOME 001->", this.blogDataService.blogData); - } - - ngOnInit() { - // debugger; - // this.firstname = this.sessionDataProviderService.firstname; } + ngOnInit() { + this.getBlogData(); + console.log("BLOG HOME 002->", this.blogDataService.blogData); + // debugger; + // this.firstname = this.sessionDataProviderService.firstname; + } + blogResult:any; + getBlogData(){ + this.wrenchService.getBlogData().subscribe( + blogResult => { + this.blogResult = blogResult; + console.log("BLOG RETURN->", this.blogResult); + this.blogData = this.blogResult.blog_data; + this.blogDataService.setBlogData(this.blogResult.blog_data); + } + ); + } onDetails() { this.router.navigate(['detail']); diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 28d549e..2e1308d 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -2,6 +2,7 @@ import { Router } from '@angular/router'; import { Component, OnInit, ViewChild } from '@angular/core'; import { WrenchService } from 'src/app/services/wrench.service'; import { SessionDataProviderService } from 'src/app/store/session-data-provider.service'; +import { BlogDataService } from 'src/app/store/blog-data.service'; @Component({ selector: 'app-login', @@ -17,8 +18,11 @@ export class LoginPage implements OnInit { constructor( private router: Router, private wrenchService: WrenchService, - public sessionDataProviderService:SessionDataProviderService - ) { } + public sessionDataProviderService:SessionDataProviderService, + public blogDataService:BlogDataService + ) { + + } ngOnInit() { } @@ -27,7 +31,8 @@ getBlogData(){ this.wrenchService.getBlogData().subscribe( blogResult => { this.blogResult = blogResult; - console.log("BLOG RETURN->" + this.blogResult); + console.log("BLOG RETURN->", this.blogResult); + this.blogDataService.setBlogData(this.blogResult.blog_data); } ); } @@ -36,6 +41,8 @@ getBlogData(){ username: string, password: string, sessionid: string }; startLogin() { + this.username='ses66181+1@gmail.com'; + this.password='may12002'; if (this.username == null || this.username == '' || this.validateEmail(this.username) == false || this.password == null || this.password == '') { this.showAlert('Invalid Login', 'Enter username(email) and password to login'); return; diff --git a/src/app/pages/profile/profile.page.html b/src/app/pages/profile/profile.page.html index 96071eb..7a476c2 100644 --- a/src/app/pages/profile/profile.page.html +++ b/src/app/pages/profile/profile.page.html @@ -47,18 +47,18 @@ - + - + @@ -79,9 +79,9 @@ - + - Logout + Logout diff --git a/src/app/pages/profile/profile.page.scss b/src/app/pages/profile/profile.page.scss index 4297bd2..a6e99ac 100644 --- a/src/app/pages/profile/profile.page.scss +++ b/src/app/pages/profile/profile.page.scss @@ -74,4 +74,11 @@ ion-content { } } } + .pad_logout{ + padding-top: 50px; + color:red; + &.ion_label_red{ + color:red; + } + } } diff --git a/src/app/pages/tabs/tabs.page.html b/src/app/pages/tabs/tabs.page.html index b0cd7d6..6130b4a 100644 --- a/src/app/pages/tabs/tabs.page.html +++ b/src/app/pages/tabs/tabs.page.html @@ -13,8 +13,9 @@ - - Inbox + + + Market diff --git a/src/app/store/blog-data.service.ts b/src/app/store/blog-data.service.ts index 4ef33c4..9bfbd71 100644 --- a/src/app/store/blog-data.service.ts +++ b/src/app/store/blog-data.service.ts @@ -5,5 +5,11 @@ import { Injectable } from '@angular/core'; }) export class BlogDataService { + blogData: []; + constructor() { } + +setBlogData(blogDat:[]){ + this.blogData = blogDat; +} }