Colocando links na barra de navegação
Coloquei um link para a editora e outro para os demais livros
This commit is contained in:
parent
5389dfe51b
commit
af6510f821
@ -40,6 +40,8 @@ window.onload = (event) => {
|
||||
|
||||
const tocTitle = document.getElementById('toc-title');
|
||||
|
||||
const navbarTools = document.querySelector('.quarto-navbar-tools');
|
||||
|
||||
let luz_apagada = false;
|
||||
|
||||
const papel = document.querySelector('#papel');
|
||||
@ -647,6 +649,44 @@ 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
|
||||
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';
|
||||
|
||||
var img1 = document.createElement('img');
|
||||
img1.src = 'https://js.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://js.livro.online/moan-quarto/import_contacts_FILL0_wght400_GRAD0_opsz24.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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Ativar um event listener para toda vez que a página correr, ou seja, toda vez que der scroll
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user