Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que faz
Corrige a navbar inconsistente nas subpáginas (#34) e vai além: extrai a navbar para uma fonte única (include), eliminando a duplicação que causava o drift.
Include único
NAVBAR_HTMLemscript.js.index.html,faq.html,codigo-conduta.html) tem só um placeholder<div id="site-navbar"></div>; oscript.jsinjeta a navbar e liga os comportamentos (dropdown, menu mobile, scroll-spy) viainitNavbar().#inicio,#vagas, ...) são reescritas automaticamente paraindex.html#...; links de página (faq.html) ficam como estão.#locais-map(some o erro no console das subpáginas).Por que não um partial
.htmlbuscado via fetchTentei primeiro um
partials/navbar.htmlviafetch, mas o Live Server injeta o script de live-reload no HTML buscado, o que corrompia o fragmento (derrubava o menu mobile). A abordagem de template em JS evita isso e funciona no Live Server, no GitHub Pages e até emfile://.Resultado
faq.htmlecodigo-conduta.htmltinham cópias antigas da navbar (sem chevron no Evento e sem link "Vagas").Testado (Live Server, desktop e mobile)
Nas três páginas:
#...na home,index.html#...nas subpáginas; links de página inalterados.Fixes #34