|
@@ -1,4 +1,4 @@
|
|
|
-// Botao de voltar para o topo da pagina
|
|
|
+// Button to return to the top of page
|
|
|
let btnVoltar = document.getElementById("ifr__btn__backToTop");
|
|
|
window.onscroll = function () {
|
|
|
scrollFunction();
|
|
@@ -15,13 +15,23 @@ function backToTop() {
|
|
|
document.documentElement.scrollTop = 0;
|
|
|
}
|
|
|
|
|
|
-// Insere em todos rodapés
|
|
|
+// Insert in all pages the footer
|
|
|
// let footer = document.getElementById("footer");
|
|
|
// footer.innerHTML =
|
|
|
// "<p>Atualizado pela ultima vez em: 3 de Outubro de 2023 -- por <a href='http://www.ime.usp.br/~laira'>Laira</a>.</p>";
|
|
|
|
|
|
-// Insere em todos rodapés
|
|
|
-const baseUrl = "/about";
|
|
|
+// Remover ultima parte da URL atual
|
|
|
+function pegarURL () {
|
|
|
+ strUrl = window.location.href;
|
|
|
+ ind = strUrl.lastIndexOf("/");
|
|
|
+ subStrigURL = strUrl.substring(0, ind);
|
|
|
+ // alert("carregar_pagina.js: " + subStrigURL);
|
|
|
+ return subStrigURL;
|
|
|
+ }
|
|
|
+
|
|
|
+// Insert in all pages the footer
|
|
|
+//leo const baseUrl = "/about";
|
|
|
+const baseUrl = pegarURL();
|
|
|
const lastUpdate =
|
|
|
"Atualizado pela ultima vez em: 25 de março de 2025 -- por <a href='http://www.ime.usp.br/~laira'>Laira</a>.";
|
|
|
let footer = document.getElementById("footer");
|
|
@@ -132,7 +142,7 @@ if (toc) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-// Insere em todos rodapés
|
|
|
+// Insert in all pages the footer
|
|
|
const updateMenu = (depth) => {
|
|
|
const path = depth == 1 ? "../" : "../../";
|
|
|
const semiPath = depth == 1 ? "./" : "../";
|
|
@@ -180,4 +190,4 @@ const updateMenu = (depth) => {
|
|
|
</div>
|
|
|
</div>
|
|
|
`;
|
|
|
-};
|
|
|
+};
|