diff --git a/src/app/booking-details/booking-details.page.html b/src/app/booking-details/booking-details.page.html index 58202f9..9a64b5a 100644 --- a/src/app/booking-details/booking-details.page.html +++ b/src/app/booking-details/booking-details.page.html @@ -24,7 +24,7 @@ - + diff --git a/src/app/booking/booking.page.ts b/src/app/booking/booking.page.ts index c3713a8..85623a2 100644 --- a/src/app/booking/booking.page.ts +++ b/src/app/booking/booking.page.ts @@ -28,15 +28,15 @@ export class BookingPage implements OnInit { stadiums = [{ name: 'Chinnaswamy', sideView: 'https://www.royalchallengers.com/PRRCB01/public/styles/1061x767_landscape/public/2020-04/275679.jpg?h=61617f72&itok=6xKgHpE-', - topView: 'assets/home-team/stadium-tv.svg', + topView: 'assets/home-team/stadium-tv.png', }, { name: 'IS Bindra', sideView: 'https://5.imimg.com/data5/VO/UB/MY-3103550/ae-cricket-stadium-lighting-500x500.jpg', - topView: 'assets/home-team/stadium-tv.svg' + topView: 'assets/home-team/stadium-tv.png' }, { name: 'Chidambaram Stadium', sideView: 'https://sportzwiki.com/wp-content/uploads/2019/03/11.jpg', - topView: 'assets/home-team/stadium-tv.svg', + topView: 'assets/home-team/stadium-tv.png', }]; slideOpts = { diff --git a/src/app/chat/chat.page.html b/src/app/chat/chat.page.html index f39e45a..c784535 100644 --- a/src/app/chat/chat.page.html +++ b/src/app/chat/chat.page.html @@ -36,7 +36,7 @@ - Ball {{ ballChats.ball + 1 }} + #{{ ballChats.ball + 1 }} + @@ -54,7 +54,7 @@ - {{ player.name }} + {{ player.name }} {{ player.wicketTo }} @@ -119,7 +119,7 @@ - {{ player.name }} + {{ player.name }} {{ player.wicketTo }} @@ -153,13 +153,21 @@ - + + + + + + + + + @@ -171,13 +179,14 @@ - + {{ player.jersey }} {{ player.name }} + @@ -187,13 +196,14 @@ - + {{ player.jersey }} {{ player.name }} + diff --git a/src/app/match-details/match-details.page.scss b/src/app/match-details/match-details.page.scss index fdd8011..3c966ae 100644 --- a/src/app/match-details/match-details.page.scss +++ b/src/app/match-details/match-details.page.scss @@ -89,7 +89,9 @@ ion-content { } .field-container { - position: relative; + position: sticky; + position: -webkit-sticky; + top: 70px; height: calc(100vh - 70px); width: 100%; z-index: 0; @@ -138,10 +140,10 @@ ion-content { list-style: none; padding: 0; margin: 0; - top: 10%; - left: 10%; - width: 80%; - height: 80%; + top: 5%; + left: 0%; + width: 100%; + height: 90%; overflow: visible; opacity: 0; transition: transform 0.5s, opacity 0.3s; @@ -182,11 +184,69 @@ ion-content { position: relative; } - h5 { - font-weight: 500; - letter-spacing: 0.5px; - color: $dark-blue; - font-size: 14px; + &:nth-child(1) { + left: 10%; + top: 90%; + } + + &:nth-child(2) { + left: 15%; + top: 60%; + } + + &:nth-child(3) { + left: 15%; + top: 30%; + } + + &:nth-child(4) { + left: 5%; + top: 5%; + } + + &:nth-child(5) { + left: 40%; + top: 20%; + } + + &:nth-child(6) { + left: 70%; + top: 20%; + } + + &:nth-child(7) { + left: 80%; + top: 40%; + } + + &:nth-child(8) { + left: 70%; + top: 60%; + } + + &:nth-child(9) { + left: 40%; + top: 80%; + } + + &:nth-child(10) { + left: 80%; + top: 90%; + } + + &:nth-child(11) { + left: 2%; + top: 40%; + } + + &:nth-child(12) { + left: 45%; + top: 53%; + } + + &:nth-child(13) { + left: 42%; + top: 33%; } } } @@ -420,6 +480,10 @@ ion-content { } } +.score-container { + margin-top: 100px; +} + .score-card { background-color: white; box-shadow: 0px 0px 10px $blue-grey; @@ -566,7 +630,7 @@ ion-content { margin: 0; font-size: 1rem; color: white; - max-width: calc(100% - 60px); + max-width: calc(100% - 80px); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; diff --git a/src/app/match-details/match-details.page.ts b/src/app/match-details/match-details.page.ts index c7ac0b2..82755bf 100644 --- a/src/app/match-details/match-details.page.ts +++ b/src/app/match-details/match-details.page.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { Location } from '@angular/common'; import { ActivatedRoute } from '@angular/router'; import { IscoreCard } from '../live/live.page'; import * as faker from 'faker'; +import { IonContent } from '@ionic/angular'; type IPlayer = { @@ -11,6 +12,7 @@ type IPlayer = { jersey: number, isCaptain?: boolean, isKeeper?: boolean, + isTopScorer?: boolean, role: string, }; @@ -27,11 +29,12 @@ type ITeam = { styleUrls: ['./match-details.page.scss'], }) export class MatchDetailsPage implements OnInit { + @ViewChild(IonContent, { static: false }) content: IonContent; isPlayerSelected: boolean = false; isHomeTeamSelected: boolean = true; selectedSegment: string = 'MATCH'; - selectedRoster: string = 'HOME'; + selectedRoster: string = 'LIVE'; roles = ['BOWLER', 'BATSMAN']; @@ -51,6 +54,12 @@ export class MatchDetailsPage implements OnInit { private route: ActivatedRoute, ) { } + + scrollToPlayerDetails() { + let details: any = document.querySelector('.player-details'); + this.content.scrollToPoint(0, (details.offsetTop - 200), 1000); + } + ngOnInit() { this.matchStats = JSON.parse(this.route.snapshot.paramMap.get('matchStats')); @@ -75,7 +84,8 @@ export class MatchDetailsPage implements OnInit { jersey: Math.ceil(Math.random() * (99 - 1)), isCaptain: i == 3? true : false, isKeeper: i === 5? true : false, - role: this.roles[Math.floor(Math.random() * (2 - 0))] + role: this.roles[Math.floor(Math.random() * (2 - 0))], + isTopScorer: i === 3? true : false }); @@ -96,6 +106,10 @@ export class MatchDetailsPage implements OnInit { selectPlayerDetails() { this.isPlayerSelected = true; + + setTimeout(() => { + this.scrollToPlayerDetails(); + }, 100); } limitDecimals(value: number) { diff --git a/src/assets/home-team/ground.png b/src/assets/home-team/ground.png new file mode 100644 index 0000000..aad5e33 Binary files /dev/null and b/src/assets/home-team/ground.png differ diff --git a/src/assets/home-team/stadium-sv.png b/src/assets/home-team/stadium-sv.png index 687cab3..c59602a 100644 Binary files a/src/assets/home-team/stadium-sv.png and b/src/assets/home-team/stadium-sv.png differ diff --git a/src/assets/home-team/stadium-tv.png b/src/assets/home-team/stadium-tv.png index c59602a..687cab3 100644 Binary files a/src/assets/home-team/stadium-tv.png and b/src/assets/home-team/stadium-tv.png differ