profie page
This commit is contained in:
@@ -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 mode="ios" class="ion-no-border">
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start" (click)="onBack()">
|
||||
@@ -18,6 +11,18 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="ion-padding">
|
||||
<div class="profile">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/profile.jpg)'">
|
||||
<div class="icon">
|
||||
<ion-icon name="pencil"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<ion-label style="font-size: 17px; font-family: 'bold';">{{firstname}} {{lastname}}</ion-label>
|
||||
<ion-label style="font-size: 13px;">{{email}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text" placeholder="Jaydeep Hirani"></ion-input>
|
||||
</ion-item>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="left">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/profile.jpg)'"></div>
|
||||
<div>
|
||||
<ion-label class="grey_text">Good Morning</ion-label>
|
||||
<ion-label class="grey_text">Hello</ion-label>
|
||||
<ion-label class="bold_text">{{firstname}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,6 +58,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="bg_white" *ngFor="let item of [1,2,3,4,5,6]" (click)="onDetails()">
|
||||
<div class="list">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/p2.jpg)'"></div>
|
||||
@@ -78,4 +79,19 @@
|
||||
</div>
|
||||
<ion-icon slot="end" name="bookmark-outline" class="save" color="primary"></ion-icon>
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<ion-label class="bold_text">Recomended Blog</ion-label>
|
||||
<ion-label class="color_text">See all</ion-label>
|
||||
</div>
|
||||
<div class="bg_white bg_alice" *ngFor="let item of blogData; let i = index" (click)="onDetails()">
|
||||
<div class="list">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/p2.jpg)'"></div>
|
||||
<div class="detail">
|
||||
<ion-label class="name">{{item.post_title}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<ion-icon slot="end" name="bookmark-outline" class="save" color="primary"></ion-icon>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -47,18 +47,18 @@
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none" (click)="onLanguage()">
|
||||
<!-- <ion-item lines="none" (click)="onLanguage()">
|
||||
<ion-icon name="language-outline" color="dark"></ion-icon>
|
||||
<ion-label>Language</ion-label>
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</ion-item>
|
||||
</ion-item> -->
|
||||
|
||||
|
||||
<ion-item lines="none">
|
||||
<!-- <ion-item lines="none">
|
||||
<ion-icon name="eye-outline" color="dark"></ion-icon>
|
||||
<ion-label>Dark Theme</ion-label>
|
||||
<ion-toggle slot="end" name="grape" color="tertiary"></ion-toggle>
|
||||
</ion-item>
|
||||
</ion-item> -->
|
||||
|
||||
|
||||
<ion-item lines="none" (click)="onPrivacy()">
|
||||
@@ -79,9 +79,9 @@
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none" (click)="onLogin()">
|
||||
<ion-item class="pad_logout" lines="none" (click)="onLogin()">
|
||||
<ion-icon name="log-out-outline" color="dark"></ion-icon>
|
||||
<ion-label>Logout</ion-label>
|
||||
<ion-label class="ion_label_red">Logout</ion-label>
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
@@ -74,4 +74,11 @@ ion-content {
|
||||
}
|
||||
}
|
||||
}
|
||||
.pad_logout{
|
||||
padding-top: 50px;
|
||||
color:red;
|
||||
&.ion_label_red{
|
||||
color:red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="tab3">
|
||||
<ion-icon name="chatbubble-ellipses"></ion-icon>
|
||||
<ion-label>Inbox</ion-label>
|
||||
<!-- <ion-icon name="chatbubble-ellipses"></ion-icon> -->
|
||||
<ion-icon name="list-outline"></ion-icon>
|
||||
<ion-label>Market</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="tab4">
|
||||
|
||||
@@ -5,5 +5,11 @@ import { Injectable } from '@angular/core';
|
||||
})
|
||||
export class BlogDataService {
|
||||
|
||||
blogData: [];
|
||||
|
||||
constructor() { }
|
||||
|
||||
setBlogData(blogDat:[]){
|
||||
this.blogData = blogDat;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user