Falta corporativos, carro de compras y testimonios

This commit is contained in:
2021-01-03 00:22:47 -03:00
parent 57e13ccabb
commit a212e7567e
24 changed files with 729 additions and 151 deletions

View File

@ -65,9 +65,9 @@
<div class="column1 column" id="column">
<section id="seccion1" class="ui simple segment">
<div class="image-container">
<img src="./assets/images/tablet-front.png" />
<img src="./assets/images/tablet-back.png" />
<img src="./assets/images/phone.png" />
<img src="./assets/images/seccion11.png" />
<img src="./assets/images/seccion12.png" />
<img src="./assets/images/seccion13.png" />
</div>
<div class="paragraph">
<div class="header">
@ -79,7 +79,7 @@
<section id="seccion2" class="ui simple segment">
<div class="column1 column">
<img src="./assets/images/phone-pc.png" />
<img src="./assets/images/foto1.jpg" />
</div>
<div class="column2 column">
<div class="row">
@ -94,10 +94,10 @@
</ul>
</div>
<div class="row">
<img src="./assets/images/ventajas1.png" />
<img src="./assets/images/ventajas2.png" />
<img src="./assets/images/ventajas3.png" />
<img src="./assets/images/ventajas4.png" />
<img src="./assets/images/foto2.jpg" />
<img src="./assets/images/foto3.jpg" />
<img src="./assets/images/foto1.jpg" />
<img src="./assets/images/foto2.jpg" />
</div>
</div>
</section>
@ -107,8 +107,19 @@
<span class="bigger">DIMENSIONES</span> y colores
</div>
<div class="images">
<img src="./assets/images/variedades.png" />
<img src="./assets/images/dimensiones.svg" />
<div class="column">
<img src="./assets/images/variedades.png" />
<div>
<img src="./assets/images/bandera.svg" />
DISE&Ntilde;ADO Y FABRICADO EN CHILE
</div>
</div>
<div class="column">
<img src="./assets/images/dimensiones.svg" />
<div>
Fabricado en pl&aacute;stico de origen vegetal sin derivados del petr&oacute;leo
</div>
</div>
</div>
</section>
@ -128,6 +139,7 @@
$ 5.990
</div>
<div class="colores linea">
<input type="hidden" name="color" value="azul" />
<span class="text">COLOR</span>
<div class="white circle"></div>
<div class="black circle"></div>
@ -138,11 +150,15 @@
<div class="red circle"></div>
</div>
<div class="input">
<button class="minus" type="button">-</button><input type="text" name="cantidad" value="0" /><button class="plus" type="button">+</button>
<button class="minus" type="button">
<i class="minus icon"></i>
</button><input type="text" name="cantidad" value="0" /><button class="plus" type="button">
<i class="plus icon"></i>
</button>
</div>
</div>
<div class="column2 column">
<img src="./assets/images/stand.png" />
<img src="./assets/images/azul.png" />
</div>
</div>
<div class="row">
@ -160,37 +176,41 @@
<div class="opciones">
<div class="opcion">
<div class="img-grande">
<img src="./assets/images/logo_abajo.png" />
<img src="./assets/images/foto2.jpg" />
</div>
<div class="descripcion">
<div class="header">
LOGO ABAJO
<div class="content">
<div class="header">
LOGO ABAJO
</div>
<ul>
<li>Siempre visible</li>
<li>Menor tamaño</li>
</ul>
</div>
<ul>
<li>Siempre visible</li>
<li>Menor tamaño</li>
</ul>
<div class="images">
<img src="./assets/images/logo_abajo1.png" />
<img src="./assets/images/logo_abajo2.png" />
<img src="./assets/images/foto3.jpg" />
<img src="./assets/images/foto1.jpg" />
</div>
</div>
</div>
<div class="opcion">
<div class="img-grande">
<img src="./assets/images/logo_arriba.png" />
<img src="./assets/images/foto3.jpg" />
</div>
<div class="descripcion">
<div class="header">
LOGO ARRIBA
<div class="content">
<div class="header">
LOGO ARRIBA
</div>
<ul>
<li>No se ve al apoyar el tel&eacute;fono</li>
<li>Mayor tamaño</li>
</ul>
</div>
<ul>
<li>No se ve al apoyar el tel&eacute;fono</li>
<li>Mayor tamaño</li>
</ul>
<div class="images">
<img src="./assets/images/logo_arriba1.png" />
<img src="./assets/images/logo_arriba2.png" />
<img src="./assets/images/foto1.jpg" />
<img src="./assets/images/foto2.jpg" />
</div>
</div>
</div>
@ -198,11 +218,12 @@
</div>
<div class="column2 column fondo-blanco">
<div class="header">
COTIZA CON NOSOSTROS
COTIZA CON NOSOTROS
</div>
<form class="ui form">
<div class="row">
<div class="colores linea">
<input type="hidden" name="color" value="azul" />
<span class="text">COLOR</span>
<div class="white circle"></div>
<div class="black circle"></div>
@ -213,12 +234,16 @@
<div class="red circle"></div>
</div>
<div class="input cantidad">
<button class="minus" type="button">-</button><input type="text" name="cantidad" value="0" /><button class="plus" type="button">+</button>
<button class="minus" type="button">
<i class="minus icon"></i>
</button><input type="text" name="cantidad" value="0" /><button class="plus" type="button">
<i class="plus icon"></i>
</button>
</div>
</div>
<div class="row">
LOGO
<div class="input">
LOGO
<input type="file" name="archivo" placeholder="Cargar archivo" />
<div class="file">Cargar archivo</div>
</div>
@ -240,10 +265,10 @@
</div>
<div class="row">
<div class="input">
<textarea name="mensaje" placeholder="MENSAJE">
</textarea>
<textarea name="mensaje" placeholder="MENSAJE"></textarea>
</div>
</div>
<button class="ui button" type="submit">COTIZAR</button>
</form>
</div>
</section>
@ -318,5 +343,6 @@
<!-- Scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.js" integrity="sha512-1Nyd5H4Aad+OyvVfUOkO/jWPCrEvYIsQENdnVXt1+Jjc4NoJw28nyRdrpOCyFH4uvR3JmH/5WmfX1MJk2ZlhgQ==" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://smtpjs.com/v3/smtp.js"></script>
<script type="text/javascript" src="./assets/scripts/main.min.js"></script>
</body>

