Retirando ajuste legenda figuras

This commit is contained in:
Rafael Tavares Juliani committed 2023-10-20 00:09:17 -03:00
1 parent ba1734fbce
commit f74f6448ea
2 files changed
+2 -50

No files matched your search

+1 -49
View File
@@ -9,55 +9,7 @@ var observer;
let ref_cap_busca = {}; let ref_cap_busca = {};
window.onload = (event) => { window.onload = (event) => {
// Seleciona todos os elementos com a classe .figure-caption dentro do elemento com id quarto-document-content
const captions = document.querySelectorAll('#quarto-document-content .figure-caption');
//seleciona todas as tags que se chamam caption
const captionsTag = document.getElementsByTagName("caption");
// Converte a coleção HTMLCollection em um array
const captionsArray = Array.from(captionsTag);
// Itera sobre todos os elementos .figure-caption
captions.forEach(caption => {
// Obtém o texto dentro do elemento .figure-caption
const texto = caption.innerHTML;
// Divide o texto em partes separadas por ":"
const partes = texto.split(':');
const primeiraParte = partes.shift();
// Recria o texto com <span> em torno de cada caractere até o primeiro ":"
const novoTexto = "<span class='contador-figura'>"+primeiraParte+"</span>: "+partes.join(' ');
// Define o novo HTML no elemento .figure-caption
caption.innerHTML = novoTexto;
});
// Itera sobre todas as tags caption
captionsArray.forEach(caption => {
// Obtém o texto dentro da tag caption
const texto = caption.innerHTML;
// Divide o texto em partes separadas por ":"
const partes = texto.split(':');
const primeiraParte = partes.shift();
// Recria o texto com <span> em torno de cada caractere até o primeiro ":"
const novoTexto = "<span class='contador-figura'>"+primeiraParte+"</span>: "+partes.join(' ');
// Define a nova tag HTML caption
caption.innerHTML = novoTexto;
});
// A variavel metadados está definida no head do html. Foi colocada pelo script preparacao-moan.py // A variavel metadados está definida no head do html. Foi colocada pelo script preparacao-moan.py
+1 -1
View File
@@ -1 +1 @@
var observer,elementosNaPagina=[];let ref_cap_busca={};window.onload=e=>{let t=document.querySelectorAll("#quarto-document-content .figure-caption"),n=document.getElementsByTagName("caption"),a=Array.from(n);t.forEach(e=>{let t=e.innerHTML,n=t.split(":"),a=n.shift(),o="<span class='contador-figura'>"+a+"</span>: "+n.join(" ");e.innerHTML=o}),a.forEach(e=>{let t=e.innerHTML,n=t.split(":"),a=n.shift(),o="<span class='contador-figura'>"+a+"</span>: "+n.join(" ");e.innerHTML=o});let o=new Audio("https://js.livro.online/moan-quarto/Interruptor.mp3"),l=metadados.livroUrl,r=["#fff","antiquewhite","url('https://js.livro.online/moan-quarto/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')","url('https://js.livro.online/moan-quarto/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"],i=0,s=document.querySelector("body"),c=document.getElementById("quarto-content"),p=document.querySelector(".page-navigation"),d=document.getElementById("quarto-sidebar"),f=document.getElementById("quarto-margin-sidebar"),u=document.querySelectorAll(".sidebar-item-container"),g=document.querySelectorAll("span.chapter-number"),m=document.getElementById("toc-title"),y=!1,h=document.querySelector("#papel"),v=document.querySelector("main");var $=document.createElement("div");function E(e,t){let n=document.createElement("button"),a=document.createElement("img");return a.src=e,n.appendChild(a),n.addEventListener("click",function(){t()}),n}$.id="moan-menu-texto";let b=document.querySelector("header"),L=window.getComputedStyle(h,null).getPropertyValue("font-size"),C=L.split("p"),z=C[0];function S(){let e=localStorage.getItem("livro.online@"+l+".config"),t=localStorage.getItem("quarto-color-scheme"),n=!1;n="default"!=t;let a=JSON.parse(e);e&&(a[0]&&B(a[0]),a[1]&&(i=a[1],h.style.background=r[a[1]],y&&!n&&(p.style.background=r[a[1]]),n&&h.style.removeProperty("background")),a[2]&&(y=a[2])&&!n&&G())}function k(e,t){let n=localStorage.getItem("livro.online@"+l+".config");if(n){let a=JSON.parse(n),o;switch(e){case"fonte":a[0]=t,o=JSON.stringify(a),localStorage.setItem("livro.online@"+l+".config",o);break;case"papel":a[1]=t,o=JSON.stringify(a),localStorage.setItem("livro.online@"+l+".config",o);break;case"luz_apagada":a[2]=t,o=JSON.stringify(a),localStorage.setItem("livro.online@"+l+".config",o)}}else{let r=[],i;switch(e){case"fonte":r[0]=t,i=JSON.stringify(r),localStorage.setItem("livro.online@"+l+".config",i);break;case"papel":r[1]=t,i=JSON.stringify(r),localStorage.setItem("livro.online@"+l+".config",i);break;case"fundo":r[2]=t,i=JSON.stringify(r),localStorage.setItem("livro.online@"+l+".config",i)}}}S();let q=document.createElement("script");q.src="https://js.livro.online/bibliotecas_de_terceiros/qrcode.min.js",document.body.appendChild(q);let I=document.createElement("div");I.id="modal",I.className="modal",I.style.display="none";let P=document.createElement("div");P.className="modal-content";let _=document.createElement("span");_.className="close",_.innerHTML="&times",_.style.fontSize="20px";let x=document.createElement("div"),N=document.createElement("p");N.innerHTML="<strong>Refer\xeancia</strong>";let w=document.createElement("span");w.id="ref",x.appendChild(N),x.appendChild(w);let j=document.createElement("div"),H=document.createElement("p");H.innerHTML="<strong>Link</strong>";let R=document.createElement("span");R.id="link",j.appendChild(H),j.appendChild(R);let T=document.createElement("p");T.innerHTML="<strong>QR Code</strong>";let M=document.createElement("div");function A(){let e=window.getComputedStyle($,null).getPropertyValue("font-size"),t=window.getComputedStyle(b,null).getPropertyValue("font-size"),n=parseInt(window.getComputedStyle(h,null).getPropertyValue("font-size").split("p")[0])-2;h.style.fontSize=`${n}px`,$.style.fontSize=e,b.style.fontSize=t,k("fonte",n)}function B(e){let t=window.getComputedStyle($,null).getPropertyValue("font-size"),n=window.getComputedStyle(b,null).getPropertyValue("font-size");if(void 0!==e)h.style.fontSize=`${e}px`,$.style.fontSize=t,b.style.fontSize=n;else{let a=parseInt(window.getComputedStyle(h,null).getPropertyValue("font-size").split("p")[0])+2;h.style.fontSize=`${a}px`,$.style.fontSize=t,b.style.fontSize=n,k("fonte",a)}}function V(){h.style.fontSize=z+"px",k("fonte",z)}function D(){if(s.classList.contains("quarto-dark")){alert("Voc\xea precisa desabilitar o modo escuro para poder alterar o papel.");return}(i+=1)>r.length-1&&(i=0),h.style.background=r[i],k("papel",i),y&&(p.style.background=r[i])}function F(){c.classList.remove("luz_apagada"),p.style.removeProperty("background"),d.style.removeProperty("color"),d.classList.remove("luz_apagada"),u.forEach(e=>{e.style.removeProperty("color")}),g.forEach(e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||e.style.removeProperty("color")}),f.style.removeProperty("color"),m&&m.style.removeProperty("color"),y=!1}function G(){c.classList.add("luz_apagada"),p.style.backgroundColor=r[i],h.style.background=r[i],d.style.color=Line truncated var observer,elementosNaPagina=[];let ref_cap_busca={};window.onload=e=>{let t=new Audio("https://js.livro.online/moan-quarto/Interruptor.mp3"),n=metadados.livroUrl,a=["#fff","antiquewhite","url('https://js.livro.online/moan-quarto/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')","url('https://js.livro.online/moan-quarto/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"],o=0,l=document.querySelector("body"),r=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"),f=document.getElementById("toc-title"),u=!1,g=document.querySelector("#papel"),m=document.querySelector("main");var y=document.createElement("div");function h(e,t){let n=document.createElement("button"),a=document.createElement("img");return a.src=e,n.appendChild(a),n.addEventListener("click",function(){t()}),n}y.id="moan-menu-texto";let v=document.querySelector("header"),$=window.getComputedStyle(g,null).getPropertyValue("font-size"),b=$.split("p"),E=b[0];function L(){let e=localStorage.getItem("livro.online@"+n+".config"),t=localStorage.getItem("quarto-color-scheme"),l=!1;l="default"!=t;let r=JSON.parse(e);e&&(r[0]&&A(r[0]),r[1]&&(o=r[1],g.style.background=a[r[1]],u&&!l&&(i.style.background=a[r[1]]),l&&g.style.removeProperty("background")),r[2]&&(u=r[2])&&!l&&F())}function C(e,t){let a=localStorage.getItem("livro.online@"+n+".config");if(a){let o=JSON.parse(a),l;switch(e){case"fonte":o[0]=t,l=JSON.stringify(o),localStorage.setItem("livro.online@"+n+".config",l);break;case"papel":o[1]=t,l=JSON.stringify(o),localStorage.setItem("livro.online@"+n+".config",l);break;case"luz_apagada":o[2]=t,l=JSON.stringify(o),localStorage.setItem("livro.online@"+n+".config",l)}}else{let r=[],i;switch(e){case"fonte":r[0]=t,i=JSON.stringify(r),localStorage.setItem("livro.online@"+n+".config",i);break;case"papel":r[1]=t,i=JSON.stringify(r),localStorage.setItem("livro.online@"+n+".config",i);break;case"fundo":r[2]=t,i=JSON.stringify(r),localStorage.setItem("livro.online@"+n+".config",i)}}}L();let z=document.createElement("script");z.src="https://js.livro.online/bibliotecas_de_terceiros/qrcode.min.js",document.body.appendChild(z);let S=document.createElement("div");S.id="modal",S.className="modal",S.style.display="none";let k=document.createElement("div");k.className="modal-content";let q=document.createElement("span");q.className="close",q.innerHTML="&times",q.style.fontSize="20px";let I=document.createElement("div"),P=document.createElement("p");P.innerHTML="<strong>Refer\xeancia</strong>";let _=document.createElement("span");_.id="ref",I.appendChild(P),I.appendChild(_);let x=document.createElement("div"),N=document.createElement("p");N.innerHTML="<strong>Link</strong>";let w=document.createElement("span");w.id="link",x.appendChild(N),x.appendChild(w);let j=document.createElement("p");j.innerHTML="<strong>QR Code</strong>";let R=document.createElement("div");function H(){let e=window.getComputedStyle(y,null).getPropertyValue("font-size"),t=window.getComputedStyle(v,null).getPropertyValue("font-size"),n=parseInt(window.getComputedStyle(g,null).getPropertyValue("font-size").split("p")[0])-2;g.style.fontSize=`${n}px`,y.style.fontSize=e,v.style.fontSize=t,C("fonte",n)}function A(e){let t=window.getComputedStyle(y,null).getPropertyValue("font-size"),n=window.getComputedStyle(v,null).getPropertyValue("font-size");if(void 0!==e)g.style.fontSize=`${e}px`,y.style.fontSize=t,v.style.fontSize=n;else{let a=parseInt(window.getComputedStyle(g,null).getPropertyValue("font-size").split("p")[0])+2;g.style.fontSize=`${a}px`,y.style.fontSize=t,v.style.fontSize=n,C("fonte",a)}}function B(){g.style.fontSize=E+"px",C("fonte",E)}function V(){if(l.classList.contains("quarto-dark")){alert("Voc\xea precisa desabilitar o modo escuro para poder alterar o papel.");return}(o+=1)>a.length-1&&(o=0),g.style.background=a[o],C("papel",o),u&&(i.style.background=a[o])}function D(){r.classList.remove("luz_apagada"),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"),f&&f.style.removeProperty("color"),u=!1}function F(){r.classList.add("luz_apagada"),i.style.backgroundColor=a[o],g.style.background=a[o],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",f&&(f.style.color="#fff"),u=!0}function M(){if(l.classList.contains("quarto-dark")){alert("Voc\xea precisa desabilitar o modo escuro para o estado da luz de fundo.");return}u?(g.Line truncated