Compare commits
9 Commits
230e5b01ac
...
tenant/ont
| Author | SHA1 | Date | |
|---|---|---|---|
| b320501650 | |||
| 2162ae3963 | |||
| 92cc1c0275 | |||
| ed806abb9f | |||
| 321f2c08cd | |||
| 9ba3b24b7e | |||
| b8b5292200 | |||
| e8602cca13 | |||
| 36fda9f7ea |
@@ -31,7 +31,13 @@
|
|||||||
|
|
||||||
<div class="immersive-header__actions">
|
<div class="immersive-header__actions">
|
||||||
@if (displaySearchBar()) {
|
@if (displaySearchBar()) {
|
||||||
<form class="immersive-header__search" role="search" (submit)="submitSearch($event)">
|
<form
|
||||||
|
id="immersive-search"
|
||||||
|
class="immersive-header__search"
|
||||||
|
[class.immersive-header__search--open]="isSearchOpen()"
|
||||||
|
role="search"
|
||||||
|
(submit)="submitSearch($event)"
|
||||||
|
>
|
||||||
<label class="visually-hidden" for="immersive-search-input">Buscar productos</label>
|
<label class="visually-hidden" for="immersive-search-input">Buscar productos</label>
|
||||||
<app-input
|
<app-input
|
||||||
id="immersive-search-input"
|
id="immersive-search-input"
|
||||||
@@ -62,6 +68,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (!showHero() && displaySearchBar()) {
|
||||||
|
<button
|
||||||
|
#searchToggle
|
||||||
|
type="button"
|
||||||
|
class="immersive-header__search-toggle"
|
||||||
|
aria-label="Buscar productos"
|
||||||
|
aria-controls="immersive-search"
|
||||||
|
[attr.aria-expanded]="isSearchOpen()"
|
||||||
|
(click)="toggleSearch()"
|
||||||
|
>
|
||||||
|
<i class="fa-solid fa-magnifying-glass" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
|
||||||
@if (displayCart()) {
|
@if (displayCart()) {
|
||||||
<app-cart-icon
|
<app-cart-icon
|
||||||
[quantity]="cartDisabled() ? null : cartQuantity()"
|
[quantity]="cartDisabled() ? null : cartQuantity()"
|
||||||
@@ -81,13 +101,19 @@
|
|||||||
[ariaExpanded]="isUserDropdownOpen()"
|
[ariaExpanded]="isUserDropdownOpen()"
|
||||||
(clicked)="toggleUserDropdown()"
|
(clicked)="toggleUserDropdown()"
|
||||||
/>
|
/>
|
||||||
@if (isUserDropdownOpen()) {
|
@if (isUserDropdownOpen() && isAuthenticated()) {
|
||||||
<app-user-dropdown
|
<app-user-dropdown
|
||||||
id="immersive-user-dropdown"
|
id="immersive-user-dropdown"
|
||||||
[user]="user()"
|
[user]="user()"
|
||||||
[accountNavigationMenus]="accountNavigationMenus()"
|
[accountNavigationMenus]="accountNavigationMenus()"
|
||||||
(logoutClick)="onLogoutClick()"
|
(logoutClick)="onLogoutClick()"
|
||||||
/>
|
/>
|
||||||
|
} @else if (isUserDropdownOpen()) {
|
||||||
|
<div id="immersive-user-dropdown" class="immersive-header__guest-menu">
|
||||||
|
<button type="button" (click)="isUserDropdownOpen.set(false); loginClick.emit()">
|
||||||
|
Iniciar sesión
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,5 +145,7 @@
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<ng-content />
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1fr);
|
grid-template-columns: minmax(0, 1fr);
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
min-height: 640px;
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
}
|
}
|
||||||
@@ -18,7 +17,7 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding-top: clamp(1.75rem, 4vw, 2.5rem);
|
padding-top: clamp(1.75rem, 4vw, 2.5rem);
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: clamp(1rem, 2vw, 1.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header__backdrop {
|
.immersive-header__backdrop {
|
||||||
@@ -136,11 +135,13 @@
|
|||||||
.immersive-header__title {
|
.immersive-header__title {
|
||||||
margin: -0.15rem 0 0;
|
margin: -0.15rem 0 0;
|
||||||
font-size: 140px;
|
font-size: 140px;
|
||||||
line-height: 1.05;
|
line-height: 0.7;
|
||||||
}
|
}
|
||||||
.immersive-header__description {
|
.immersive-header__description {
|
||||||
margin: 1.15rem 0 0;
|
margin: 30px 0 0;
|
||||||
font-size: clamp(0.75rem, 1.4vw, 0.95rem);
|
font-family: 'Gotham Book', sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 300;
|
||||||
text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
|
text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
|
||||||
}
|
}
|
||||||
.immersive-header__timer {
|
.immersive-header__timer {
|
||||||
@@ -158,10 +159,86 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header--compact {
|
.immersive-header--compact {
|
||||||
min-height: 0;
|
min-height: 115px;
|
||||||
padding-bottom: 1.5rem;
|
|
||||||
color: #666666;
|
color: #666666;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
|
||||||
|
.immersive-header__content {
|
||||||
|
padding: 35px 0 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__nav {
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
gap: 0.75rem;
|
||||||
|
min-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__brand img {
|
||||||
|
width: clamp(92px, 24vw, 145px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__actions {
|
||||||
|
flex: 0 1 auto;
|
||||||
|
gap: 0.375rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__search-toggle {
|
||||||
|
display: none;
|
||||||
|
flex: none;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 32px;
|
||||||
|
height: 44px;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: transparent;
|
||||||
|
color: #888;
|
||||||
|
font-size: 20px;
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 2px solid var(--tenant-primary);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__guest-menu {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 0.5rem);
|
||||||
|
right: 0;
|
||||||
|
min-width: 180px;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 4px 16px #0002;
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.75rem;
|
||||||
|
border: 0;
|
||||||
|
background: transparent;
|
||||||
|
color: #666;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:host ::ng-deep .immersive-header--compact {
|
||||||
|
.immersive-header__tickets {
|
||||||
|
flex: none;
|
||||||
|
width: auto;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
min-width: 120px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__account .icon-btn {
|
||||||
|
width: 32px;
|
||||||
|
height: 44px;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.immersive-header--compact .immersive-header__backdrop {
|
.immersive-header--compact .immersive-header__backdrop {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -169,7 +246,18 @@
|
|||||||
|
|
||||||
:host ::ng-deep .immersive-header--compact .immersive-header__actions .icon-btn,
|
:host ::ng-deep .immersive-header--compact .immersive-header__actions .icon-btn,
|
||||||
:host ::ng-deep .immersive-header--compact .immersive-header__actions .cart-icon {
|
:host ::ng-deep .immersive-header--compact .immersive-header__actions .cart-icon {
|
||||||
color: #666666;
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 359.98px) {
|
||||||
|
.immersive-header--compact .immersive-header__nav {
|
||||||
|
padding-inline: 1rem !important;
|
||||||
|
gap: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header--compact .immersive-header__actions {
|
||||||
|
gap: 0.125rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
@@ -196,6 +284,34 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
|
.immersive-header--compact {
|
||||||
|
.immersive-header__search {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 0.5rem);
|
||||||
|
right: 8vw;
|
||||||
|
display: none;
|
||||||
|
width: min(320px, 84vw);
|
||||||
|
padding: 0.75rem;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
box-shadow: 0 4px 16px #0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__search--open {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__search-error {
|
||||||
|
position: static;
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.immersive-header__search-toggle {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.immersive-header:not(.immersive-header--compact) {
|
.immersive-header:not(.immersive-header--compact) {
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
|
||||||
@@ -203,7 +319,8 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 1.25rem 0 0;
|
align-content: start;
|
||||||
|
padding: 1.875rem 0 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep one search form while placing it below the hero copy on mobile.
|
// Keep one search form while placing it below the hero copy on mobile.
|
||||||
@@ -236,7 +353,7 @@
|
|||||||
|
|
||||||
.immersive-header__copy {
|
.immersive-header__copy {
|
||||||
grid-area: 3 / 1 / auto / -1;
|
grid-area: 3 / 1 / auto / -1;
|
||||||
margin: 1rem 0 0;
|
margin: 1.25rem 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header__eyebrow {
|
.immersive-header__eyebrow {
|
||||||
@@ -244,18 +361,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header__title {
|
.immersive-header__title {
|
||||||
font-size: clamp(42px, 13vw, 64px);
|
font-size: clamp(40px, 12vw, 56px);
|
||||||
line-height: 0.95;
|
line-height: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header__description {
|
.immersive-header__description {
|
||||||
margin-top: 2rem;
|
margin-top: 30px;
|
||||||
font-size: clamp(11px, 3vw, 14px);
|
font-size: clamp(11px, 3vw, 14px);
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #666;
|
||||||
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header__search {
|
.immersive-header__search {
|
||||||
grid-area: 4 / 1 / auto / -1;
|
grid-area: 4 / 1 / auto / -1;
|
||||||
width: 76%;
|
width: 74%;
|
||||||
max-width: 28rem;
|
max-width: 28rem;
|
||||||
margin: 0.5rem auto 0;
|
margin: 0.5rem auto 0;
|
||||||
}
|
}
|
||||||
@@ -264,11 +384,11 @@
|
|||||||
right: auto;
|
right: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #fff;
|
color: var(--tenant-danger, #dc3545);
|
||||||
}
|
}
|
||||||
|
|
||||||
app-continuous-image-carousel {
|
app-continuous-image-carousel {
|
||||||
grid-area: 5 / 1 / auto / -1;
|
grid-area: 6 / 1 / auto / -1;
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
--carousel-card-width: 27vw;
|
--carousel-card-width: 27vw;
|
||||||
--carousel-gap: 3.3vw;
|
--carousel-gap: 3.3vw;
|
||||||
@@ -280,6 +400,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header__backdrop {
|
.immersive-header__backdrop {
|
||||||
|
// Keep the fade tied to the hero, independent of the content below it.
|
||||||
|
align-self: start;
|
||||||
|
height: 12.5rem;
|
||||||
// Fade the entire layer so its dark base cannot leave a subpixel seam.
|
// Fade the entire layer so its dark base cannot leave a subpixel seam.
|
||||||
mask-image: linear-gradient(#000 calc(100% - 8px), transparent 100%);
|
mask-image: linear-gradient(#000 calc(100% - 8px), transparent 100%);
|
||||||
}
|
}
|
||||||
@@ -287,10 +410,10 @@
|
|||||||
.immersive-header__backdrop::after {
|
.immersive-header__backdrop::after {
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
180deg,
|
180deg,
|
||||||
rgba(0, 0, 0, 0.45) 0%,
|
rgba(0, 0, 0, 0.25) 0%,
|
||||||
rgba(0, 0, 0, 0.15) 55%,
|
rgba(245, 245, 245, 0.1) 30%,
|
||||||
rgba(245, 245, 245, 0.55) 75%,
|
rgba(245, 245, 245, 0.65) 65%,
|
||||||
#f5f5f5 95%,
|
#f5f5f5 98%,
|
||||||
#f5f5f5 100%
|
#f5f5f5 100%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -300,10 +423,10 @@
|
|||||||
.immersive-header__search .form-control {
|
.immersive-header__search .form-control {
|
||||||
min-height: 36px;
|
min-height: 36px;
|
||||||
padding: 0.25rem 2.5rem 0.25rem 0.75rem;
|
padding: 0.25rem 2.5rem 0.25rem 0.75rem;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.85);
|
border: 1px solid #888;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: #fff;
|
color: #666;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
@@ -311,13 +434,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
outline: 2px solid #fff;
|
outline: 2px solid #666;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.immersive-header__search .input-search-icon {
|
.immersive-header__search .input-search-icon {
|
||||||
color: #fff;
|
color: #666;
|
||||||
right: 0.75rem;
|
right: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import {
|
|||||||
input,
|
input,
|
||||||
output,
|
output,
|
||||||
signal,
|
signal,
|
||||||
|
afterRenderEffect,
|
||||||
|
viewChild,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { RouterLink } from '@angular/router';
|
import { RouterLink } from '@angular/router';
|
||||||
import { AuthUser } from '../../../services/auth/auth.interfaces';
|
import { AuthUser } from '../../../services/auth/auth.interfaces';
|
||||||
@@ -59,6 +61,20 @@ export class ImmersiveStoreHeaderComponent {
|
|||||||
protected searchTerm = '';
|
protected searchTerm = '';
|
||||||
protected readonly showSearchError = signal(false);
|
protected readonly showSearchError = signal(false);
|
||||||
protected readonly isUserDropdownOpen = signal(false);
|
protected readonly isUserDropdownOpen = signal(false);
|
||||||
|
protected readonly isSearchOpen = signal(false);
|
||||||
|
private readonly searchInput = viewChild(InputComponent);
|
||||||
|
private readonly searchToggle = viewChild<ElementRef<HTMLButtonElement>>('searchToggle');
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
afterRenderEffect(() => {
|
||||||
|
if (this.isSearchOpen()) this.searchInput()?.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected toggleSearch(): void {
|
||||||
|
this.isUserDropdownOpen.set(false);
|
||||||
|
this.isSearchOpen.update((open) => !open);
|
||||||
|
}
|
||||||
protected readonly checkoutRemainingTime = computed(() => {
|
protected readonly checkoutRemainingTime = computed(() => {
|
||||||
const seconds = this.checkoutRemainingSeconds();
|
const seconds = this.checkoutRemainingSeconds();
|
||||||
if (seconds === null) return null;
|
if (seconds === null) return null;
|
||||||
@@ -76,11 +92,13 @@ export class ImmersiveStoreHeaderComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.showSearchError.set(false);
|
this.showSearchError.set(false);
|
||||||
|
this.isSearchOpen.set(false);
|
||||||
this.searchSubmit.emit(term);
|
this.searchSubmit.emit(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected toggleUserDropdown(): void {
|
protected toggleUserDropdown(): void {
|
||||||
if (!this.isAuthenticated()) {
|
this.isSearchOpen.set(false);
|
||||||
|
if (this.showHero() && !this.isAuthenticated()) {
|
||||||
this.loginClick.emit();
|
this.loginClick.emit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -100,11 +118,14 @@ export class ImmersiveStoreHeaderComponent {
|
|||||||
protected onDocumentClick(event: MouseEvent): void {
|
protected onDocumentClick(event: MouseEvent): void {
|
||||||
if (event.target instanceof Node && !this.host.nativeElement.contains(event.target)) {
|
if (event.target instanceof Node && !this.host.nativeElement.contains(event.target)) {
|
||||||
this.isUserDropdownOpen.set(false);
|
this.isUserDropdownOpen.set(false);
|
||||||
|
this.isSearchOpen.set(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('document:keydown.escape')
|
@HostListener('document:keydown.escape')
|
||||||
protected onEscapeKey(): void {
|
protected onEscapeKey(): void {
|
||||||
|
if (this.isSearchOpen()) this.searchToggle()?.nativeElement.focus();
|
||||||
|
this.isSearchOpen.set(false);
|
||||||
this.isUserDropdownOpen.set(false);
|
this.isUserDropdownOpen.set(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,6 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-layout__header-main {
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.store-layout__categories {
|
.store-layout__categories {
|
||||||
height: 3.5rem;
|
height: 3.5rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,17 @@
|
|||||||
(loginClick)="loginClick.emit()"
|
(loginClick)="loginClick.emit()"
|
||||||
(logoutClick)="logoutClick.emit()"
|
(logoutClick)="logoutClick.emit()"
|
||||||
(searchSubmit)="searchSubmit.emit($event)"
|
(searchSubmit)="searchSubmit.emit($event)"
|
||||||
|
>
|
||||||
|
@if (showHero() && displayCategories() && categories().length) {
|
||||||
|
<nav class="immersive-categories" aria-label="Categorías">
|
||||||
|
<app-horizontal-carousel
|
||||||
|
[items]="categoryItems()"
|
||||||
|
ariaLabel="Categorías"
|
||||||
|
(itemSelect)="onCategoryItemSelect($event)"
|
||||||
/>
|
/>
|
||||||
|
</nav>
|
||||||
|
}
|
||||||
|
</app-immersive-store-header>
|
||||||
}
|
}
|
||||||
@default {
|
@default {
|
||||||
<ng-container *ngTemplateOutlet="standardHeader" />
|
<ng-container *ngTemplateOutlet="standardHeader" />
|
||||||
@@ -50,13 +60,3 @@
|
|||||||
(categorySelect)="categorySelect.emit($event)"
|
(categorySelect)="categorySelect.emit($event)"
|
||||||
/>
|
/>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
@if (headerType() === 'immersive' && displayCategories() && categories().length) {
|
|
||||||
<nav class="immersive-categories" aria-label="Categor<6F>as">
|
|
||||||
<app-horizontal-carousel
|
|
||||||
[items]="categoryItems()"
|
|
||||||
ariaLabel="Categor<6F>as"
|
|
||||||
(itemSelect)="onCategoryItemSelect($event)"
|
|
||||||
/>
|
|
||||||
</nav>
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,45 +8,43 @@ app-immersive-store-header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
:host(.immersive-shell--compact) {
|
:host(.immersive-shell--compact) {
|
||||||
|
position: relative;
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
background-position: center 42%;
|
background-image: none !important;
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host(.immersive-shell--compact) .immersive-categories {
|
&::before {
|
||||||
border: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host(.immersive-shell--compact) .immersive-categories::after {
|
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
inset: 0;
|
||||||
right: 0;
|
|
||||||
bottom: -1px;
|
|
||||||
left: 0;
|
|
||||||
height: 2px;
|
|
||||||
background: #f5f5f5;
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
background-image: var(--compact-header-background);
|
||||||
|
background-position: left top, center 42%;
|
||||||
|
background-size: 100% 100%, cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
mask-image: linear-gradient(#000 calc(100% - 12px), transparent calc(100% - 4px));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.immersive-categories {
|
.immersive-categories {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 0;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-top: clamp(5rem, 11vw, 9rem);
|
||||||
padding: 0.375rem 1rem;
|
padding: 0.375rem 1rem;
|
||||||
background: #f5f5f5;
|
background: transparent;
|
||||||
color: #666;
|
color: #666;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
--horizontal-carousel-gap: clamp(1rem, 3vw, 2.5rem);
|
--horizontal-carousel-gap: 90px;
|
||||||
--horizontal-carousel-text-transform: uppercase;
|
--horizontal-carousel-text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
.immersive-categories {
|
.immersive-categories {
|
||||||
padding: 1rem 0.25rem 0;
|
grid-area: 5 / 1 / auto / -1;
|
||||||
|
min-width: 0;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
padding: 0 1rem;
|
||||||
font-size: clamp(10px, 2.8vw, 12px);
|
font-size: clamp(10px, 2.8vw, 12px);
|
||||||
--horizontal-carousel-visible-items: 3;
|
--horizontal-carousel-visible-items: 3;
|
||||||
--horizontal-carousel-gap: 0.5rem;
|
--horizontal-carousel-gap: 0.5rem;
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ export type StoreHeaderType = 'standard' | 'immersive';
|
|||||||
styleUrl: './store-header.component.scss',
|
styleUrl: './store-header.component.scss',
|
||||||
host: {
|
host: {
|
||||||
'[class.immersive-shell--compact]': 'isCompactImmersive()',
|
'[class.immersive-shell--compact]': 'isCompactImmersive()',
|
||||||
'[style.background-image]': 'compactBackground()',
|
'[style.background-image]': 'null',
|
||||||
|
'[style.--compact-header-background]': 'compactBackground()',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export class StoreHeaderComponent {
|
export class StoreHeaderComponent {
|
||||||
@@ -41,7 +42,7 @@ export class StoreHeaderComponent {
|
|||||||
if (!this.isCompactImmersive()) return null;
|
if (!this.isCompactImmersive()) return null;
|
||||||
|
|
||||||
const gradient =
|
const gradient =
|
||||||
'linear-gradient(180deg, rgba(245, 245, 245, 0.72) 0%, rgba(245, 245, 245, 0.88) 58%, #f5f5f5 100%)';
|
'linear-gradient(180deg, rgba(245, 245, 245, 0.72) 0%, rgba(245, 245, 245, 0.88) 58%, #f5f5f5 calc(100% - 4px), #f5f5f5 100%)';
|
||||||
const image = this.backgroundImageUrl();
|
const image = this.backgroundImageUrl();
|
||||||
return image ? `${gradient}, url(${JSON.stringify(image)})` : gradient;
|
return image ? `${gradient}, url(${JSON.stringify(image)})` : gradient;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ describe('StoreLayoutComponent', () => {
|
|||||||
expect(element.querySelector('[data-testid="store-header-tickets"]')).not.toBeNull();
|
expect(element.querySelector('[data-testid="store-header-tickets"]')).not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows immersive categories below the header and navigates on selection', () => {
|
it('shows immersive categories inside the header and navigates on selection', () => {
|
||||||
tenantState.set({
|
tenantState.set({
|
||||||
...tenant,
|
...tenant,
|
||||||
header_type: 'immersive',
|
header_type: 'immersive',
|
||||||
@@ -362,7 +362,7 @@ describe('StoreLayoutComponent', () => {
|
|||||||
|
|
||||||
expect(header).not.toBeNull();
|
expect(header).not.toBeNull();
|
||||||
expect(categories).not.toBeNull();
|
expect(categories).not.toBeNull();
|
||||||
expect(header?.contains(categories)).toBe(false);
|
expect(header?.contains(categories)).toBe(true);
|
||||||
expect(categoryButton?.textContent?.trim()).toBe('MÚSICA');
|
expect(categoryButton?.textContent?.trim()).toBe('MÚSICA');
|
||||||
|
|
||||||
const navigate = vi.spyOn(TestBed.inject(Router), 'navigate');
|
const navigate = vi.spyOn(TestBed.inject(Router), 'navigate');
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@if (event(); as item) {
|
@if (event(); as item) {
|
||||||
<div class="event-detail row gx-sm-4 gx-lg-5">
|
<div class="event-detail">
|
||||||
<aside class="event-detail__sidebar col-12 col-sm-4">
|
<aside class="event-detail__sidebar">
|
||||||
<div class="event-detail__image" [class.event-detail__image--placeholder]="!item.image">
|
<div class="event-detail__image" [class.event-detail__image--placeholder]="!item.image">
|
||||||
@if (item.image) {
|
@if (item.image) {
|
||||||
<img [src]="item.image" [alt]="item.title" />
|
<img [src]="item.image" [alt]="item.title" />
|
||||||
@@ -12,37 +12,9 @@
|
|||||||
@if (item.starts_at) {
|
@if (item.starts_at) {
|
||||||
<app-counter-to [startsAt]="item.starts_at" />
|
<app-counter-to [startsAt]="item.starts_at" />
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (item.description) {
|
|
||||||
<section class="event-detail__description" aria-labelledby="event-description-title">
|
|
||||||
<h2 id="event-description-title">Descripción</h2>
|
|
||||||
<p>{{ item.description }}</p>
|
|
||||||
</section>
|
|
||||||
}
|
|
||||||
|
|
||||||
@if (item.social_media?.length) {
|
|
||||||
<section class="event-detail__social" aria-labelledby="event-social-title">
|
|
||||||
<h2 id="event-social-title">Información</h2>
|
|
||||||
@for (social of item.social_media; track social.code) {
|
|
||||||
<a [href]="social.url" target="_blank" rel="noopener noreferrer">
|
|
||||||
<i [class]="socialIcon(social.code)" aria-hidden="true"></i>
|
|
||||||
<span>{{ socialLabel(social.code) }}</span>
|
|
||||||
</a>
|
|
||||||
}
|
|
||||||
</section>
|
|
||||||
}
|
|
||||||
|
|
||||||
@if (mapLocations().length) {
|
|
||||||
<app-location-map
|
|
||||||
class="event-detail__map"
|
|
||||||
[locations]="mapLocations()"
|
|
||||||
ariaLabel="Ubicación del evento"
|
|
||||||
mapStyle="standard"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<main class="event-detail__main col-12 col-sm-8">
|
<main class="event-detail__main">
|
||||||
<header class="event-detail__header">
|
<header class="event-detail__header">
|
||||||
<h1>{{ item.title }}</h1>
|
<h1>{{ item.title }}</h1>
|
||||||
@if (item.subtitle) { <p class="event-detail__subtitle">{{ item.subtitle }}</p> }
|
@if (item.subtitle) { <p class="event-detail__subtitle">{{ item.subtitle }}</p> }
|
||||||
@@ -105,6 +77,36 @@
|
|||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<aside class="event-detail__details">
|
||||||
|
@if (item.description) {
|
||||||
|
<section class="event-detail__description" aria-labelledby="event-description-title">
|
||||||
|
<h2 id="event-description-title">Descripción</h2>
|
||||||
|
<p>{{ item.description }}</p>
|
||||||
|
</section>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (item.social_media?.length) {
|
||||||
|
<section class="event-detail__social" aria-labelledby="event-social-title">
|
||||||
|
<h2 id="event-social-title">Información</h2>
|
||||||
|
@for (social of item.social_media; track social.code) {
|
||||||
|
<a [href]="social.url" target="_blank" rel="noopener noreferrer">
|
||||||
|
<i [class]="socialIcon(social.code)" aria-hidden="true"></i>
|
||||||
|
<span>{{ socialLabel(social.code) }}</span>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
</section>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (mapLocations().length) {
|
||||||
|
<app-location-map
|
||||||
|
class="event-detail__map"
|
||||||
|
[locations]="mapLocations()"
|
||||||
|
ariaLabel="Ubicación del evento"
|
||||||
|
mapStyle="standard"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
} @else if (!loading()) {
|
} @else if (!loading()) {
|
||||||
<p role="alert">No encontramos este evento.</p>
|
<p role="alert">No encontramos este evento.</p>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
:host { display: block; color: #666666; }
|
:host { display: block; color: #666666; }
|
||||||
.event-detail { margin-bottom: 3rem; }
|
.event-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 1.5rem; margin-bottom: 3rem; }
|
||||||
.event-detail__sidebar, .event-detail__main { min-width: 0; }
|
.event-detail__sidebar, .event-detail__main { min-width: 0; }
|
||||||
|
.event-detail__sidebar { grid-column: 1; grid-row: 1; }
|
||||||
|
.event-detail__main { grid-column: 2; grid-row: 1 / span 2; }
|
||||||
|
.event-detail__details { min-width: 0; grid-column: 1; grid-row: 2; }
|
||||||
.event-detail__image { background: #e7e8e9; }
|
.event-detail__image { background: #e7e8e9; }
|
||||||
.event-detail__image--placeholder { aspect-ratio: 1.43; display: grid; place-items: center; }
|
.event-detail__image--placeholder { aspect-ratio: 1.43; display: grid; place-items: center; }
|
||||||
.event-detail__image img { width: 100%; height: auto; display: block; }
|
.event-detail__image img { width: 100%; height: auto; display: block; }
|
||||||
@@ -34,10 +37,40 @@
|
|||||||
.event-detail__buttons { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.6rem; }
|
.event-detail__buttons { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.6rem; }
|
||||||
.event-detail__buttons app-button { min-width: 0; flex: 0 0 36%; }
|
.event-detail__buttons app-button { min-width: 0; flex: 0 0 36%; }
|
||||||
.event-detail__empty { color: #7c8286; font-size: .85rem; }
|
.event-detail__empty { color: #7c8286; font-size: .85rem; }
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.event-detail { column-gap: 3rem; }
|
||||||
|
}
|
||||||
@media (max-width: 575.98px) {
|
@media (max-width: 575.98px) {
|
||||||
|
.event-detail { grid-template-columns: minmax(0, 1fr); }
|
||||||
|
.event-detail__sidebar, .event-detail__main, .event-detail__details { grid-column: 1; grid-row: auto; }
|
||||||
.event-detail__main { margin-top: 2rem; }
|
.event-detail__main { margin-top: 2rem; }
|
||||||
|
.event-detail__date-select { width: 100%; }
|
||||||
.event-detail__description, .event-detail__social { margin-top: 1.5rem; }
|
.event-detail__description, .event-detail__social { margin-top: 1.5rem; }
|
||||||
.event-detail__header { min-height: 0; margin-bottom: 2rem; }
|
.event-detail__header { min-height: 0; margin-bottom: 2rem; }
|
||||||
.event-detail__buttons { flex-wrap: wrap; }
|
.event-detail__header h1 { font-size: 20px; }
|
||||||
.event-detail__buttons app-button { flex: 1 1 100%; }
|
.event-detail__product-list { gap: 42px; }
|
||||||
|
.event-detail__product {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) 96px 72px;
|
||||||
|
column-gap: 26px;
|
||||||
|
margin-inline: 0;
|
||||||
|
}
|
||||||
|
.event-detail__product > * { width: auto; margin-top: 0; padding-inline: 0; }
|
||||||
|
.event-detail__product h3 { align-self: center; font-size: 13px; }
|
||||||
|
.event-detail__product-action { margin-left: 0 !important; }
|
||||||
|
.event-detail__product-action app-quantity-selector {
|
||||||
|
--quantity-selector-width: 96px;
|
||||||
|
--quantity-selector-height: 32px;
|
||||||
|
--quantity-selector-button-width: 28px;
|
||||||
|
--quantity-selector-button-font-size: 14px;
|
||||||
|
--quantity-selector-value-font-size: 14px;
|
||||||
|
}
|
||||||
|
.event-detail__price { align-self: center; font-size: 14px; }
|
||||||
|
.event-detail__total { margin-top: 44px; padding-top: 25px; font-size: 13px; }
|
||||||
|
.event-detail__total strong { font-size: 20px; }
|
||||||
|
.event-detail__buttons { gap: 10px; margin-top: 44px; }
|
||||||
|
.event-detail__buttons app-button {
|
||||||
|
--app-button-min-height: 50px;
|
||||||
|
flex: 1 1 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
min-height: 40px;
|
min-height: var(--app-button-min-height, 40px);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767.98px) {
|
||||||
|
.btn {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.btn-primary,
|
.btn-primary,
|
||||||
.btn-secondary,
|
.btn-secondary,
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
:host { display: block; margin-top: 9px; }
|
:host { display: block; margin-top: 9px; }
|
||||||
.counter-to { min-height: 30px; padding-block: 12px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; text-align: center; border: 1px solid #d7d9db; border-radius: 3px; }
|
.counter-to { min-height: 30px; padding-block: 12px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; text-align: center; border: 1px solid #a0a0a0; border-radius: 3px; }
|
||||||
.counter-to > div + div { border-left: 1px solid #e6e7e8; }
|
.counter-to > div + div { border-left: 1px solid #e6e7e8; }
|
||||||
.counter-to strong { display: block; color: #666666; font-size: 16px; font-weight: 700; line-height: 1.1; }
|
.counter-to strong { display: block; color: #666666; font-size: 16px; font-weight: 700; line-height: 1.1; }
|
||||||
.counter-to small { display: block; margin-top: 1px; color: #666666; font-size: 11px; font-weight: 400; letter-spacing: .02em; }
|
.counter-to small { display: block; margin-top: 1px; color: #666666; font-size: 11px; font-weight: 400; letter-spacing: .02em; }
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
|
|
||||||
.quantity-selector {
|
.quantity-selector {
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
width: 78px;
|
width: var(--quantity-selector-width, 78px);
|
||||||
height: 40px;
|
height: var(--quantity-selector-height, 40px);
|
||||||
min-height: 40px;
|
min-height: var(--quantity-selector-height, 40px);
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
&__button {
|
&__button {
|
||||||
width: 24px;
|
width: var(--quantity-selector-button-width, 24px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 20px;
|
font-size: var(--quantity-selector-button-font-size, 20px);
|
||||||
color: #6f6f6f;
|
color: #6f6f6f;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
transition:
|
transition:
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__value {
|
&__value {
|
||||||
font-size: 16px;
|
font-size: var(--quantity-selector-value-font-size, 16px);
|
||||||
color: #6f6f6f;
|
color: #6f6f6f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,11 @@
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2.simple-modal__content {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.simple-modal__actions {
|
.simple-modal__actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
z-index: 1500;
|
z-index: 1500;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.25rem;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
width: 90vw;
|
width: 90vw;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
|||||||
Reference in New Issue
Block a user