View File

@ -8,6 +8,214 @@ function resize() {
})
}
class Amount {
constructor(elem) {
this.elem = elem
this.minus = elem.parent().find('.minus')
this.plus = elem.parent().find('.plus')
this.n = 0
this.setup()
this.max = 999
}
setup() {
this.elem.val(0)
this.plus.click((e) => {
this.increment()
this.print()
})
this.minus.click((e) => {
this.decrement()
this.print()
})
this.elem.change((e) => {
this.n = parseInt(this.elem.val())
this.print()
})
this.print()
}
enable_button(name) {
this[name].removeClass('disabled')
if (name == 'plus') {
this[name].html('<i class="plus icon"></i>')
}
if (name == 'minus') {
this[name].html('<i class="minus icon"></i>')
}
}
disable_button(name) {
this[name].addClass('disabled')
this[name].html('')
}
check_limits() {
this.enable_button('plus')
this.enable_button('minus')
if (this.n > this.max) {
this.n = this.max
}
if (this.n == this.max) {
this.disable_button('plus')
}
if (this.n < 0) {
this.n = 0
}
if (this.n == 0) {
this.disable_button('minus')
}
}
increment() {
this.n += 1
}
decrement() {
this.n -= 1
}
get value() {
return this.n
}
print() {
this.check_limits()
this.elem.val(this.n)
}
}
class Colors {
constructor(elem, changing = false) {
this.color = {
white: 'blanco',
black: 'negro',
blue: 'azul',
green: 'verde',
yellow: 'amarillo',
orange: 'naranjo',
red: 'rojo'
}
this.picked = 'blue'
this.elem = elem
this.input = elem.find('input[name="color"]')
this.changing = null
if (changing) {
this.changing = elem.parent().parent().find('.column2 img')
}
this.setup()
}
setup() {
this.elem.find('.circle').each((i, el) => {
$(el).click((e) => {
let color = $(el).attr('class').split(' ')[0]
this.change_color(color)
})
})
this.change_color('blue')
}
default_color_format(el) {
$(el).removeClass('selected')
}
change_color(color) {
this.picked = this.color[color]
this.input.val(this.picked)
this.elem.find('.circle').each((i, el) => {
this.default_color_format(el)
})
this.elem.find('.' + color + '.circle').addClass('selected')
if (this.changing != null) {
this.changing.attr('src', './assets/images/' + this.picked + '.png')
}
}
}
let smtp = {
Host: 'smtp.google.com',
Username: 'rsalinas85@gmail.com',
Password: 'salinas1234',
From: 'ventas@3dstand.cl'
}
let sticky_form = {
elem: $('.sticky form'),
setup: function() {
this.elem.submit((e) => {
e.preventDefault()
this.submit()
return false
})
},
submit: function() {
console.debug('submit sticky')
}
}
let cotiza_form = {
elem: $('#corporativos form'),
setup: function() {
this.elem.submit((e) => {
e.preventDefault()
this.submit()
return false
})
this.file = this.elem.find('input[type="file"]')
this.elem.find('.file').click((e) => {
this.file.trigger('click')
})
},
submit: function() {
let email = this.elem.find('[name="email"]').val()
let data = new FormData(this.elem[0])
let body = [
'Nombre: ' + this.elem.find('[name="nombre"]').val(),
'E-mail: ' + email,
'Teléfono: ' + this.elem.find('[name="telefono"]').val(),
'',
'Color: ' + this.elem.find('[name="color"]').val(),
'Cantidad: ' + this.elem.find('[name="cantidad"]').val(),
this.elem.find('[name="mensaje"]').val()
]
let content = {
Host: smtp.Host,
Username: smtp.Username,
Password: smtp.Password,
To: email,
From: smtp.From,
Subject: 'Cotizacion - ' + (new Date()).toLocaleString('es-CL', {timezone: "UTC-3"}),
Body: body.join('<br />'),
Attachments: [
{
name: "Logo",
data: data.get('archivo')
}
]
}
console.debug(email)
//Email.send()
}
}
let conversemos_form = {
elem: $('#contacto'),
setup: function() {
this.elem.submit((e) => {
e.preventDefault()
this.submit()
return false
})
},
submit: function() {
let email = this.elem.find('[name="email"]').val()
let body = [
'Nombre: ' + this.elem.find('[name="nombre"]').val(),
'E-mail: ' + email,
'',
this.elem.find('[name="mensaje"]').val()
]
let content = {
Host: smtp.Host,
Username: smtp.Username,
Password: smtp.Password,
From: smtp.From,
To: email,
Subject: 'Contacto ' + (new Date()).toLocaleString('es-CL', {timezone: "UTC-3"}),
Body: body.join('<br />')
}
}
}
$(document).ready(function() {
$('.menu.sticky').sticky()
$('.column2 .sticky').sticky({
@ -16,5 +224,13 @@ $(document).ready(function() {
$('.shopping.cart').innerText = 0
//window.onresize = resize;
window.onresize = resize;
let sticky_amount = new Amount($('.sticky .input input[name="cantidad"]'))
let sticky_color = new Colors($('.sticky .colores'), true)
sticky_form.setup()
let cotiza_amount = new Amount($('#corporativos .input input[name="cantidad"]'))
let cotiza_color = new Colors($('#corporativos .colores'))
cotiza_form.setup()
conversemos_form.setup()
})

View File

@ -15,9 +15,52 @@ $html-font-size: 16px;
$gris: rgb(204, 204, 204);
$gris-texto: rgb(51, 51, 51);
body {
font-family: Roboto, sans;
color: $gris-texto;
@mixin colors {
.colores {
vertical-align: center;
.text {
margin-right: rem(3);
}
.white {
border: thin solid rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
}
.black {
background-color: rgb(0, 0, 0);
}
.blue {
background-color: rgb(0, 0, 255);
}
.green {
background-color: rgb(0, 255, 0);
}
.yellow {
background-color: rgb(255, 255, 0);
}
.orange {
background-color: rgb(255, 130, 0);
}
.red {
background-color: rgb(255, 0, 0);
}
.circle {
display: inline-block;
$a: 12;
width: rem($a);
height: rem($a);
border-radius: 8000px;
margin: auto rem(1);
cursor: pointer;
&.selected {
width: rem($a + 2);
height: rem($a + 2);
cursor: default;
}
}
}
}
$full_width: 1080;
@ -28,7 +71,7 @@ $heights: (
"seccion2": 27.5,
"dimensiones": 27.5,
"construido": 21.875,
"corporativos": 25,
"corporativos": (520/16),
"felices": 21.875,
"formulario": 30
);
@ -110,6 +153,12 @@ $column_height1: 0;
}
}
body {
height: ($content_height)+rem;
font-family: Roboto, sans;
color: $gris-texto;
}
#content {
max-width: rem($full_width) !important;
height: ($content_height)+rem;
@ -286,10 +335,18 @@ $column_height1: 0;
.images {
display: flex;
img {
.column {
float: left;
width: rem(313);
height: rem(235);
&>img {
width: rem(313);
height: rem(235);
}
div {
width: rem(313);
margin-top: rem(25);
}
}
}
}
@ -340,45 +397,7 @@ $column_height1: 0;
}
font-size: font_size(14);
.colores {
vertical-align: center;
.text {
margin-right: rem(3);
}
.white {
border: thin solid rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
}
.black {
background-color: rgb(0, 0, 0);
}
.blue {
background-color: rgb(0, 0, 255);
}
.green {
background-color: rgb(0, 255, 0);
}
.yellow {
background-color: rgb(255, 255, 0);
}
.orange {
background-color: rgb(255, 130, 0);
}
.red {
background-color: rgb(255, 0, 0);
}
.circle {
display: inline-block;
$a: 12;
width: rem($a);
height: rem($a);
border-radius: 8000px;
margin: auto rem(1);
cursor: pointer;
}
}
@include colors;
.input {
width: 4.5rem;
border: thin solid rgb(0, 0, 0);
@ -393,6 +412,7 @@ $column_height1: 0;
margin: 0;
padding: 0;
cursor: pointer;
font-weight: bold;
}
input {
width: 2rem;
@ -443,9 +463,10 @@ $column_height1: 0;
width: percentage(67/100);
&>.header {
padding: rem(37) 0 !important;
margin-top: rem(67);
margin-bottom: rem(37);
.bigger {
font-size: font_size(16);
font-size: rem(26);
}
}
.opciones {
@ -465,12 +486,23 @@ $column_height1: 0;
}
.descripcion {
display: inline-block;
vertical-align: top;
height: rem(200);
padding-top: rem(20);
ul {
list-style: disc inside;
.content {
display: block;
.header {
font-size: font_size(14);
margin-bottom: rem(10);
}
ul {
list-style: disc inside;
}
}
.images {
margin-top: rem(34);
img {
width: rem(70);
height: rem(85);
@ -484,45 +516,20 @@ $column_height1: 0;
width: percentage(33/100);
height: 100%;
.header {
margin-top: rem(46);
margin-bottom: rem(24);
font-size: rem(26);
}
form {
.colores {
vertical-align: center;
@include colors;
.text {
margin-right: rem(3);
}
.white {
border: thin solid rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
}
.black {
background-color: rgb(0, 0, 0);
}
.blue {
background-color: rgb(0, 0, 255);
}
.green {
background-color: rgb(0, 255, 0);
}
.yellow {
background-color: rgb(255, 255, 0);
}
.orange {
background-color: rgb(255, 130, 0);
}
.red {
background-color: rgb(255, 0, 0);
}
.circle {
display: inline-block;
$a: 12;
width: rem($a);
height: rem($a);
border-radius: 8000px;
margin: auto rem(1);
cursor: pointer;
}
.row {
margin-bottom: rem(9);
}
.colores.linea {
margin-bottom: rem(25-9);
}
.input.cantidad {
width: 4.5rem;
@ -551,9 +558,35 @@ $column_height1: 0;
.input [type="file"] {
display: none;
}
.input .file {
display: inline-block;
height: rem(20*12/10);
width: rem(150);
padding-top: rem(3);
background-color: #cccccb;
border: thin solid #333;
font-size: font_size(10);
text-align: center;
cursor: pointer;
}
.input [type="text"] {
height: rem(18);
background-color: rgba(255, 255, 255, .5);
background-color: rgba(255, 255, 255);
border: none !important;
border-radius: 0 !important;
}
textarea {
height: rem(72);
background-color: rgba(255, 255, 255);
border: none !important;
border-radius: 0 !important;
margin-bottom: rem(25-9);
}
.button {
width: 100%;
background-color: #666667;
color: white;
border: none !important;
border-radius: 0 !important;
}
}
@ -629,8 +662,8 @@ $column_height1: 0;
margin-top: rem(27);
&>img {
width: rem(434);
height: rem(280);
width: rem(540);
height: rem(350);
float: left;
}
}