Ver a proveniência

Collection page UI

master
kj1352 há 4 anos
ascendente
cometimento
0facc324dc
16 ficheiros alterados com 238 adições e 4 eliminações
  1. +4
    -0
      src/app/app-routing.module.ts
  2. +17
    -0
      src/app/collections/collections-routing.module.ts
  3. +20
    -0
      src/app/collections/collections.module.ts
  4. +23
    -0
      src/app/collections/collections.page.html
  5. +92
    -0
      src/app/collections/collections.page.scss
  6. +24
    -0
      src/app/collections/collections.page.spec.ts
  7. +48
    -0
      src/app/collections/collections.page.ts
  8. +4
    -4
      src/app/tabs/tabs-routing.module.ts
  9. +6
    -0
      src/app/tabs/tabs.page.html
  10. BIN
      src/assets/collections/ball.png
  11. BIN
      src/assets/collections/bat.png
  12. BIN
      src/assets/collections/bg-with-box.png
  13. BIN
      src/assets/collections/glass-box-with-bat.png
  14. BIN
      src/assets/collections/glassbox.png
  15. BIN
      src/assets/collections/golden-bat.png
  16. BIN
      src/assets/collections/museum_background.png

+ 4
- 0
src/app/app-routing.module.ts Ver ficheiro

@@ -41,6 +41,10 @@ const routes: Routes = [
{
path: 'chat',
loadChildren: () => import('./chat/chat.module').then( m => m.ChatPageModule)
},
{
path: 'collections',
loadChildren: () => import('./collections/collections.module').then( m => m.CollectionsPageModule)
}
];
@NgModule({


+ 17
- 0
src/app/collections/collections-routing.module.ts Ver ficheiro

@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { CollectionsPage } from './collections.page';

const routes: Routes = [
{
path: '',
component: CollectionsPage
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class CollectionsPageRoutingModule {}

+ 20
- 0
src/app/collections/collections.module.ts Ver ficheiro

@@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';

import { IonicModule } from '@ionic/angular';

import { CollectionsPageRoutingModule } from './collections-routing.module';

import { CollectionsPage } from './collections.page';

@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
CollectionsPageRoutingModule
],
declarations: [CollectionsPage]
})
export class CollectionsPageModule {}

+ 23
- 0
src/app/collections/collections.page.html Ver ficheiro

@@ -0,0 +1,23 @@
<ion-content>
<section class="collections">

<img class="glass-box" src="assets/collections/glassbox.png" alt="">

<ion-slides [options]="slideOpts">
<ion-slide *ngFor="let collection of collections">
<img [ngClass]="{'bat' : collection.type === 'BAT' || collection.type === 'INVERTED BAT',
'ball' : collection.type === 'BALL',
'inverted' : collection.type === 'INVERTED BAT' }"
[src]="collection.image">

<header class="box-heading">
<h5> {{ collection.name }} </h5>

<p> {{ collection.details }} </p>
</header>
</ion-slide>
</ion-slides>
</section>

</ion-content>

+ 92
- 0
src/app/collections/collections.page.scss Ver ficheiro

@@ -0,0 +1,92 @@
.collections {
height: calc(100vh - 56px);
background-image: url('../../assets/collections/museum_background.png');
background-position: center;
background-size: 100% 100%;
}

.glass-box {
width: 55vw;
height: 40vh;
position: fixed;
left: calc(50vw - (55vw / 2));
bottom: 36vh;
}

ion-slides {
width: 100%;
height: calc(100vh - 56px);

ion-slide {
height: 100%;
display: block;
position: relative;
width: 100%;
opacity: 0;
&.swiper-slide-active {
animation: fadeUp 0.5s forwards;
animation-delay: 0.2s;
}
}
@keyframes fadeUp {
0% {
opacity: 0;
transform: translateY(10px);
}

100% {
opacity: 1;
transform: translateY(0vh);
}
}

.box-heading {
position: absolute;
left: 25vw;
width: 50vw;
background-color: rgba(white, 0.1);
border-radius: 7px;
overflow: hidden;
padding: 15px;
top: 58vh;

h5 {
margin: 0;
font-size: 1rem;
font-weight: 500;
color: rgb(63, 63, 63);
}

p {
margin: 0;
font-size: 0.8rem;
line-height: 1.5;
color: rgb(93, 93, 93);
}
}

img {
position: absolute;
left: 40vw;
bottom: 49.7vh;
object-fit: contain;
object-position: bottom;

&.bat {
width: 20.5vw;
height: 20.5vh;

&.inverted {
left: 42vw;
}
}

&.ball {
width: 10vw;
height: 10vh;
left: 45vw;
}
}
}

