Correção função postos de venda
Foi feita a correção e adicionado css
This commit is contained in:
parent
e8e3becf42
commit
c8cf84d086
231
configuracoesleitor.css
Normal file
231
configuracoesleitor.css
Normal file
@ -0,0 +1,231 @@
|
||||
main {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#papel {
|
||||
padding: 18px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 5px;
|
||||
margin-top: 45px;
|
||||
}
|
||||
|
||||
.page-navigation {
|
||||
margin-bottom: 30px; /** Evita que o container .referencias_capitulo atrapalhe o .page-navigation **/
|
||||
}
|
||||
|
||||
object pre {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.referencias_capitulo {
|
||||
width: 266px;
|
||||
display: flex;
|
||||
font-size: 15px;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 35px;
|
||||
background-color: #f8f9fa;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
color: #444;
|
||||
box-shadow: 0 1px 3px #ababab;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
border-radius: 5px 5px 0 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-width: 1px 1px 0 1px;
|
||||
border-style: solid;
|
||||
border-color: #dedfe0;
|
||||
}
|
||||
|
||||
.referencias_capitulo span {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.referencias_capitulo input {
|
||||
border: 1px solid #dedede;
|
||||
height: 25px;
|
||||
width: 103px;
|
||||
border-radius: 5px;
|
||||
margin-right: 4px;
|
||||
font-size: 12px;
|
||||
color:#999;
|
||||
background-size: 15px 15px;
|
||||
|
||||
}
|
||||
|
||||
.referencias_capitulo input::placeholder {
|
||||
color: #999;
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.referencias_capitulo .cont_ref {
|
||||
width: 160px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pegarLink {
|
||||
border: none;
|
||||
font-size: 11px;
|
||||
height: 30px;
|
||||
background-color: #e4e4e4;
|
||||
border-radius: 3px;
|
||||
margin-left: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pegarLink span {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.pegarLink span img {
|
||||
height: 18px;
|
||||
width: auto;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
|
||||
.pegarLink:hover {
|
||||
background-color: #ddedfd;
|
||||
}
|
||||
|
||||
/* Estilo da janela modal */
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
min-width: 260px;
|
||||
max-width: 400px;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.modal-content p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.modal-content div {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#qrcode_container {
|
||||
margin: 13px auto 5px auto;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0 15px;
|
||||
cursor: pointer;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.close:hover {
|
||||
background-color: #d15e5e;
|
||||
}
|
||||
|
||||
#moan-menu-texto {
|
||||
position:absolute;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#moan-menu-texto img {
|
||||
width: 16px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#moan-menu-texto button {
|
||||
background: #fff; /* Cor de fundo dos botões */
|
||||
border: 1px solid #ccc; /* Borda dos botões */
|
||||
border-radius: 5px; /* Bordas arredondadas */
|
||||
padding: 4px 9px; /* Espaçamento interno */
|
||||
margin: 3px; /* Espaçamento externo entre os botões */
|
||||
cursor: pointer; /* Cursor do mouse em forma de mão */
|
||||
}
|
||||
|
||||
#moan-menu-texto button:hover {
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Sombra ao passar o mouse sobre o botão */
|
||||
|
||||
}
|
||||
|
||||
.luz_apagada {
|
||||
background-color: #444 !important;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
h3, h4 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
h5, h6 {
|
||||
font-size: 1.02em;
|
||||
}
|
||||
|
||||
.callout.callout-style-default>div.callout-header {
|
||||
font-size: 0.88em;
|
||||
}
|
||||
|
||||
.callout.callout-style-default .callout-body {
|
||||
font-size: 0.88em;
|
||||
}
|
||||
|
||||
.versao-impressa-compre {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.versao-impressa-compre h2 {
|
||||
border: none;
|
||||
color: #a0a5a7;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.versao-impressa-compre ul {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 767px) {
|
||||
#quarto-content {
|
||||
|
||||
display: block !important; /*Isso é importante para usar toda a largura em telas pequenas*/
|
||||
|
||||
}
|
||||
|
||||
#moan-menu-texto {
|
||||
top: -34px
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
#moan-menu-texto {
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
#papel{
|
||||
margin-top: 90px;
|
||||
}
|
||||
}
|
@ -1089,11 +1089,15 @@ document.querySelector(".close").addEventListener("click", function() {
|
||||
|
||||
// Colocar as opções de venda (postos-de-venda.json) na sidebar da margin direita
|
||||
// Faça uma requisição HTTP para carregar o arquivo "postos-de-venda.json" da raiz do site
|
||||
fetch("/postos-de-venda.json")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
// Use uma expressão regular para verificar se a chave não contém "não disponível"
|
||||
const regex_1 = /Ainda não disponível/i; // O "i" torna a expressão regular case-insensitive
|
||||
|
||||
fetch("/postos-de-venda.json")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
// Verifique se o JSON não contém a chave "Ainda não disponível"
|
||||
if (!Object.values(data).some(value => value.includes("Ainda não disponível"))) {
|
||||
if (!regex_1.test(Object.keys(data)[0])) {//verifica apenas a primeira chave do JSON
|
||||
// Crie a div com a classe "versao-impressa-compre"
|
||||
const versaoImpressaDiv = document.createElement("div");
|
||||
versaoImpressaDiv.className = "versao-impressa-compre";
|
||||
@ -1103,12 +1107,22 @@ fetch("/postos-de-venda.json")
|
||||
titulo.textContent = "Está gostando?";
|
||||
versaoImpressaDiv.appendChild(titulo);
|
||||
|
||||
//crie um <span> para a mensagem
|
||||
const spanTexto = document.createElement("span");
|
||||
spanTexto.textContent = "Considere ajudar, comprando uma cópia física deste livro.";
|
||||
versaoImpressaDiv.appendChild(spanTexto);
|
||||
|
||||
// Crie um <ul> para a lista de links
|
||||
const ul = document.createElement("ul");
|
||||
|
||||
// Use uma expressão regular para verificar se a chave não contém "não disponível"
|
||||
const regex = /não disponível/i; // O "i" torna a expressão regular case-insensitive
|
||||
|
||||
|
||||
|
||||
// Itere sobre as chaves e valores no JSON
|
||||
for (const chave in data) {
|
||||
if (!data[chave].includes("não disponível")) {
|
||||
if (!regex.test(chave)) {
|
||||
// Crie um <li> para cada chave-valor
|
||||
const li = document.createElement("li");
|
||||
const a = document.createElement("a");
|
||||
@ -1122,13 +1136,13 @@ fetch("/postos-de-venda.json")
|
||||
// Adicione o <ul> à div "versao-impressa-compre"
|
||||
versaoImpressaDiv.appendChild(ul);
|
||||
|
||||
// Adicione a div "versao-impressa-compre" à página, antes da div "quarto-margin-sidebar"
|
||||
document.body.insertBefore(versaoImpressaDiv, marginSidebar);
|
||||
// Adicione a div "versao-impressa-compre" à div "quarto-margin-sidebar"
|
||||
marginSidebar.appendChild(versaoImpressaDiv);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Erro ao carregar o arquivo postos-de-venda.json:", error);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user