diff --git a/LogoRegistroALTII_min.png b/LogoRegistroALTII_min.png deleted file mode 100644 index 089a084..0000000 Binary files a/LogoRegistroALTII_min.png and /dev/null differ diff --git a/css/configuracoesleitor.css b/css/configuracoesleitor.css index 864fe38..2ffdfb8 100644 --- a/css/configuracoesleitor.css +++ b/css/configuracoesleitor.css @@ -172,6 +172,19 @@ object pre { background-color: #444 !important; } +logo-link-livros-moan { + display: inline-block; + width: 28px; + height: 28px; + background-image: url('https://leitorweb.livro.online/favicon.svg'); + background-size: contain; + background-repeat: no-repeat; +} + +body.quarto-light a.logo-link-livros-moan { + background-image: url('https://leitorweb.livro.online/favicon.svg'); +} + h1 { font-size: 2em; } diff --git a/css/configuracoesleitor.min.css b/css/configuracoesleitor.min.css index 4aaa3f1..2d9f4d1 100644 --- a/css/configuracoesleitor.min.css +++ b/css/configuracoesleitor.min.css @@ -1 +1 @@ -main {position: relative;}#papel {padding: 18px;box-sizing: border-box;border-radius: 5px;margin-top: 45px;}.page-navigation {margin-bottom: 30px;}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;}.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;border: 1px solid #ccc;border-radius: 5px;padding: 4px 9px;margin: 3px;cursor: pointer;}#moan-menu-texto button:hover {box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);}.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;}@media only screen and (max-width: 767px) {#quarto-content {display: block !important;}#moan-menu-texto {top: -34px }}@media only screen and (max-width: 500px) {#papel{margin-top: 90px;}} \ No newline at end of file +main{position:relative}#papel{padding:18px;box-sizing:border-box;border-radius:5px;margin-top:45px}.page-navigation{margin-bottom:30px}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}.modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgb(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;border:1px solid #ccc;border-radius:5px;padding:4px 9px;margin:3px;cursor:pointer}#moan-menu-texto button:hover{box-shadow:0 0 5px rgb(0 0 0 / .5)}.luz_apagada{background-color:#444!important}logo-link-livros-moan{display:inline-block;width:28px;height:28px;background-image:url(https://leitorweb.livro.online/favicon.svg);background-size:contain;background-repeat:no-repeat}body.quarto-light a.logo-link-livros-moan{background-image:url(https://leitorweb.livro.online/favicon.svg)}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:.88em}.callout.callout-style-default .callout-body{font-size:.88em}@media only screen and (max-width:767px){#quarto-content{display:block!important}#moan-menu-texto{top:-34px}}@media only screen and (max-width:500px){#papel{margin-top:90px}} \ No newline at end of file diff --git a/estante.svg b/estante.svg deleted file mode 100644 index 80c8d28..0000000 --- a/estante.svg +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..f79faca --- /dev/null +++ b/favicon.svg @@ -0,0 +1,113 @@ + + + + diff --git a/favicon_branco.svg b/favicon_branco.svg new file mode 100644 index 0000000..79118d7 --- /dev/null +++ b/favicon_branco.svg @@ -0,0 +1,114 @@ + + + + diff --git a/import_contacts_FILL0_wght400_GRAD0_opsz24.svg b/import_contacts_FILL0_wght400_GRAD0_opsz24.svg deleted file mode 100644 index d3d4620..0000000 --- a/import_contacts_FILL0_wght400_GRAD0_opsz24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/leitor-web.js b/leitor-web.js index c8c0462..46d474f 100644 --- a/leitor-web.js +++ b/leitor-web.js @@ -1,4 +1,4 @@ -//Este script depende da biblioteca https://moanquarto.livro.online/bibliotecas_de_terceiros/qrcode.min.js e de imagens na mesma pasta deste arquivo +//Este script depende da biblioteca https://leitorweb.livro.online/bibliotecas_de_terceiros/qrcode.min.js e de imagens na mesma pasta deste arquivo //Variáveis globais @@ -17,12 +17,12 @@ window.onload = (event) => { // A variavel metadados está definida no head do html. Foi colocada pelo script preparacao-moan.py - const Interruptor_Som = new Audio('https://moanquarto.livro.online/moan-quarto/Interruptor.mp3'); + const Interruptor_Som = new Audio('https://leitorweb.livro.online/Interruptor.mp3'); const livroUrl = metadados.livroUrl; // 0 -> branco, 1 -> creme, 2 -> textura, 3 -> antigo - const tipo_de_papel = ['#fff', 'antiquewhite', "url('https://moanquarto.livro.online/moan-quarto/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')", "url('https://moanquarto.livro.online/moan-quarto/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"]; + const tipo_de_papel = ['#fff', 'antiquewhite', "url('https://leitorweb.livro.online/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')", "url('https://leitorweb.livro.online/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"]; let indiceTipoPapel = 0; //Índice do tipo de papel @@ -243,7 +243,7 @@ window.onload = (event) => { const scriptElement = document.createElement('script'); // Defina o atributo src para o caminho da biblioteca QRCode.js - scriptElement.src = 'https://moanquarto.livro.online/bibliotecas_de_terceiros/qrcode.min.js'; + scriptElement.src = 'https://leitorweb.livro.online/bibliotecas_de_terceiros/qrcode.min.js'; // Adicione o elemento script ao final do corpo do documento document.body.appendChild(scriptElement); @@ -538,11 +538,11 @@ window.onload = (event) => { // Crie e adicione os botões com as respectivas funções - divMenuTexto.appendChild(criarBotaoComFuncao('https://moanquarto.livro.online/moan-quarto/text_decrease_FILL0_wght400_GRAD0_opsz24.svg', diminuirFonte)); - divMenuTexto.appendChild(criarBotaoComFuncao('https://moanquarto.livro.online/moan-quarto/text_increase_FILL0_wght400_GRAD0_opsz24.svg', aumentarFonte)); - divMenuTexto.appendChild(criarBotaoComFuncao('https://moanquarto.livro.online/moan-quarto/format_clear_FILL0_wght400_GRAD0_opsz24.svg', retornarFonteSize)); - divMenuTexto.appendChild(criarBotaoComFuncao('https://moanquarto.livro.online/moan-quarto/note_FILL0_wght400_GRAD0_opsz24.svg', mudarPapel)); - divMenuTexto.appendChild(criarBotaoComFuncao('https://moanquarto.livro.online/moan-quarto/emoji_objects_FILL0_wght400_GRAD0_opsz24.svg', alternarEstadoDaLuz)); + divMenuTexto.appendChild(criarBotaoComFuncao('https://leitorweb.livro.online/text_decrease_FILL0_wght400_GRAD0_opsz24.svg', diminuirFonte)); + divMenuTexto.appendChild(criarBotaoComFuncao('https://leitorweb.livro.online/text_increase_FILL0_wght400_GRAD0_opsz24.svg', aumentarFonte)); + divMenuTexto.appendChild(criarBotaoComFuncao('https://leitorweb.livro.online/format_clear_FILL0_wght400_GRAD0_opsz24.svg', retornarFonteSize)); + divMenuTexto.appendChild(criarBotaoComFuncao('https://leitorweb.livro.online/note_FILL0_wght400_GRAD0_opsz24.svg', mudarPapel)); + divMenuTexto.appendChild(criarBotaoComFuncao('https://leitorweb.livro.online/emoji_objects_FILL0_wght400_GRAD0_opsz24.svg', alternarEstadoDaLuz)); main.insertBefore(divMenuTexto, main.firstChild); @@ -616,7 +616,7 @@ window.onload = (event) => { inputBusca.className = 'buscar_ref'; inputBusca.setAttribute('placeholder', 'Referência...'); - inputBusca.style.backgroundImage = 'url("https://moanquarto.livro.online/moan-quarto/search_FILL0_wght400_GRAD0_opsz24.svg")'; + inputBusca.style.backgroundImage = 'url("https://leitorweb.livro.online/search_FILL0_wght400_GRAD0_opsz24.svg")'; inputBusca.style.backgroundRepeat = 'no-repeat'; inputBusca.style.backgroundPosition = '5px center'; inputBusca.style.paddingLeft = '25px'; // Ajuste o valor conforme necessário @@ -642,7 +642,7 @@ window.onload = (event) => { // Adicione a imagem ao span const imagem = document.createElement("img"); - imagem.src = "https://moanquarto.livro.online/moan-quarto/link_FILL0_wght400_GRAD0_opsz24.svg"; + imagem.src = "https://leitorweb.livro.online/link_FILL0_wght400_GRAD0_opsz24.svg"; spanDentroDoBotao.appendChild(imagem); // Crie o texto @@ -669,36 +669,16 @@ window.onload = (event) => { const buscaRefInput = document.getElementById('busca_ref'); -// Colocar os link da barra. Estou colocando um link para a editora e outro para os demais livros +// Colocar os link da barra. Estou colocando um link os demais livros if (navbarTools) { // Crie o primeiro link e imagem var link1 = document.createElement('a'); - link1.className = 'quarto-navigation-tool px-1'; - link1.href = 'https://editora.livro.online'; - link1.title = 'Editora Moan'; + link1.className = 'quarto-navigation-tool px-1 logo-link-livros-moan'; + link1.href = 'https://livro.online'; + link1.title = 'Livros Online da Editora Moan'; - var img1 = document.createElement('img'); - img1.src = 'https://moanquarto.livro.online/moan-quarto/LogoRegistroALTII_min.png'; - img1.alt = 'Editora'; - - link1.appendChild(img1); - - // Crie o segundo link e imagem - var link2 = document.createElement('a'); - link2.className = 'quarto-navigation-tool px-1'; - link2.href = 'https://livro.online/livros'; - link2.title = 'Mais livros gratuitos...'; - - var img2 = document.createElement('img'); - img2.src = 'https://moanquarto.livro.online/moan-quarto/livro_aberto_curvas.svg'; - img2.alt = 'Livros'; - img2.width = 28; - img2.height = 28; - - link2.appendChild(img2); // Adicione os links à div quarto-navbar-tools no início - navbarTools.insertBefore(link2, navbarTools.firstChild); navbarTools.insertBefore(link1, navbarTools.firstChild); } diff --git a/leitor-web.min.js b/leitor-web.min.js index 4664b21..4fe83bf 100644 --- a/leitor-web.min.js +++ b/leitor-web.min.js @@ -1 +1 @@ -var observer,elementosNaPagina=[];let ref_cap_busca={},modelo_referencia_antigo=!1;window.onload=e=>{const t=new Audio("https://moanquarto.livro.online/moan-quarto/Interruptor.mp3"),o=metadados.livroUrl,n=["#fff","antiquewhite","url('https://moanquarto.livro.online/moan-quarto/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')","url('https://moanquarto.livro.online/moan-quarto/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"];let a=0;const r=document.querySelector("body"),l=document.getElementById("quarto-content"),i=document.querySelector(".page-navigation"),s=document.getElementById("quarto-sidebar"),c=document.getElementById("quarto-margin-sidebar"),d=document.querySelectorAll(".sidebar-item-container"),p=document.querySelectorAll("span.chapter-number"),m=document.getElementById("toc-title"),u=document.querySelector(".quarto-navbar-tools");let g=!1;const f=document.querySelector("#papel"),h=document.querySelector("main");var v=document.createElement("div");function y(e,t){const o=document.createElement("button"),n=document.createElement("img");return n.src=e,o.appendChild(n),o.addEventListener("click",(function(){t()})),o}v.id="moan-menu-texto";let _=document.querySelector("header");const E=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p")[0];function C(){let e=localStorage.getItem("livro.online@"+o+".config");let t=!1;t="default"!=localStorage.getItem("quarto-color-scheme");let r=JSON.parse(e);e&&(r[0]&&B(r[0]),r[1]&&(a=r[1],f.style.background=n[r[1]],g&&!t&&i&&(i.style.background=n[r[1]]),t&&f.style.removeProperty("background")),r[2]&&(g=r[2],g&&!t&&D()))}function b(e,t){let n=localStorage.getItem("livro.online@"+o+".config");if(n){let a,r=JSON.parse(n);switch(e){case"fonte":r[0]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a);break;case"papel":r[1]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a);break;case"luz_apagada":r[2]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a)}}else{let n,a=[];switch(e){case"fonte":a[0]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n);break;case"papel":a[1]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n);break;case"fundo":a[2]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n)}}}C();const S=document.createElement("script");S.src="https://moanquarto.livro.online/bibliotecas_de_terceiros/qrcode.min.js",document.body.appendChild(S);const q=document.createElement("div");q.id="modal",q.className="modal",q.style.display="none";const w=document.createElement("div");w.className="modal-content";const L=document.createElement("span");L.className="close",L.innerHTML="×",L.style.fontSize="20px";const I=document.createElement("div"),z=document.createElement("p");z.innerHTML="Referência";const k=document.createElement("span");k.id="ref",I.appendChild(z),I.appendChild(k);const N=document.createElement("div"),x=document.createElement("p");x.innerHTML="Link";const P=document.createElement("span");P.id="link",N.appendChild(x),N.appendChild(P);const R=document.createElement("p");R.innerHTML="QR Code";const H=document.createElement("div");H.id="qrcode_container";const M=document.createElement("div"),A=document.createElement("p");A.innerHTML="Como Citar";const j=document.createElement("span");j.innerHTML=`Veja aqui como citar este livro.`,M.appendChild(A),M.appendChild(j);const T=document.createElement("div"),V=document.createElement("p");V.innerHTML="Versão Impressa";const $=document.createElement("span");function B(e){let t=window.getComputedStyle(v,null).getPropertyValue("font-size"),o=window.getComputedStyle(_,null).getPropertyValue("font-size");if(void 0!==e)f.style.fontSize=`${e}px`,v.style.fontSize=t,_.style.fontSize=o;else{let e=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p"),n=parseInt(e[0])+2;f.style.fontSize=`${n}px`,v.style.fontSize=t,_.style.fontSize=o,b("fonte",n)}}function O(){l.classList.remove("luz_apagada"),i&&i.style.removeProperty("background"),s.style.removeProperty("color"),s.classList.remove("luz_apagada"),d.forEach((e=>{e.style.removeProperty("color")})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||e.style.removeProperty("color")})),c.style.removeProperty("color"),m&&m.style.removeProperty("color"),g=!1}function D(){l.classList.add("luz_apagada"),i&&(i.style.backgroundColor=n[a]),f.style.background=n[a],s.style.color="#fff",s.classList.add("luz_apagada"),d.forEach((e=>{e.style.color="#fff"})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||(e.style.color="#fff")})),c.style.color="#fff",m&&(m.style.color="#fff"),g=!0}$.innerHTML=`Veja aqui onde comprar.`,T.appendChild(V),T.appendChild($),w.appendChild(L),w.appendChild(I),w.appendChild(N),w.appendChild(R),w.appendChild(H),w.appendChild(M),w.appendChild(T),q.appendChild(w),document.body.appendChild(q),v.appendChild(y("https://moanquarto.livro.online/moan-quarto/text_decrease_FILL0_wght400_GRAD0_opsz24.svg",(function(){let e=window.getComputedStyle(v,null).getPropertyValue("font-size"),t=window.getComputedStyle(_,null).getPropertyValue("font-size"),o=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p"),n=parseInt(o[0])-2;f.style.fontSize=`${n}px`,v.style.fontSize=e,_.style.fontSize=t,b("fonte",n)}))),v.appendChild(y("https://moanquarto.livro.online/moan-quarto/text_increase_FILL0_wght400_GRAD0_opsz24.svg",B)),v.appendChild(y("https://moanquarto.livro.online/moan-quarto/format_clear_FILL0_wght400_GRAD0_opsz24.svg",(function(){f.style.fontSize=E+"px",b("fonte",E)}))),v.appendChild(y("https://moanquarto.livro.online/moan-quarto/note_FILL0_wght400_GRAD0_opsz24.svg",(function(){r.classList.contains("quarto-dark")?alert("Você precisa desabilitar o modo escuro para poder alterar o papel."):(a+=1,a>n.length-1&&(a=0),f.style.background=n[a],b("papel",a),g&&i&&(i.style.background=n[a]))}))),v.appendChild(y("https://moanquarto.livro.online/moan-quarto/emoji_objects_FILL0_wght400_GRAD0_opsz24.svg",(function(){r.classList.contains("quarto-dark")?alert("Você precisa desabilitar o modo escuro para o estado da luz de fundo."):g?(f.style.background=n[a],t.play(),O(),b("luz_apagada",!1)):(f.style.background=n[a],t.play(),D(),b("luz_apagada",!0))}))),h.insertBefore(v,h.firstChild);new MutationObserver((function(e,t){for(const t of e)"attributes"===t.type&&"class"===t.attributeName&&(r.classList.contains("quarto-dark")?(O(),f.style.removeProperty("background")):C())})).observe(r,{attributes:!0,attributeFilter:["class"]});var F=document.createElement("div");F.className="referencias_capitulo";var J=document.createElement("div");J.className="cont_ref";var G=document.createElement("span");G.id="Paginacao",J.appendChild(G),F.appendChild(J);var U=document.createElement("input");U.id="busca_ref",U.className="buscar_ref",U.setAttribute("placeholder","Referência..."),U.style.backgroundImage='url("https://moanquarto.livro.online/moan-quarto/search_FILL0_wght400_GRAD0_opsz24.svg")',U.style.backgroundRepeat="no-repeat",U.style.backgroundPosition="5px center",U.style.paddingLeft="25px",F.appendChild(U);const Q=document.createElement("button");Q.className="pegarLink";const X=document.createElement("span");X.style.display="flex",X.style.flexDirection="column",X.style.alignItems="center";const Z=document.createElement("img");Z.src="https://moanquarto.livro.online/moan-quarto/link_FILL0_wght400_GRAD0_opsz24.svg",X.appendChild(Z);const K=document.createTextNode("link");X.appendChild(K),Q.appendChild(X),F.appendChild(Q),Q.addEventListener("click",(function(){let e;window.getSelection?e=window.getSelection():document.selection&&(e=document.selection.createRange());if(""===e.toString())return void alert("Selecione um texto primeiro...");let t=window.getSelection().anchorNode.parentElement,o=window.getSelection().focusNode.parentElement;if(t&&o){let e=ie(t),n=ie(o),a=window.location.href;const r=new URL(a);r.search="",r.hash="";let l=r.href;if(e===n){let t=`${l}${e?"#"+e:""}`,o=e;o&&""!==o.trim()?k.style.fontSize="30px":(o="Elemento sem referência direta",k.style.fontSize="14px"),le(o,t)}else if(e{0===t&&n("lista vazia"),e.forEach((e=>{o++,e.isIntersecting&&elementosNaPagina.push(e),o===t&&0!=elementosNaPagina.length&&n("lista pronta")}))})),a=new Promise((e=>{e(elementosNaPagina.sort((function(e,t){let o=e.target.id.split("P"),n=t.target.id.split("P");return parseInt(o[1])parseInt(n[1])?1:void 0})))}));n.then((e=>{"lista pronta"===e?a.then((e=>{let t=e.length-1;e[0].target.id===e[t].target.id?G.innerHTML=`${e[0].target.id}`:G.innerHTML=`${e[0].target.id} a ${e[t].target.id}`})).catch((e=>console.log("Erro na lista: "+e))):"lista vazia"===e&&(console.log("Não tenho Unidade"),G.innerHTML="...")})).catch((e=>console.log("Erro: "+e)))}window.addEventListener("scroll",(()=>{elementosNaPagina=[],re(),console.log("Observador ativado")}));let ae={root:null,rootMargin:"0px",threshold:.01,delay:1e3,trackVisibility:!0};function re(){observer&&observer.disconnect();var e=f.querySelectorAll(".unidade"),t=Array.from(e);0!==t.length&&(observer=new IntersectionObserver(ne,ae),t.map((e=>observer.observe(e))))}function le(e,t){document.getElementById("ref").textContent=e,document.getElementById("link").textContent=t;document.getElementById("modal").style.display="block";let o=document.getElementById("qrcode_container");o.innerHTML="";let n=t.match(/:\/\/([^/]+)\/(.+)/)[2];console.log("Verificando: "+n),n=n.replace(/\//g,"--"),n=n.replace(/#/g,"__"),n="https://livro.online/qr-code/?livro="+n;new QRCode(o,{text:n,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})}function ie(e){let t=0;for(;t<10;t++){if(e&&(e.classList.contains("unidade")||e.classList.contains("unidade_silenciosa")))return e.id;e.parentElement&&(e=e.parentElement)}}re(),W.addEventListener("focus",(()=>{fetch("/"+o+"/ref_capitulos.json").then((e=>{if(!e.ok)throw new Error("Não foi possível carregar o arquivo JSON com as referências.");return e.json()})).then((e=>{console.log(e),ref_cap_busca=e})).catch((e=>{console.error(e)}))})),W.addEventListener("keydown",(e=>{"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),"undefined"!=typeof modelo_antigo&&!0===modelo_antigo&&(modelo_referencia_antigo=!0),function(e){let t,n,a,r=W.value.replace(/[&<>"']/g,"");e?(t=r,n=r[0],a=ref_cap_busca[n]):(t=r.toUpperCase(),n=t.split("P")[0],a=ref_cap_busca[n]);if(!a)return console.log("Referência não encontrada"),void alert("Referência que começa com "+n+" é inválida neste livro.");const l="/"+o+"/"+a+".html#"+t;window.location.href=l}(modelo_referencia_antigo))})),document.querySelector(".close").addEventListener("click",(function(){document.getElementById("modal").style.display="none"}));const se=/Ainda não disponível/i;fetch("/"+o+"/postos-de-venda.json").then((e=>e.json())).then((e=>{if(!se.test(Object.keys(e)[0])){const t=document.createElement("div");t.className="versao-impressa-compre";const o=document.createElement("h2");o.textContent="Está gostando?",t.appendChild(o);const n=document.createElement("span");n.textContent="Considere ajudar, comprando uma cópia física deste livro.",t.appendChild(n);const a=document.createElement("ul"),r=/não disponível/i;for(const t in e)if(!r.test(t)){const o=document.createElement("li"),n=document.createElement("a");n.href=e[t],n.textContent=t,o.appendChild(n),a.appendChild(o)}t.appendChild(a),c.appendChild(t)}})).catch((e=>{console.error("Erro ao carregar o arquivo postos-de-venda.json:",e)}))}; +var observer,elementosNaPagina=[];let ref_cap_busca={},modelo_referencia_antigo=!1;window.onload=e=>{const t=new Audio("https://leitorweb.livro.online/Interruptor.mp3"),n=metadados.livroUrl,o=["#fff","antiquewhite","url('https://leitorweb.livro.online/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')","url('https://leitorweb.livro.online/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"];let a=0;const r=document.querySelector("body"),l=document.getElementById("quarto-content"),i=document.querySelector(".page-navigation"),s=document.getElementById("quarto-sidebar"),c=document.getElementById("quarto-margin-sidebar"),d=document.querySelectorAll(".sidebar-item-container"),p=document.querySelectorAll("span.chapter-number"),m=document.getElementById("toc-title"),u=document.querySelector(".quarto-navbar-tools");let g=!1;const f=document.querySelector("#papel"),y=document.querySelector("main");var h=document.createElement("div");function v(e,t){const n=document.createElement("button"),o=document.createElement("img");return o.src=e,n.appendChild(o),n.addEventListener("click",(function(){t()})),n}h.id="moan-menu-texto";let _=document.querySelector("header");const b=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p")[0];function E(){let e=localStorage.getItem("livro.online@"+n+".config");let t=!1;t="default"!=localStorage.getItem("quarto-color-scheme");let r=JSON.parse(e);e&&(r[0]&&T(r[0]),r[1]&&(a=r[1],f.style.background=o[r[1]],g&&!t&&i&&(i.style.background=o[r[1]]),t&&f.style.removeProperty("background")),r[2]&&(g=r[2],g&&!t&&D()))}function C(e,t){let o=localStorage.getItem("livro.online@"+n+".config");if(o){let a,r=JSON.parse(o);switch(e){case"fonte":r[0]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+n+".config",a);break;case"papel":r[1]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+n+".config",a);break;case"luz_apagada":r[2]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+n+".config",a)}}else{let o,a=[];switch(e){case"fonte":a[0]=t,o=JSON.stringify(a),localStorage.setItem("livro.online@"+n+".config",o);break;case"papel":a[1]=t,o=JSON.stringify(a),localStorage.setItem("livro.online@"+n+".config",o);break;case"fundo":a[2]=t,o=JSON.stringify(a),localStorage.setItem("livro.online@"+n+".config",o)}}}E();const w=document.createElement("script");w.src="https://leitorweb.livro.online/bibliotecas_de_terceiros/qrcode.min.js",document.body.appendChild(w);const S=document.createElement("div");S.id="modal",S.className="modal",S.style.display="none";const L=document.createElement("div");L.className="modal-content";const z=document.createElement("span");z.className="close",z.innerHTML="×",z.style.fontSize="20px";const I=document.createElement("div"),k=document.createElement("p");k.innerHTML="Referência";const N=document.createElement("span");N.id="ref",I.appendChild(k),I.appendChild(N);const P=document.createElement("div"),x=document.createElement("p");x.innerHTML="Link";const q=document.createElement("span");q.id="link",P.appendChild(x),P.appendChild(q);const R=document.createElement("p");R.innerHTML="QR Code";const H=document.createElement("div");H.id="qrcode_container";const M=document.createElement("div"),j=document.createElement("p");j.innerHTML="Como Citar";const A=document.createElement("span");A.innerHTML=`Veja aqui como citar este livro.`,M.appendChild(j),M.appendChild(A);const O=document.createElement("div"),V=document.createElement("p");V.innerHTML="Versão Impressa";const $=document.createElement("span");function T(e){let t=window.getComputedStyle(h,null).getPropertyValue("font-size"),n=window.getComputedStyle(_,null).getPropertyValue("font-size");if(void 0!==e)f.style.fontSize=`${e}px`,h.style.fontSize=t,_.style.fontSize=n;else{let e=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p"),o=parseInt(e[0])+2;f.style.fontSize=`${o}px`,h.style.fontSize=t,_.style.fontSize=n,C("fonte",o)}}function B(){l.classList.remove("luz_apagada"),i&&i.style.removeProperty("background"),s.style.removeProperty("color"),s.classList.remove("luz_apagada"),d.forEach((e=>{e.style.removeProperty("color")})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||e.style.removeProperty("color")})),c.style.removeProperty("color"),m&&m.style.removeProperty("color"),g=!1}function D(){l.classList.add("luz_apagada"),i&&(i.style.backgroundColor=o[a]),f.style.background=o[a],s.style.color="#fff",s.classList.add("luz_apagada"),d.forEach((e=>{e.style.color="#fff"})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||(e.style.color="#fff")})),c.style.color="#fff",m&&(m.style.color="#fff"),g=!0}$.innerHTML=`Veja aqui onde comprar.`,O.appendChild(V),O.appendChild($),L.appendChild(z),L.appendChild(I),L.appendChild(P),L.appendChild(R),L.appendChild(H),L.appendChild(M),L.appendChild(O),S.appendChild(L),document.body.appendChild(S),h.appendChild(v("https://leitorweb.livro.online/text_decrease_FILL0_wght400_GRAD0_opsz24.svg",(function(){let e=window.getComputedStyle(h,null).getPropertyValue("font-size"),t=window.getComputedStyle(_,null).getPropertyValue("font-size"),n=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p"),o=parseInt(n[0])-2;f.style.fontSize=`${o}px`,h.style.fontSize=e,_.style.fontSize=t,C("fonte",o)}))),h.appendChild(v("https://leitorweb.livro.online/text_increase_FILL0_wght400_GRAD0_opsz24.svg",T)),h.appendChild(v("https://leitorweb.livro.online/format_clear_FILL0_wght400_GRAD0_opsz24.svg",(function(){f.style.fontSize=b+"px",C("fonte",b)}))),h.appendChild(v("https://leitorweb.livro.online/note_FILL0_wght400_GRAD0_opsz24.svg",(function(){r.classList.contains("quarto-dark")?alert("Você precisa desabilitar o modo escuro para poder alterar o papel."):(a+=1,a>o.length-1&&(a=0),f.style.background=o[a],C("papel",a),g&&i&&(i.style.background=o[a]))}))),h.appendChild(v("https://leitorweb.livro.online/emoji_objects_FILL0_wght400_GRAD0_opsz24.svg",(function(){r.classList.contains("quarto-dark")?alert("Você precisa desabilitar o modo escuro para o estado da luz de fundo."):g?(f.style.background=o[a],t.play(),B(),C("luz_apagada",!1)):(f.style.background=o[a],t.play(),D(),C("luz_apagada",!0))}))),y.insertBefore(h,y.firstChild);new MutationObserver((function(e,t){for(const t of e)"attributes"===t.type&&"class"===t.attributeName&&(r.classList.contains("quarto-dark")?(B(),f.style.removeProperty("background")):E())})).observe(r,{attributes:!0,attributeFilter:["class"]});var F=document.createElement("div");F.className="referencias_capitulo";var J=document.createElement("div");J.className="cont_ref";var G=document.createElement("span");G.id="Paginacao",J.appendChild(G),F.appendChild(J);var U=document.createElement("input");U.id="busca_ref",U.className="buscar_ref",U.setAttribute("placeholder","Referência..."),U.style.backgroundImage='url("https://leitorweb.livro.online/search_FILL0_wght400_GRAD0_opsz24.svg")',U.style.backgroundRepeat="no-repeat",U.style.backgroundPosition="5px center",U.style.paddingLeft="25px",F.appendChild(U);const Q=document.createElement("button");Q.className="pegarLink";const X=document.createElement("span");X.style.display="flex",X.style.flexDirection="column",X.style.alignItems="center";const Z=document.createElement("img");Z.src="https://leitorweb.livro.online/link_FILL0_wght400_GRAD0_opsz24.svg",X.appendChild(Z);const K=document.createTextNode("link");X.appendChild(K),Q.appendChild(X),F.appendChild(Q),Q.addEventListener("click",(function(){let e;window.getSelection?e=window.getSelection():document.selection&&(e=document.selection.createRange());if(""===e.toString())return void alert("Selecione um texto primeiro...");let t=window.getSelection().anchorNode.parentElement,n=window.getSelection().focusNode.parentElement;if(t&&n){let e=ae(t),o=ae(n),a=window.location.href;const r=new URL(a);r.search="",r.hash="";let l=r.href;if(e===o){let t=`${l}${e?"#"+e:""}`,n=e;n&&""!==n.trim()?N.style.fontSize="30px":(n="Elemento sem referência direta",N.style.fontSize="14px"),oe(n,t)}else if(e{0===t&&o("lista vazia"),e.forEach((e=>{n++,e.isIntersecting&&elementosNaPagina.push(e),n===t&&0!=elementosNaPagina.length&&o("lista pronta")}))})),a=new Promise((e=>{e(elementosNaPagina.sort((function(e,t){let n=e.target.id.split("P"),o=t.target.id.split("P");return parseInt(n[1])parseInt(o[1])?1:void 0})))}));o.then((e=>{"lista pronta"===e?a.then((e=>{let t=e.length-1;e[0].target.id===e[t].target.id?G.innerHTML=`${e[0].target.id}`:G.innerHTML=`${e[0].target.id} a ${e[t].target.id}`})).catch((e=>console.log("Erro na lista: "+e))):"lista vazia"===e&&(console.log("Não tenho Unidade"),G.innerHTML="...")})).catch((e=>console.log("Erro: "+e)))}window.addEventListener("scroll",(()=>{elementosNaPagina=[],ne(),console.log("Observador ativado")}));let te={root:null,rootMargin:"0px",threshold:.01,delay:1e3,trackVisibility:!0};function ne(){observer&&observer.disconnect();var e=f.querySelectorAll(".unidade"),t=Array.from(e);0!==t.length&&(observer=new IntersectionObserver(ee,te),t.map((e=>observer.observe(e))))}function oe(e,t){document.getElementById("ref").textContent=e,document.getElementById("link").textContent=t;document.getElementById("modal").style.display="block";let n=document.getElementById("qrcode_container");n.innerHTML="";let o=t.match(/:\/\/([^/]+)\/(.+)/)[2];console.log("Verificando: "+o),o=o.replace(/\//g,"--"),o=o.replace(/#/g,"__"),o="https://livro.online/qr-code/?livro="+o;new QRCode(n,{text:o,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})}function ae(e){let t=0;for(;t<10;t++){if(e&&(e.classList.contains("unidade")||e.classList.contains("unidade_silenciosa")))return e.id;e.parentElement&&(e=e.parentElement)}}ne(),W.addEventListener("focus",(()=>{fetch("/"+n+"/ref_capitulos.json").then((e=>{if(!e.ok)throw new Error("Não foi possível carregar o arquivo JSON com as referências.");return e.json()})).then((e=>{console.log(e),ref_cap_busca=e})).catch((e=>{console.error(e)}))})),W.addEventListener("keydown",(e=>{"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),"undefined"!=typeof modelo_antigo&&!0===modelo_antigo&&(modelo_referencia_antigo=!0),function(e){let t,o,a,r=W.value.replace(/[&<>"']/g,"");e?(t=r,o=r[0],a=ref_cap_busca[o]):(t=r.toUpperCase(),o=t.split("P")[0],a=ref_cap_busca[o]);if(!a)return console.log("Referência não encontrada"),void alert("Referência que começa com "+o+" é inválida neste livro.");const l="/"+n+"/"+a+".html#"+t;window.location.href=l}(modelo_referencia_antigo))})),document.querySelector(".close").addEventListener("click",(function(){document.getElementById("modal").style.display="none"}));const re=/Ainda não disponível/i;fetch("/"+n+"/postos-de-venda.json").then((e=>e.json())).then((e=>{if(!re.test(Object.keys(e)[0])){const t=document.createElement("div");t.className="versao-impressa-compre";const n=document.createElement("h2");n.textContent="Está gostando?",t.appendChild(n);const o=document.createElement("span");o.textContent="Considere ajudar, comprando uma cópia física deste livro.",t.appendChild(o);const a=document.createElement("ul"),r=/não disponível/i;for(const t in e)if(!r.test(t)){const n=document.createElement("li"),o=document.createElement("a");o.href=e[t],o.textContent=t,n.appendChild(o),a.appendChild(n)}t.appendChild(a),c.appendChild(t)}})).catch((e=>{console.error("Erro ao carregar o arquivo postos-de-venda.json:",e)}))}; \ No newline at end of file diff --git a/livro_aberto_curvas.svg b/livro_aberto_curvas.svg deleted file mode 100644 index 457df7e..0000000 --- a/livro_aberto_curvas.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - -