Commit 5ac86e32f026f47fe9762bdaf543f4a4d8342e95
Exists in
develop
Merge branch 'develop' into 'develop'
Develop See merge request !44
Showing
31 changed files
Show diff stats
package-lock.json
| ... | ... | @@ -1973,6 +1973,14 @@ |
| 1973 | 1973 | "@types/jasmine": "*" |
| 1974 | 1974 | } |
| 1975 | 1975 | }, |
| 1976 | + "@types/jquery": { | |
| 1977 | + "version": "3.3.31", | |
| 1978 | + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.31.tgz", | |
| 1979 | + "integrity": "sha512-Lz4BAJihoFw5nRzKvg4nawXPzutkv7wmfQ5121avptaSIXlDNJCUuxZxX/G+9EVidZGuO0UBlk+YjKbwRKJigg==", | |
| 1980 | + "requires": { | |
| 1981 | + "@types/sizzle": "*" | |
| 1982 | + } | |
| 1983 | + }, | |
| 1976 | 1984 | "@types/minimatch": { |
| 1977 | 1985 | "version": "3.0.3", |
| 1978 | 1986 | "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", |
| ... | ... | @@ -1997,6 +2005,11 @@ |
| 1997 | 2005 | "integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==", |
| 1998 | 2006 | "dev": true |
| 1999 | 2007 | }, |
| 2008 | + "@types/sizzle": { | |
| 2009 | + "version": "2.3.2", | |
| 2010 | + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", | |
| 2011 | + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==" | |
| 2012 | + }, | |
| 2000 | 2013 | "@types/source-list-map": { |
| 2001 | 2014 | "version": "0.1.2", |
| 2002 | 2015 | "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", |
package.json
src/app/modules/carrito/carrito.component.html
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <!-- PUBLICIDADES --> |
| 3 | 3 | <app-header-publicidad></app-header-publicidad> |
| 4 | 4 | |
| 5 | - <div class="h-75"> | |
| 5 | + <div class="h-75 carrito-content"> | |
| 6 | 6 | <!-- CABECERA --> |
| 7 | 7 | <div class="row mx-3 h-auto border border-primary rounded-sm"> |
| 8 | 8 | <div class="col-12 px-0 py-2 align-self-center"> |
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | </div> |
| 23 | 23 | <!-- ARTICULOS --> |
| 24 | 24 | <div |
| 25 | - class="col-12 col-xl-6 p-2 h-50 h-md-25 h-xl-40 text-center text-truncate" | |
| 25 | + class="col-12 col-xl-6 p-2 h-50 h-md-25 h-xl-40 text-center text-truncate carrito-articulo" | |
| 26 | 26 | *ngFor="let articulo of articuloService.carrito; let i = index;" |
| 27 | 27 | @EnterLeave> |
| 28 | 28 | <!-- ARTICULO --> |
src/app/modules/carrito/carrito.component.scss
src/app/modules/carrito/carrito.component.ts
| ... | ... | @@ -42,6 +42,7 @@ export class CarritoComponent implements OnInit, OnDestroy { |
| 42 | 42 | this.router.navigate(['']); |
| 43 | 43 | return; |
| 44 | 44 | } |
| 45 | + this.mediaPantallaP() | |
| 45 | 46 | } |
| 46 | 47 | |
| 47 | 48 | ngOnDestroy() { |
| ... | ... | @@ -75,4 +76,9 @@ export class CarritoComponent implements OnInit, OnDestroy { |
| 75 | 76 | this.inactiveScreen.startTimeOutInactividad(); |
| 76 | 77 | } |
| 77 | 78 | |
| 79 | + mediaPantallaP() { | |
| 80 | + if ($('body').hasClass('media-pantalla')) { | |
| 81 | + $('.carrito-content,.carrito-articulo').addClass('media-pantalla'); | |
| 82 | + } | |
| 83 | + } | |
| 78 | 84 | } |
src/app/modules/forma-pago/forma-pago.component.html
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
| 20 | 20 | <!-- OPCION PAGO ELECTRONICO --> |
| 21 | - <div class="row mt-5 h-auto justify-content-center mx-0"> | |
| 21 | + <div class="row mt-5 h-auto justify-content-center mx-0 reduce-card-1"> | |
| 22 | 22 | <div class="col-auto px-0 h-auto align-self-start"> |
| 23 | 23 | <div |
| 24 | 24 | class="btn-effect col-auto align-self-center px-0 bg-white" |
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | </div> |
| 47 | 47 | </div> |
| 48 | 48 | <!-- OPCION PAGO CON TARJETA --> |
| 49 | - <div class="row mt-5 h-auto justify-content-center mx-0"> | |
| 49 | + <div class="row mt-5 h-auto justify-content-center mx-0 reduce-card-2"> | |
| 50 | 50 | <div class="col-auto px-0 h-auto align-self-start"> |
| 51 | 51 | <div |
| 52 | 52 | class="btn-effect col-auto align-self-center px-0 bg-white" |
src/app/modules/forma-pago/forma-pago.component.scss
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +.reduce-card-1.media-pantalla { | |
| 2 | + position: absolute; | |
| 3 | + bottom: 150px; | |
| 4 | + -webkit-box-flex: 0; | |
| 5 | + flex: 0 0 41.6666666667%; | |
| 6 | + max-width: 41.6666666667%; | |
| 7 | + left: 10%; | |
| 8 | + margin-left: 0 !important; | |
| 9 | +} | |
| 10 | + | |
| 11 | +.reduce-card-2.media-pantalla { | |
| 12 | + position: absolute; | |
| 13 | + bottom: 150px; | |
| 14 | + -webkit-box-flex: 0; | |
| 15 | + flex: 0 0 41.6666666667%; | |
| 16 | + max-width: 41.6666666667%; | |
| 17 | + right: 10%; | |
| 18 | + margin-right: 0 !important; | |
| 19 | +} |
src/app/modules/forma-pago/forma-pago.component.ts
| 1 | -import { Component, OnInit } from '@angular/core'; | |
| 2 | -import { ArticuloService } from 'src/app/services/articulo/articulo.service'; | |
| 3 | -import { Router } from '@angular/router'; | |
| 1 | +import { Component, OnInit } from "@angular/core"; | |
| 2 | +import { ArticuloService } from "src/app/services/articulo/articulo.service"; | |
| 3 | +import { Router } from "@angular/router"; | |
| 4 | 4 | |
| 5 | 5 | @Component({ |
| 6 | - selector: 'app-forma-pago', | |
| 7 | - templateUrl: './forma-pago.component.html', | |
| 8 | - styleUrls: ['./forma-pago.component.scss'] | |
| 6 | + selector: "app-forma-pago", | |
| 7 | + templateUrl: "./forma-pago.component.html", | |
| 8 | + styleUrls: ["./forma-pago.component.scss"] | |
| 9 | 9 | }) |
| 10 | 10 | export class FormaPagoComponent implements OnInit { |
| 11 | - | |
| 12 | 11 | constructor( |
| 13 | 12 | private articuloService: ArticuloService, |
| 14 | - private router: Router, | |
| 15 | - ) { } | |
| 13 | + private router: Router | |
| 14 | + ) {} | |
| 16 | 15 | |
| 17 | 16 | ngOnInit() { |
| 18 | 17 | if (!this.articuloService.carrito.length) { |
| 19 | - this.router.navigate(['']); | |
| 18 | + this.router.navigate([""]); | |
| 20 | 19 | return; |
| 21 | 20 | } |
| 21 | + this.mediaPantalla(); | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | medioPago(medioPago: number) { |
| 25 | 25 | this.articuloService.medioPago = medioPago; |
| 26 | 26 | switch (medioPago) { |
| 27 | 27 | case 4: |
| 28 | - this.router.navigate(['pago-tarjeta']); | |
| 28 | + this.router.navigate(["pago-tarjeta"]); | |
| 29 | 29 | break; |
| 30 | 30 | case 9: |
| 31 | - this.router.navigate(['pago-electronico']); | |
| 31 | + this.router.navigate(["pago-electronico"]); | |
| 32 | 32 | break; |
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | + mediaPantalla() { | |
| 37 | + if ($('body').hasClass('media-pantalla')) { | |
| 38 | + $('.reduce-card-1,.reduce-card-2').addClass('media-pantalla'); | |
| 39 | + } | |
| 40 | + } | |
| 36 | 41 | } |
src/app/modules/info-formas-pago/info-formas-pago.component.html
| ... | ... | @@ -11,7 +11,8 @@ |
| 11 | 11 | </div> |
| 12 | 12 | <div class="h-85"> |
| 13 | 13 | <div class="row h-auto mt-6 mx-0 justify-content-center text-center"> |
| 14 | - <div class="col-7 col-xl-4 p-5 m-5 h-auto align-self-end border border-secondary rounded"> | |
| 14 | + <div class="col-7 col-lg-4 p-5 m-5 h-auto align-self-end border | |
| 15 | + border-secondary rounded reduce-card-1"> | |
| 15 | 16 | <img |
| 16 | 17 | draggable="false" |
| 17 | 18 | ondragstart="return false;" |
| ... | ... | @@ -40,7 +41,8 @@ |
| 40 | 41 | src="assets/img/ir.svg"> |
| 41 | 42 | </div> |
| 42 | 43 | </div> |
| 43 | - <div class="col-7 col-xl-4 p-5 m-5 h-auto align-self-center border border-primary rounded"> | |
| 44 | + <div class="col-7 col-lg-4 p-5 m-5 h-auto align-self-center border | |
| 45 | + border-primary rounded reduce-card-2"> | |
| 44 | 46 | <img |
| 45 | 47 | draggable="false" |
| 46 | 48 | ondragstart="return false;" |
src/app/modules/info-formas-pago/info-formas-pago.component.scss
| 1 | 1 | .mt-6 { |
| 2 | 2 | margin-top: 4.5rem; |
| 3 | 3 | } |
| 4 | + | |
| 5 | +.reduce-card-1.media-pantalla { | |
| 6 | + position: absolute; | |
| 7 | + bottom: 0; | |
| 8 | + -webkit-box-flex: 0; | |
| 9 | + flex: 0 0 41.6666666667%; | |
| 10 | + max-width: 41.6666666667%; | |
| 11 | + left: 5%; | |
| 12 | + margin-left: 0 !important; | |
| 13 | +} | |
| 14 | + | |
| 15 | +.reduce-card-2.media-pantalla { | |
| 16 | + position: absolute; | |
| 17 | + bottom: 0; | |
| 18 | + -webkit-box-flex: 0; | |
| 19 | + flex: 0 0 41.6666666667%; | |
| 20 | + max-width: 41.6666666667%; | |
| 21 | + right: 5%; | |
| 22 | + margin-right: 0 !important; | |
| 23 | + height: 202px !important; | |
| 24 | +} |
src/app/modules/info-formas-pago/info-formas-pago.component.ts
| ... | ... | @@ -6,7 +6,17 @@ import { Component, OnInit } from '@angular/core'; |
| 6 | 6 | styleUrls: ['./info-formas-pago.component.scss'] |
| 7 | 7 | }) |
| 8 | 8 | export class InfoFormasPagoComponent implements OnInit { |
| 9 | + mediaPantalla = false; | |
| 10 | + | |
| 9 | 11 | constructor() {} |
| 10 | 12 | |
| 11 | - ngOnInit() {} | |
| 13 | + ngOnInit() { | |
| 14 | + this.reducirPantalla(); | |
| 15 | + } | |
| 16 | + | |
| 17 | + reducirPantalla() { | |
| 18 | + if ($('body').hasClass('media-pantalla')) { | |
| 19 | + $('.reduce-card-1,.reduce-card-2').addClass('media-pantalla'); | |
| 20 | + } | |
| 21 | + } | |
| 12 | 22 | } |
src/app/modules/mensaje-final/mensaje-final.component.ts
| ... | ... | @@ -19,6 +19,7 @@ export class MensajeFinalComponent implements OnInit { |
| 19 | 19 | this.timer = setTimeout(() => { |
| 20 | 20 | this.goToSplash(); |
| 21 | 21 | }, 10000); |
| 22 | + this.mediaPantalla(); | |
| 22 | 23 | } |
| 23 | 24 | |
| 24 | 25 | OnDestroy() { |
| ... | ... | @@ -30,4 +31,9 @@ export class MensajeFinalComponent implements OnInit { |
| 30 | 31 | this.router.navigate(['']); |
| 31 | 32 | } |
| 32 | 33 | |
| 34 | + mediaPantalla() { | |
| 35 | + if ($('body').hasClass('media-pantalla')) { | |
| 36 | + $('body').removeClass('media-pantalla'); | |
| 37 | + } | |
| 38 | + } | |
| 33 | 39 | } |
src/app/modules/opcion-pedido/opcion-pedido.component.html
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | </div> |
| 17 | 17 | </div> |
| 18 | 18 | <div class="row mt-5 h-auto justify-content-center mx-0"> |
| 19 | - <div class="col-auto px-0 h-auto align-self-start"> | |
| 19 | + <div class="col-auto px-0 h-auto align-self-start reduce-card-1"> | |
| 20 | 20 | <div |
| 21 | 21 | class="btn-effect col-auto align-self-center px-0 bg-white" |
| 22 | 22 | (click)="goTo('/seleccion-articulos'); seleccionPedido('comer aca')"> |
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | </div> |
| 44 | 44 | </div> |
| 45 | 45 | <div class="row mt-4 h-auto justify-content-center mx-0"> |
| 46 | - <div class="col-auto px-0 h-auto align-self-start"> | |
| 46 | + <div class="col-auto px-0 h-auto align-self-start reduce-card-2"> | |
| 47 | 47 | <div |
| 48 | 48 | class="btn-effect col-auto align-self-center px-0 bg-white" |
| 49 | 49 | (click)="goTo('/seleccion-articulos'); seleccionPedido('para llevar')"> |
src/app/modules/opcion-pedido/opcion-pedido.component.scss
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +.reduce-card-1.media-pantalla { | |
| 2 | + position: absolute; | |
| 3 | + bottom: 150px; | |
| 4 | + -webkit-box-flex: 0; | |
| 5 | + flex: 0 0 41.6666666667%; | |
| 6 | + max-width: 41.6666666667%; | |
| 7 | + left: 10%; | |
| 8 | + margin-left: 0 !important; | |
| 9 | +} | |
| 10 | + | |
| 11 | +.reduce-card-2.media-pantalla { | |
| 12 | + position: absolute; | |
| 13 | + bottom: 150px; | |
| 14 | + -webkit-box-flex: 0; | |
| 15 | + flex: 0 0 41.6666666667%; | |
| 16 | + max-width: 41.6666666667%; | |
| 17 | + right: 10%; | |
| 18 | + margin-right: 0 !important; | |
| 19 | +} |
src/app/modules/opcion-pedido/opcion-pedido.component.ts
| ... | ... | @@ -13,6 +13,7 @@ export class OpcionPedidoComponent implements OnInit { |
| 13 | 13 | ) { } |
| 14 | 14 | |
| 15 | 15 | ngOnInit() { |
| 16 | + this.reducirPantalla(); | |
| 16 | 17 | } |
| 17 | 18 | |
| 18 | 19 | goTo(path) { |
| ... | ... | @@ -22,4 +23,10 @@ export class OpcionPedidoComponent implements OnInit { |
| 22 | 23 | seleccionPedido(lugar) { |
| 23 | 24 | localStorage.setItem('pedidoPara', lugar); |
| 24 | 25 | } |
| 26 | + | |
| 27 | + reducirPantalla() { | |
| 28 | + if ($('body').hasClass('media-pantalla')) { | |
| 29 | + $('.reduce-card-1,.reduce-card-2').addClass('media-pantalla'); | |
| 30 | + } | |
| 31 | + } | |
| 25 | 32 | } |
src/app/modules/pago-tarjeta/pago-tarjeta.component.html
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | src="assets/img/logo-spot.svg"> |
| 10 | 10 | </div> |
| 11 | 11 | </div> |
| 12 | - <div class="h-85"> | |
| 12 | + <div class="h-85 pago-tarjeta"> | |
| 13 | 13 | <div class="row h-50 mx-0 justify-content-center text-center"> |
| 14 | 14 | <div class="col-7 p-5 h-auto align-self-end border border-secondary rounded"> |
| 15 | 15 | <img |
src/app/modules/pago-tarjeta/pago-tarjeta.component.scss
src/app/modules/pago-tarjeta/pago-tarjeta.component.ts
| ... | ... | @@ -27,6 +27,12 @@ export class PagoTarjetaComponent implements OnInit { |
| 27 | 27 | this.articuloService.idComanda = res.data; |
| 28 | 28 | this.router.navigate(['mensaje-final']); |
| 29 | 29 | }, err => console.error(err)); |
| 30 | + this.mediaPantalla(); | |
| 30 | 31 | } |
| 31 | 32 | |
| 33 | + mediaPantalla() { | |
| 34 | + if ($('body').hasClass('media-pantalla')) { | |
| 35 | + $('.pago-tarjeta').addClass('media-pantalla'); | |
| 36 | + } | |
| 37 | + } | |
| 32 | 38 | } |
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
| ... | ... | @@ -12,14 +12,14 @@ |
| 12 | 12 | </div> |
| 13 | 13 | </div> |
| 14 | 14 | <!-- CUERPO --> |
| 15 | - <div class="row w-100 mr-4 h-50 h-md-70"> | |
| 15 | + <div class="row w-100 mr-4 h-50 h-md-70" id="content"> | |
| 16 | 16 | <div class="col-12 h-100 px-0 py-3"> |
| 17 | 17 | <div class="row mx-0 h-100"> |
| 18 | 18 | <!-- FILTRO CATEGORIAS --> |
| 19 | 19 | <div class="col-5 col-sm-3 col-xl-2 h-100"> |
| 20 | 20 | <p class="h6 h-6 m-0 text-center"><small>CATEGORรAS</small></p> |
| 21 | 21 | <div class="row mx-0 h-94 justify-content-center align-items-center"> |
| 22 | - <div class="col-auto btn-effect h-5"> | |
| 22 | + <div class="col-auto btn-effect h-5 cat-btn"> | |
| 23 | 23 | <img |
| 24 | 24 | draggable="false" |
| 25 | 25 | ondragstart="return false;" |
| ... | ... | @@ -33,11 +33,13 @@ |
| 33 | 33 | <!-- CATEGORIAS --> |
| 34 | 34 | <div |
| 35 | 35 | #templateCategorias |
| 36 | - class="col-12 px-0 box-categorias border border-primary border-left-0 rounded-right scroll-y" | |
| 36 | + class="col-12 px-0 box-categorias border border-primary | |
| 37 | + border-left-0 rounded-right scroll-y cat-box" | |
| 37 | 38 | (scroll)="scrollEvent($event)"> |
| 38 | 39 | <div |
| 39 | - class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab" | |
| 40 | - [ngClass]="{ 'active': allActive, 'border-bottom-effect': !allActive }" | |
| 40 | + class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" | |
| 41 | + [ngClass]="{ 'active': allActive, 'border-bottom-effect': !allActive, | |
| 42 | + 'media-pantalla' : boxCarrito.classList.contains('media-pantalla') }" | |
| 41 | 43 | (click)="selectCategoria(-1, 0)"> |
| 42 | 44 | <img |
| 43 | 45 | draggable="false" |
| ... | ... | @@ -48,21 +50,23 @@ |
| 48 | 50 | <small class="col-12 px-0 my-1 h-100 h-md-25 align-self-end text-center text-truncate">Todos</small> |
| 49 | 51 | </div> |
| 50 | 52 | <div |
| 51 | - class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab" | |
| 52 | - [ngClass]="{ 'active': categoria.selected, 'border-bottom-effect': !categoria.selected }" | |
| 53 | + class="row mx-4 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" | |
| 54 | + [ngClass]="{ 'active': categoria.selected, 'border-bottom-effect': !categoria.selected, | |
| 55 | + 'media-pantalla' : boxCarrito.classList.contains('media-pantalla') }" | |
| 53 | 56 | (click)="selectCategoria(i, categoria.id)" |
| 54 | 57 | *ngFor="let categoria of categorias; let i = index;"> |
| 55 | 58 | <img |
| 56 | 59 | draggable="false" |
| 57 | 60 | ondragstart="return false;" |
| 58 | 61 | (contextmenu)="false" |
| 59 | - class="col-12 h-50 align-self-end d-none d-sm-block rounded-circle" | |
| 62 | + class="col-12 h-50 align-self-end d-none d-sm-block rounded-circle img-categoria" | |
| 63 | + [ngClass]="{'media-pantalla' : boxCarrito.classList.contains('media-pantalla')}" | |
| 60 | 64 | src="{{urlImagenes}}{{categoria.path_imagen}}" |
| 61 | 65 | onerror="this.src='assets/img/image-not-found.jpg'"> |
| 62 | 66 | <small class="col-12 px-0 my-1 h-100 h-md-25 align-self-end text-center text-truncate">{{categoria.detalle}}</small> |
| 63 | 67 | </div> |
| 64 | 68 | </div> |
| 65 | - <div class="col-auto btn-effect h-5"> | |
| 69 | + <div class="col-auto btn-effect h-5 cat-btn"> | |
| 66 | 70 | <img |
| 67 | 71 | draggable="false" |
| 68 | 72 | ondragstart="return false;" |
| ... | ... | @@ -142,7 +146,9 @@ |
| 142 | 146 | </div> |
| 143 | 147 | <!-- FOOTER CARRITO DE COMPRAS --> |
| 144 | 148 | <div class="row w-90 mx-auto h-auto justify-content-center"> |
| 145 | - <div class="col-12 h-75 px-0 border border-primary rounded"> | |
| 149 | + <div class="h-75 px-0 border border-primary rounded" #boxCarrito | |
| 150 | + [ngClass]="boxCarrito.classList.contains('media-pantalla') | |
| 151 | + ? 'col-8' : 'col-12'" id="boxCarrito"> | |
| 146 | 152 | <!-- CABECERA --> |
| 147 | 153 | <div class="row mx-0 h-15 border-bottom border-primary"> |
| 148 | 154 | <p class="col align-self-center text-truncate"><small>ARTรCULOS EN Tร CARRITO DE COMPRAS</small></p> |
| ... | ... | @@ -222,7 +228,8 @@ |
| 222 | 228 | <!-- VER CARRITO --> |
| 223 | 229 | <div |
| 224 | 230 | class="col-auto px-0 mt-2 h-20" |
| 225 | - *ngIf="articuloService.carrito.length"> | |
| 231 | + *ngIf="articuloService.carrito.length" | |
| 232 | + [ngClass]="{'ml-auto pb-3' : boxCarrito.classList.contains('media-pantalla')}"> | |
| 226 | 233 | <div |
| 227 | 234 | class="btn-effect col-auto px-0 align-self-center bg-white" |
| 228 | 235 | [routerLink]="['/carrito']"> |
src/app/modules/seleccion-articulos/seleccion-articulos.component.scss
| ... | ... | @@ -38,3 +38,24 @@ $primary: #aa006b; |
| 38 | 38 | .line-height-sm { |
| 39 | 39 | line-height: 1.2; |
| 40 | 40 | } |
| 41 | + | |
| 42 | +#content.media-pantalla,#boxCarrito.media-pantalla { | |
| 43 | + max-height: 60% !important; | |
| 44 | +} | |
| 45 | + | |
| 46 | +.cat-content.media-pantalla { | |
| 47 | + margin: 0.5rem 0.7rem !important; | |
| 48 | + height: 76% !important; | |
| 49 | +} | |
| 50 | + | |
| 51 | +.cat-box.media-pantalla{ | |
| 52 | + height: calc(100% - 85px) !important; | |
| 53 | +} | |
| 54 | + | |
| 55 | +.cat-btn.media-pantalla { | |
| 56 | + height: 7% !important; | |
| 57 | +} | |
| 58 | + | |
| 59 | +.img-categoria.media-pantalla{ | |
| 60 | + min-height: 40px !important; | |
| 61 | +} | |
| 41 | 62 | \ No newline at end of file |
src/app/modules/seleccion-articulos/seleccion-articulos.component.ts
| ... | ... | @@ -39,6 +39,7 @@ export class SeleccionArticulosComponent implements OnInit, OnDestroy { |
| 39 | 39 | |
| 40 | 40 | ngOnInit() { |
| 41 | 41 | this.getCategorias(); |
| 42 | + this.mediaPantalla(); | |
| 42 | 43 | } |
| 43 | 44 | |
| 44 | 45 | ngOnDestroy() { |
| ... | ... | @@ -187,4 +188,10 @@ export class SeleccionArticulosComponent implements OnInit, OnDestroy { |
| 187 | 188 | el.scroll({ behavior: 'smooth', left: value + el.scrollLeft }); |
| 188 | 189 | }, 500); |
| 189 | 190 | } |
| 191 | + | |
| 192 | + mediaPantalla() { | |
| 193 | + if ($('body').hasClass('media-pantalla')) { | |
| 194 | + $('.cat-content,#content,.cat-btn,#boxCarrito,.cat-box,.img-categoria').addClass('media-pantalla').addBack('media-pantalla'); | |
| 195 | + } | |
| 196 | + } | |
| 190 | 197 | } |
src/app/modules/splash-screen/splash-screen.component.ts
| 1 | -import { Component, OnInit } from '@angular/core'; | |
| 1 | +import { Component, OnInit } from "@angular/core"; | |
| 2 | 2 | |
| 3 | 3 | @Component({ |
| 4 | - selector: 'app-splash-screen', | |
| 5 | - templateUrl: './splash-screen.component.html', | |
| 6 | - styleUrls: ['./splash-screen.component.scss'] | |
| 4 | + selector: "app-splash-screen", | |
| 5 | + templateUrl: "./splash-screen.component.html", | |
| 6 | + styleUrls: ["./splash-screen.component.scss"] | |
| 7 | 7 | }) |
| 8 | 8 | export class SplashScreenComponent implements OnInit { |
| 9 | 9 | timerSplashScreen = 2000; |
| 10 | 10 | showSplashScreen = true; |
| 11 | - textWelcome = 'BIENVENIDO A SPOT!'; | |
| 12 | - textComoEstas = 'ยฟcรณmo estรกs?'; | |
| 13 | - textInvitamos = 'TE INVITAMOS A HACER'; | |
| 14 | - textTuPedido = 'tu pedido acรก'; | |
| 11 | + textWelcome = "BIENVENIDO A SPOT!"; | |
| 12 | + textComoEstas = "ยฟcรณmo estรกs?"; | |
| 13 | + textInvitamos = "TE INVITAMOS A HACER"; | |
| 14 | + textTuPedido = "tu pedido acรก"; | |
| 15 | 15 | |
| 16 | - constructor() { } | |
| 16 | + constructor() {} | |
| 17 | 17 | |
| 18 | 18 | ngOnInit() { |
| 19 | 19 | localStorage.clear(); |
| 20 | 20 | setTimeout(() => { |
| 21 | 21 | this.showSplashScreen = false; |
| 22 | 22 | }, this.timerSplashScreen); |
| 23 | + $('body').removeClass('media-pantalla'); | |
| 23 | 24 | } |
| 24 | - | |
| 25 | 25 | } |
src/app/shared/footer/footer.component.html
| 1 | 1 | <div class="row w-90 mx-auto h-100 justify-content-between bg-white"> |
| 2 | 2 | <div class="col-auto align-self-center px-0 bg-white"> |
| 3 | - <div class="btn-effect row mx-0 bg-light"> | |
| 4 | - <div class="col-auto align-self-center text-primary">ESTAMOS PARA AYUDARTE</div> | |
| 3 | + <div class="btn-effect row mx-0 bg-light" (click)="reducirPantalla()"> | |
| 4 | + <div class="col-auto align-self-center text-primary">REDUCIR PANTALLA</div> | |
| 5 | 5 | <div class="col-auto p-0 bg-primary d-none d-sm-block"> |
| 6 | 6 | <img |
| 7 | 7 | draggable="false" |
src/app/shared/footer/footer.component.ts
| ... | ... | @@ -14,4 +14,8 @@ export class FooterComponent implements OnInit { |
| 14 | 14 | goBack() { |
| 15 | 15 | this.location.back(); |
| 16 | 16 | } |
| 17 | + | |
| 18 | + reducirPantalla() { | |
| 19 | + $('body,.reduce-card-1,.reduce-card-2,#content,.cat-content,.cat-btn,.cat-box,#boxCarrito,#headerPublicidad,#headerPad,.img-categoria,.carrito-articulo,.carrito-content,.pago-tarjeta,.modal-promo').toggleClass('media-pantalla'); | |
| 20 | + } | |
| 17 | 21 | } |
src/app/shared/header-publicidad/header-publicidad.component.html
src/app/shared/header-publicidad/header-publicidad.component.scss
src/app/shared/header-publicidad/header-publicidad.component.ts
| ... | ... | @@ -26,6 +26,7 @@ export class HeaderPublicidadComponent implements OnInit { |
| 26 | 26 | |
| 27 | 27 | ngOnInit() { |
| 28 | 28 | this.getPublicidades(); |
| 29 | + this.mediaPantalla(); | |
| 29 | 30 | } |
| 30 | 31 | |
| 31 | 32 | getPublicidades() { |
| ... | ... | @@ -81,4 +82,9 @@ export class HeaderPublicidadComponent implements OnInit { |
| 81 | 82 | }); |
| 82 | 83 | } |
| 83 | 84 | |
| 85 | + mediaPantalla() { | |
| 86 | + if ($('body').hasClass('media-pantalla')) { | |
| 87 | + $('#headerPublicidad,#headerPad').addClass('media-pantalla'); | |
| 88 | + } | |
| 89 | + } | |
| 84 | 90 | } |
src/app/shared/promocion/promocion.component.ts
| ... | ... | @@ -34,6 +34,7 @@ export class PromocionComponent implements OnInit { |
| 34 | 34 | this.articulosPromo[0] = res; |
| 35 | 35 | this.getPromociones(); |
| 36 | 36 | }, err => console.error(err)); |
| 37 | + this.mediaPantalla(); | |
| 37 | 38 | } |
| 38 | 39 | |
| 39 | 40 | elegirPromo(promo: IArticulo) { |
| ... | ... | @@ -57,4 +58,9 @@ export class PromocionComponent implements OnInit { |
| 57 | 58 | this.inactiveScreen.startTimeOutInactividad(); |
| 58 | 59 | } |
| 59 | 60 | |
| 61 | + mediaPantalla() { | |
| 62 | + if($('body').hasClass('media-pantalla')) { | |
| 63 | + $('.modal-content').addClass('media-pantalla'); | |
| 64 | + } | |
| 65 | + } | |
| 60 | 66 | } |
src/etc/AppSettings.ejemplo.ts
src/styles.scss
| ... | ... | @@ -73,3 +73,15 @@ p { |
| 73 | 73 | .rotate-180-neg { |
| 74 | 74 | transform: rotate(-180deg); |
| 75 | 75 | } |
| 76 | + | |
| 77 | +body.media-pantalla { | |
| 78 | + height: 50% !important; | |
| 79 | + position: absolute; | |
| 80 | + bottom: 0; | |
| 81 | + width: 100%; | |
| 82 | +} | |
| 83 | + | |
| 84 | +.modal-content.media-pantalla { | |
| 85 | + margin-top: auto !important; | |
| 86 | + margin-bottom: 50px !important; | |
| 87 | +} |