feat: adiciona campo de busca

This commit is contained in:
Cainã Milech 2022-12-05 21:02:43 -03:00
parent a30ccf1901
commit e49c9650b7
20 changed files with 661 additions and 3 deletions

View File

@ -25,6 +25,6 @@
</select>
<input type="hidden" id="ftIdxa28507c5599f4430a7cabd23249f99c3" value="" />
<input id="ftBoxa28507c5599f4430a7cabd23249f99c3" class="fulltext-search-box ui-autocomplete-input" type="text" size="20"
accesskey="b" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true" value="Digite aqui" />
accesskey="b" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true" value="OLÁ, O QUE DESEJA ENCONTRAR?" />
<input id="ftBtna28507c5599f4430a7cabd23249f99c3" type="button" value="Buscar" class="btn-buscar" />
</fieldset>

26
meta/pages/category.js Normal file
View File

@ -0,0 +1,26 @@
module.exports = {
contentPlaceHolders: [
{
// Registra o contentPlaceholder
id: "htmlSeo",
objects: [
// Registra os objetos vtex
{
type: "html",
name: "Html SEO",
contents: [
{
name: "metaTag",
active: true,
content: `<meta name='language' content='pt-Br'>`,
},
],
},
],
},
],
// Ainda não implementado
//Trocar pelo que for cadastrado na vtex
searchResultLayoutID: "46b0e7f2-15ee-4789-a75e-280e389d2b8f",
};

View File

@ -0,0 +1,37 @@
module.exports = {
contentPlaceHolders: [
{
id: "banners-menu",
objects: [
{
type: "banner",
name: "menu camisa",
contents: [
{
name: "banner principal mobile content",
active: true,
type: "image",
file: "slide-principal-mobile.png",
width: 500,
height: 500,
},
],
},
{
type: "banner",
name: "menu bolsa",
contents: [
{
name: "banner principal mobile 2 content",
active: true,
type: "image",
file: "slide-principal-mobile.png",
width: 500,
height: 500,
},
],
},
],
},
],
};

View File

@ -0,0 +1,42 @@
module.exports = {
contentPlaceHolders: [
{
// Registra o contentPlaceholder
id: "htmlSeo",
objects: [
// Registra os objetos vtex
{
type: "html",
name: "Html SEO",
contents: [],
},
],
},
{
id: "texto-institucional",
objects: [
{
type: "html",
name: "Conteudo institucional",
contents: [
{
name: "Potilica de privacidade",
active: true,
content: `
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce feugiat lacus sapien, nec interdum ante sodales id. Vivamus eu mauris vel nibh pharetra aliquet. Donec nisl odio, feugiat sed laoreet non, venenatis in dolor. Nulla eget dolor nec mi congue volutpat. Maecenas non elementum dolor. Nam sollicitudin justo sed magna auctor, at condimentum quam aliquam. Ut luctus posuere quam, nec auctor orci sagittis at. Duis eget nibh sed lorem sollicitudin auctor cursus nec ipsum. In tempus ipsum libero, at ultricies lectus blandit sed. Cras in venenatis turpis. Praesent pellentesque augue nec iaculis mattis. Sed ante magna, vulputate sit amet pulvinar sed, iaculis ac massa. Nulla id turpis in enim aliquam auctor ut nec orci.
Phasellus sit amet commodo lacus, eu dapibus lectus. Maecenas vitae justo lacus. Cras ornare hendrerit dictum. Sed quis iaculis lacus. Nunc egestas ipsum eget risus pulvinar sagittis. Nullam quis porttitor massa, a congue quam. Pellentesque ac mollis est. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer tincidunt, turpis quis pretium vehicula, leo erat lobortis velit, sed finibus nulla nunc sed lorem. Maecenas tellus nisi, tincidunt sed dolor vitae, accumsan euismod nisl. Cras dignissim placerat dapibus. Donec varius, sapien quis hendrerit dictum, lorem urna vestibulum eros, tempor aliquet ligula massa vel dui.
In et rutrum erat. Duis dapibus, ligula eu luctus aliquet, nisi neque dapibus nisl, id laoreet nunc libero vitae augue. Integer vehicula ligula non risus vehicula, in venenatis nulla pulvinar. Nulla convallis elit sit amet massa euismod, quis cursus elit suscipit. Pellentesque semper dui sit amet ex efficitur tristique. Donec vitae porttitor augue, eget viverra ipsum. Sed volutpat, orci non hendrerit tempus, nisi nisl suscipit libero, at ultrices purus elit a massa. Nullam imperdiet blandit nunc, nec scelerisque libero gravida ac. Vestibulum ante velit, sodales blandit vehicula sed, ullamcorper eget dui. Fusce tempus ipsum sed lobortis pharetra. Interdum et malesuada fames ac ante ipsum primis in faucibus.
Aenean at tempus arcu. Donec porta tempor nunc, id sollicitudin lectus egestas eu. Nullam posuere sollicitudin lectus sit amet suscipit. Curabitur quis urna quam. Ut sollicitudin dui sit amet risus rutrum convallis laoreet in tellus. Pellentesque porttitor nec velit a tempus. Cras quam massa, efficitur iaculis iaculis in, varius eget lorem.
Duis ac egestas velit. Vivamus accumsan, metus vitae luctus iaculis, nisi ante mollis ipsum, non commodo augue orci nec dui. Cras dignissim venenatis viverra. Curabitur vitae ex turpis. Nullam pellentesque convallis enim, id accumsan velit laoreet nec. Quisque eget felis in turpis rhoncus maximus. In nec vehicula tortor. Maecenas consequat gravida dapibus.
`,
},
],
},
],
},
],
};