+ 24
- 0
src/app/collections/collections.page.spec.ts Ver ficheiro

@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';

import { CollectionsPage } from './collections.page';

describe('CollectionsPage', () => {
let component: CollectionsPage;
let fixture: ComponentFixture<CollectionsPage>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CollectionsPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();

fixture = TestBed.createComponent(CollectionsPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 48
- 0
src/app/collections/collections.page.ts Ver ficheiro

@@ -0,0 +1,48 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-collections',
templateUrl: './collections.page.html',
styleUrls: ['./collections.page.scss'],
})
export class CollectionsPage implements OnInit {

slideOpts = {
slidesPerView: 1,
spaceBetween: 0,
initialSlide: 0,
centeredSlides: true,
simulateTouch: false,
followFinger: false,
loop: true,
};

collections: Array<{
name: string,
details: string,
image: string,
type: 'BAT' | 'BALL' | 'INVERTED BAT'
}>

constructor() { }

ngOnInit() {
this.collections = [{
name: 'Wooden Bat',
details: 'Signed by Sehwag',
image: 'assets/collections/bat.png',
type: 'BAT'
}, {
name: 'Leather Ball',
details: 'Signed by Sehwag',
image: 'assets/collections/ball.png',
type: 'BALL'
}, {
name: 'Golden Bat',
details: 'Oracle of IPL award',
image: 'assets/collections/golden-bat.png',
type: 'INVERTED BAT'
}];
}

}

+ 4
- 4
src/app/tabs/tabs-routing.module.ts Ver ficheiro

@@ -19,13 +19,13 @@ const routes: Routes = [
path: 'more',
loadChildren: () => import('../more/more.module').then(m => m.MorePageModule)
},
{
path: 'player-stats',
loadChildren: () => import('../player-stats/player-stats.module').then( m => m.PlayerStatsPageModule)
},
{
path: 'booking',
loadChildren: () => import('../booking/booking.module').then( m => m.BookingPageModule)
},
{
path: 'collections',
loadChildren: () => import('../collections/collections.module').then( m => m.CollectionsPageModule)
}
]
},


+ 6
- 0
src/app/tabs/tabs.page.html Ver ficheiro

@@ -15,5 +15,11 @@
<ion-icon name="ticket-outline"></ion-icon>
<ion-icon name="ticket"></ion-icon>
</ion-tab-button>

<ion-tab-button tab="collections">
<ion-icon name="trophy-outline"></ion-icon>
<ion-icon name="trophy"></ion-icon>
</ion-tab-button>

</ion-tab-bar>
</ion-tabs>

BIN
src/assets/collections/ball.png Ver ficheiro

Antes Depois
Largura: 59  |  Altura: 66  |  Tamanho: 6.9 KiB

BIN
src/assets/collections/bat.png Ver ficheiro

Antes Depois
Largura: 252  |  Altura: 452  |  Tamanho: 15 KiB

BIN
src/assets/collections/bg-with-box.png Ver ficheiro

Antes Depois
Largura: 1296  |  Altura: 1728  |  Tamanho: 591 KiB

BIN
src/assets/collections/glass-box-with-bat.png Ver ficheiro

Antes Depois
Largura: 491  |  Altura: 607  |  Tamanho: 108 KiB

BIN
src/assets/collections/glassbox.png Ver ficheiro

Antes Depois
Largura: 676  |  Altura: 755  |  Tamanho: 110 KiB

BIN
src/assets/collections/golden-bat.png Ver ficheiro

Antes Depois
Largura: 252  |  Altura: 452  |  Tamanho: 11 KiB

BIN
src/assets/collections/museum_background.png Ver ficheiro

Antes Depois
Largura: 1296  |  Altura: 1728  |  Tamanho: 593 KiB

Carregando…
Cancelar
Guardar