From c1788538d6ee04311cb402c0e4df37f9219963af Mon Sep 17 00:00:00 2001 From: Jpaulo06972 Date: Sat, 11 Apr 2026 00:38:20 -0300 Subject: [PATCH] feat: redesign PSN Store with premium UI, data services, and shopping cart --- src/app/app.component.html | 1 - .../card/card-label/card-label.component.css | 26 +-- .../card-pricing/card-pricing.component.css | 42 +++-- .../card-pricing/card-pricing.component.html | 11 +- .../card-pricing/card-pricing.component.ts | 8 + src/app/components/card/card.component.css | 73 ++++++-- src/app/components/card/card.component.html | 22 ++- src/app/components/card/card.component.ts | 9 +- .../menu-bar/menu-bar.component.css | 108 +++++++++--- .../menu-bar/menu-bar.component.html | 28 ++- .../components/menu-bar/menu-bar.component.ts | 7 +- src/app/models/game.ts | 9 + src/app/pages/home/home.component.css | 164 +++++++++++++++++- src/app/pages/home/home.component.html | 71 +++++--- src/app/pages/home/home.component.ts | 23 ++- src/app/services/cart.service.ts | 20 +++ src/app/services/game.service.ts | 83 +++++++++ src/styles.css | 42 ++++- 18 files changed, 623 insertions(+), 124 deletions(-) create mode 100644 src/app/models/game.ts create mode 100644 src/app/services/cart.service.ts create mode 100644 src/app/services/game.service.ts diff --git a/src/app/app.component.html b/src/app/app.component.html index 2e9100f..4d94e1b 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,3 +1,2 @@ - diff --git a/src/app/components/card/card-label/card-label.component.css b/src/app/components/card/card-label/card-label.component.css index 54f3eb9..5ec6c36 100644 --- a/src/app/components/card/card-label/card-label.component.css +++ b/src/app/components/card/card-label/card-label.component.css @@ -1,18 +1,18 @@ -.card-label__container{ +.card-label__container { position: absolute; - bottom:90px; - right: 0; + bottom: 100px; + left: 0; + z-index: 15; } -.card-label__content{ - display: flex; - align-items: center; - justify-content: center; - background-color: #0d0d0d; +.card-label__content { + background: var(--ps-neon); color: white; - font-size: 12px; - font-family: 'Segoe UI'; - font-weight: bold; - height: 40px; - padding: 0px 50px; + padding: 5px 25px; + font-size: 0.75rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 1px; + border-radius: 0 5px 5px 0; + box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4); } diff --git a/src/app/components/card/card-pricing/card-pricing.component.css b/src/app/components/card/card-pricing/card-pricing.component.css index 7a172d8..aeeee63 100644 --- a/src/app/components/card/card-pricing/card-pricing.component.css +++ b/src/app/components/card/card-pricing/card-pricing.component.css @@ -1,25 +1,45 @@ -.card-pricing__container{ +.card-pricing__container { position: absolute; - bottom:0px; + bottom: 0px; left: 0; + width: 100%; + padding: 20px; + background: rgba(2, 2, 5, 0.8); + backdrop-filter: blur(10px); + border-top: 1px solid rgba(255, 255, 255, 0.05); + min-height: 100px; display: flex; flex-direction: column; - width: 100%; - height: 70px; - background-color: rgba(0,0,0,0.8); - padding: 10px; + justify-content: center; color: antiquewhite; font-family: Calibri; } -.card-pricing__title{ - margin-bottom: 3px; +.card-pricing__title p { + color: rgba(255, 255, 255, 0.5); + font-size: 0.7rem; + font-weight: 500; + margin-bottom: 5px; + text-transform: uppercase; + letter-spacing: 0.5px; } -.card-pricing__value{ +.card-pricing__value { display: flex; - flex-direction: row; - justify-content: space-between; + align-items: baseline; + gap: 4px; +} + +.currency { + color: var(--ps-neon); + font-size: 0.9rem; + font-weight: 700; +} + +.amount { + color: white; + font-size: 1.4rem; + font-weight: 700; } .card-pricing__value__console{ diff --git a/src/app/components/card/card-pricing/card-pricing.component.html b/src/app/components/card/card-pricing/card-pricing.component.html index 21cce82..27c0b95 100644 --- a/src/app/components/card/card-pricing/card-pricing.component.html +++ b/src/app/components/card/card-pricing/card-pricing.component.html @@ -1,14 +1,9 @@
-

Play it Now!

+

{{gameType}}

-
- | -

{{gameType}}

-
-
-

{{gamePrice}}

-
+ R$ +

{{gamePriceAmount}}

diff --git a/src/app/components/card/card-pricing/card-pricing.component.ts b/src/app/components/card/card-pricing/card-pricing.component.ts index 5dc831e..b109641 100644 --- a/src/app/components/card/card-pricing/card-pricing.component.ts +++ b/src/app/components/card/card-pricing/card-pricing.component.ts @@ -11,9 +11,17 @@ export class CardPricingComponent implements OnInit { gameType:string ="Digital PS4" @Input() gamePrice:string = "R$ 399,90" + constructor() { } ngOnInit(): void { } + get gamePriceAmount(): string { + if (this.gamePrice && this.gamePrice.includes('R$ ')) { + return this.gamePrice.split('R$ ')[1]; + } + return this.gamePrice; + } + } diff --git a/src/app/components/card/card.component.css b/src/app/components/card/card.component.css index 7564e12..02b3d46 100644 --- a/src/app/components/card/card.component.css +++ b/src/app/components/card/card.component.css @@ -1,21 +1,70 @@ -.card__container{ +.card__container { position: relative; - border:3px solid #3E4357; - border-radius: 10px; - width: 350px; - height: 500px; - display: flex; + flex-direction: column; + width: 100%; + height: auto; + border-radius: 20px; overflow: hidden; - margin-top: 10px; + transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); + cursor: pointer; +} + +.card__container:hover { + transform: translateY(-10px) scale(1.02); + box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 67, 156, 0.3); + border-color: var(--ps-neon); } -.card__img{ - min-width: 100%; - min-height: 100%; - transition: transform .8s; +.card__img { + width: 100%; + height: 400px; + object-fit: cover; + transition: transform 0.6s ease; } -.card__img:hover{ +.card__container:hover .card__img { transform: scale(1.1); } + +.card__overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(2, 2, 5, 0.6); + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity 0.3s; + z-index: 10; +} + +.card__container:hover .card__overlay { + opacity: 1; +} + +.btn-buy { + background: var(--ps-neon); + color: white; + padding: 12px 24px; + border-radius: 30px; + font-weight: 600; + display: flex; + align-items: center; + gap: 10px; + transform: translateY(20px); + transition: all 0.4s ease; + box-shadow: 0 10px 20px rgba(0, 114, 206, 0.4); +} + +.card__container:hover .btn-buy { + transform: translateY(0); +} + +.btn-buy:hover { + background: #0088ff; + transform: scale(1.05); +} diff --git a/src/app/components/card/card.component.html b/src/app/components/card/card.component.html index 736eb2c..df31533 100644 --- a/src/app/components/card/card.component.html +++ b/src/app/components/card/card.component.html @@ -1,17 +1,25 @@ - + + +
+ +
+ +
diff --git a/src/app/components/card/card.component.ts b/src/app/components/card/card.component.ts index d2c9e49..d295592 100644 --- a/src/app/components/card/card.component.ts +++ b/src/app/components/card/card.component.ts @@ -1,4 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; +import { CartService } from '../../services/cart.service'; @Component({ selector: 'app-card', @@ -16,9 +17,15 @@ export class CardComponent implements OnInit { @Input() gamePrice:string = "R$ 399,90" - constructor() { } + constructor(private cartService: CartService) { } ngOnInit(): void { } + buyGame(event: Event) { + event.preventDefault(); + event.stopPropagation(); + this.cartService.addToCart(); + } + } diff --git a/src/app/components/menu-bar/menu-bar.component.css b/src/app/components/menu-bar/menu-bar.component.css index b90bbc7..7813814 100644 --- a/src/app/components/menu-bar/menu-bar.component.css +++ b/src/app/components/menu-bar/menu-bar.component.css @@ -1,44 +1,100 @@ -.menu-bar__container{ +.menu-bar__container { display: flex; - flex-direction: row; + justify-content: space-between; + align-items: center; + height: 80px; + padding: 0 40px; position: fixed; + top: 15px; + left: 50%; + transform: translateX(-50%); + width: calc(100% - 40px); + max-width: 1400px; z-index: 999; - background-color: #ffffff; + border-radius: 20px; +} + +.menu-bar__logo { + display: flex; + align-items: center; +} + +.menu-bar__search { + flex-grow: 1; + max-width: 500px; + margin: 0 30px; + position: relative; +} + +.search-input { width: 100%; - height: 40px; - box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.5); + background: rgba(255, 255, 255, 0.1); + border: 1px solid rgba(255, 255, 255, 0.1); + padding: 10px 20px; + border-radius: 10px; + color: white; + outline: none; + transition: all 0.3s ease; +} + +.search-input:focus { + background: rgba(255, 255, 255, 0.15); + border-color: var(--ps-neon); + box-shadow: 0 0 15px rgba(0, 114, 206, 0.3); +} + +.menu-bar__item ul { + display: flex; + list-style: none; +} + +.menu-bar__item ul li { + margin: 0 15px; +} + +.menu-bar__item ul li a { + font-weight: 500; + color: rgba(255, 255, 255, 0.8); + transition: color 0.3s; + font-size: 0.9rem; } -.menu-bar__logo{ - margin-left: 30px; - display: flex; - align-items: center; +.menu-bar__item ul li a:hover { + color: var(--ps-neon); } -.menu-bar__item{ - display: flex; - margin:auto; - align-items: center; +.menu-bar__cart { + margin-left: 20px; + cursor: pointer; } -.menu-bar__item > ul{ +.cart-icon-wrapper { + position: relative; display: flex; - list-style-type: none; + align-items: center; + justify-content: center; + transition: transform 0.2s; } -.menu-bar__item > ul > li { - padding: 5px; - margin-right: 15px; +.cart-icon-wrapper:hover { + transform: scale(1.1); } -.menu-bar__item > ul > li > a { - text-decoration: none; - padding: 5px; - color: rgb(7, 7, 7); - font-family: 'Segoe UI'; +.cart-badge { + position: absolute; + top: -8px; + right: -8px; + background: var(--ps-neon); + color: white; + font-size: 0.7rem; + font-weight: bold; + padding: 2px 6px; + border-radius: 10px; + border: 2px solid #020205; } -.menu-bar__item > ul > li > a:hover { - color: blue; - font-weight: 600; +@media (max-width: 768px) { + .menu-bar__search, .menu-bar__item { + display: none; + } } diff --git a/src/app/components/menu-bar/menu-bar.component.html b/src/app/components/menu-bar/menu-bar.component.html index 44067d8..ec2207a 100644 --- a/src/app/components/menu-bar/menu-bar.component.html +++ b/src/app/components/menu-bar/menu-bar.component.html @@ -1,18 +1,34 @@ -