57
meta/pages/product.js Normal file
View File

@ -0,0 +1,57 @@
module.exports = {
contentPlaceHolders: [
{
// Registra o contentPlaceholder
id: "htmlSeo",
objects: [
// Registra os objetos vtex
{
type: "html",
name: "Html SEO",
contents: [],
},
],
},
{
id: "prateleira-padrao",
objects: [
{
type: "Produtos Relacionados",
name: "prateleira",
properties: {
layout: "prateleira-padrao",
type: "QuemViuViuTambem",
"number-of-columns": 12,
"number-of-items": 12,
},
},
],
},
// EXEMPLO DE PRATELEIRA COMUM
// {
// id: "prateleira-padrao",
// objects: [
// {
// type: "colecao",
// name: "prateleira",
// properties: {
// layout: "prateleira-padrao",
// "number-of-columns": 12,
// "number-of-items": 12,
// "show-unavailable": false,
// //sim random está escrito errado e é culpa da vtex
// ramdom: false,
// paged: false,
// },
// contents: [
// {
// name: "praleira",
// active: true,
// clusterId: 158,
// },
// ],
// },
// ],
// },
],
};

View File

@ -4,10 +4,59 @@
&__wrapper {
display: grid;
grid-template-columns: 2fr 1fr 2fr;
align-items: center;
}
&__logo {
display: block;
margin: 0 auto;
}
.user-items {
display: flex;
align-items: center;
justify-content: flex-end;
.busca {
flex: 1; /*utilizar todo espaço empurrando os irmaos...*/
display: flex;
align-items: center;
max-width: 212px; /*...mas no max ate 212*/
margin: 0;
padding: 8px 0;
border-bottom: 1px solid $white-500;
legend,
label,
select {
display: none;
}
.fulltext-search-box {
flex: 1;
height: 23px;
padding: 0;
border: 0;
background: transparent;
outline: 0;
color: $white-500;
font-size: 10px;
line-height: 12px;
}
.btn-buscar {
width: 23px;
height: 23px;
padding: 0;
border: 0;
outline: 0;
font-size: 0;
background-color: transparent;
/*quando ja tem estrutuura, e temos que substituir*/
@extend .sprite;
@extend .sprite-search-icon;
}
}
}
}

View File

@ -1,6 +1,8 @@
// fonts
$font-family: "Roboto", sans-serif;
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");
$font-family: "Inter", sans-serif;
$font-height: 1.5;
// colors

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

View File

@ -7,7 +7,18 @@
<img class="page-header__logo" src="/arquivos/m3-caina-logo.png" alt="Logo M3 Cainã" />
</a>
<div></div>
<div class="user-items">
<vtex.cmc:fullTextSearchBox />
<a href="/account">
<i class="sprite sprite-user-icon"></i>
</a>
<button>
<i class="sprite sprite-bag-icon"></i>
<vtex.cmc:AmountItemsInCart />
</button>
</div>
</div>
</div>
</header>

View File

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br">
<head>
<meta name="page" content="erro" page-id="404" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:template id="template-loads-header" />
</head>
<body >
<vtex:template id="template-header" />
<main class="pagina-erro erro-404">
<div class="col- text-center">
<h1>Página não encontrada.</h1>
<p>A página que vocês está tentando acessar está indisponível.</p>
<a href="/" class="voltar-para-home">voltar</a>
</div>
</main>
<footer >
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<vtex:template id="template-loads-footer" />
</body>
</html>

View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br">
<head>
<meta name="page" content="erro" page-id="500" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:template id="template-loads-header" />
</head>
<body >
<vtex:template id="template-header" />
<main class="pagina-erro erro-500">
<h1>Algo deu errado.</h1>
<p>Sua solicitação não pode ser atendida devido a um erro inesperado.<br/> Tente novamente.</p>
<a href="/" class="voltar-para-home">voltar</a>
</main>
<footer >
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<vtex:template id="template-loads-footer" />
</body>
</html>

View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br">
<head>
<meta name="page" content="erro" page-id="busca-vazia" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:metaTags />
<vtex:template id="template-loads-header" />
</head>
<body >
<vtex:template id="template-header" />
<main class="pagina-erro busca-vazia">
<h1>Sua busca por <span class="search-term">""</span> não gerou nenhum resultado.</h1>
<p>Verifique os termos buscados e tente novamente.</p>
<a href="/" class="voltar-para-home">voltar</a>
</main>
<footer >
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<vtex:template id="template-loads-footer" />
</body>
</html>

View File

@ -0,0 +1,79 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br">
<head>
<meta name="page" content="categoria" page-id="categoria" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:metaTags />
<vtex:contentPlaceHolder id="htmlSeo" />
<title>Template</title>
<vtex:template id="template-loads-header" />
</head>
<body>
<vtex:template id="template-header" />
<vtex:template id="template-menu" />
<main class="categoria">
<section class="site-linha">
<div class="container">
<div class="row">
<div class="breadcrumb col-12">
<vtex.cmc:breadCrumb />
</div>
<div class="col-12 col-md-4 col-lg-3">
<div class="filtros-categoria ">
<div class="topo-filtros">
<h3>
Filtrar busca
</h3>
<button aria-label="Fechar Filtros" id="close-filter-button">
<span></span>
</button>
</div>
<vtex.cmc:searchNavigator />
<button class="clear-filter-btn">
Remover filtros
</button>
<button class="aply-filter-btn">
Aplicar filtros
</button>
</div>
</div>
<div class="col-12 col-md-8 col-lg-9">
<div class="topo-resultado">
<vtex.cmc:searchTitle />
<div class="opcoes-resultado">
<button aria-label="Abrir Filtros" id="open-filter-button">
Filtrar
</button>
</div>
<button class="clear-filter-btn">
Remover filtros
</button>
</div>
<div class="produtos-da-categoria">
<vtex.cmc:searchResult layout="46b0e7f2-15ee-4789-a75e-280e389d2b8f" itemCount="12"
columnCount="12" />
</div>
</div>
</div>
</div>
</section>
</main>
<footer>
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<vtex:template id="template-loads-footer" />
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common" xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br">
<head>
<meta name="page" content="home" page-id="homepage" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<section>
<!-- <div class="produtos-menu">
<vtex:contentPlaceHolder id="produtos-menu" />
</div> -->
<div class="banners-menu">
<vtex:contentPlaceHolder id="banners-menu" />
</div>
</section>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce"
lang="pt-br"
>
<head>
<meta name="page" content="institucional" page-id="institucional" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:metaTags />
<vtex:contentPlaceHolder id="htmlSeo" />
<title>Template</title>
<vtex:template id="template-loads-header" />
</head>
<body>
<vtex:template id="template-header" />
<main class="institucional container">
<div class="row">
<div class="col-12 breadcrumb">
<ul>
<li>
<a href="/">
Home
</a>
</li>
<li>
<span>
Institucional
</span>
</li>
</ul>
</div>
<div class="col-12 navegacao">
<vtex.cmc:navegacaoInstitucional />
</div>
<div class="col-12 conteudo">
<vtex:contentPlaceHolder id="texto-institucional" />
</div>
</div>
</main>
<footer>
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<vtex:template id="template-loads-footer" />
</body>
</html>

View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br">
<head>
<meta name="page" content="login" page-id="login" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:contentPlaceHolder id="htmlSeo" />
<title>Template</title>
<vtex:template id="template-loads-header" />
</head>
<body >
<vtex:template id="template-header" />
<main class="login">
<section id="login-content" class="container">
<vtex.cmc:userLogin/>
</section>
</main>
<footer >
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<vtex:template id="template-loads-footer" />
</body>
</html>

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br">
<head>
<meta name="page" content="minhaConta" page-id="minha-conta" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:contentPlaceHolder id="htmlSeo" />
<title>Template</title>
<vtex:template id="template-loads-header" />
<link rel="stylesheet" href="/arquivos/template--user-pages.css" type="text/css" />
</head>
<body class="minha-conta">
<vtex:template id="template-header" />
<section id="account-content" class="container">
<div class="row">
<div class="col-12">
<h1>Minha Conta</h1>
</div>
<div class="col-12 accountUserProfile">
<vtex.cmc:accountUserProfile />
</div>
</div>
</section><!-- #content -->
<footer>
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<script src="/arquivos/bootstrap.min.js"></script>
<vtex:template id="template-loads-footer" />
</body>
</html>

View File

@ -0,0 +1,103 @@
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce"
lang="pt-br"
>
<head>
<meta name="page" content="produto" page-id="produto-padrao" />
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<vtex:metaTags />
<vtex:contentPlaceHolder id="htmlSeo" />
<title>Template</title>
<vtex:template id="template-loads-header" />
</head>
<body class="produto">
<vtex:template id="template-header" />
<main class="produto">
<section class="container">
<div class="row">
<div class="col-12 breadcrumb">
<vtex.cmc:breadCrumb />
</div>
</div>
<div class="row">
<div class="col-12 col-lg-7">
<div class="product-image">
<vtex.cmc:ProductImage />
</div>
</div>
<div class="col-12 col-lg-5">
<div class="product-info">
<h1 class="nome-produto" itemprop="name">
<vtex.cmc:productName />
</h1>
<div class="product-reference">
<span>REF.: </span>
<vtex.cmc:productReference />
</div>
<div class="moduloPreco"></div>
<div class="moduloAviseMe"></div>
<div class="moduloSkus"></div>
<div class="similares"></div>
<div class="moduloQuantidade"></div>
<div class="moduloBotaoDeCompra"></div>
<div class="compra-segura">
<p>
<span>compra segura</span
><i class="sprite sprite-cadeado"></i>
</p>
</div>
<div class="descricao-produto">
<a
href="#descricao-completa"
title="Descrição do Produto"
>
<i class="sprite sprite-arrow-down-pink"></i>
Descrição do produto
</a>
</div>
</div>
</div>
</div>
</section>
<section class="container">
<div class="row prateleira-de-produtos">
<div class="col-12">
<vtex:contentPlaceHolder id="prateleira-padrao" />
</div>
</div>
</section>
<section class="container">
<div id="descricao-completa" class="row">
<div class="col-12">
<h2>Descrição</h2>
<div class="descricao" itemprop="description">
<vtex.cmc:ProductDescription />
</div>
</div>
</div>
</section>
</main>
<vtex.cmc:dataLayerProduto />
<vtex.cmc:skuJson />
<footer>
<vtex:template id="template-footer-newsletter" />
<vtex:template id="template-footer-links" />
<vtex:template id="template-footer" />
</footer>
<vtex:template id="template-loads-footer" />
</body>
</html>