Add footer text around data
This commit is contained in:
parent
4e3cb88fbe
commit
a722ab3a99
3 changed files with 16 additions and 8 deletions
|
|
@ -1,9 +1,13 @@
|
|||
const userLang = navigator.language || navigator.userLanguage
|
||||
let lang = userLang.includes('pt') ? 'pt' : 'en'
|
||||
console.log('loaded post-l10n.js', lang)
|
||||
|
||||
if (lang != 'pt') {
|
||||
console.log('post-l10n.js loaded:', lang)
|
||||
|
||||
if (lang == 'pt') {
|
||||
const footer_back = document.getElementById('footer-back-link')
|
||||
console.log(footer_back)
|
||||
footer_back.innerText = 'Back'
|
||||
const author_pre = document.getElementById('author-pre-text')
|
||||
const date_pre = document.getElementById('date-pre-text')
|
||||
footer_back.innerText = 'Voltar'
|
||||
author_pre.innerText = 'Postado por'
|
||||
date_pre.innerText = 'em'
|
||||
}
|
||||
|
|
|
|||
6
posts/scripts-em-ocaml.html
generated
6
posts/scripts-em-ocaml.html
generated
|
|
@ -130,10 +130,12 @@ CSS Theme</a></li>
|
|||
<footer>
|
||||
<hr/>
|
||||
<div class="footer-text">
|
||||
<span class="author">Juno Takano</span>,
|
||||
<span id="author-pre-text">posted by</span>
|
||||
<span class="author">Juno Takano</span>
|
||||
<span id="date-pre-text">on</span>
|
||||
<span class="date">23 de fevereiro de 2024</span>
|
||||
<span class="footer-back" aria-role="nav" aria-label="Navigate back">
|
||||
↩ <a id="footer-back-link" href="../index.html">Voltar</a>
|
||||
↩ <a id="footer-back-link" href="../index.html">Back</a>
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
|||
6
posts/template.html
generated
6
posts/template.html
generated
|
|
@ -66,13 +66,15 @@ $endfor$
|
|||
<footer>
|
||||
<hr/>
|
||||
<div class="footer-text">
|
||||
<span id="author-pre-text">posted by</span>
|
||||
$for(author)$
|
||||
<span class="author">$author$</span>,
|
||||
<span class="author">$author$</span>
|
||||
$endfor$
|
||||
<span id="date-pre-text">on</span>
|
||||
$if(date)$
|
||||
<span class="date">$date$</span>
|
||||
<span class="footer-back" aria-role="nav" aria-label="Navigate back">
|
||||
↩ <a id="footer-back-link" href="../index.html">Voltar</a>
|
||||
↩ <a id="footer-back-link" href="../index.html">Back</a>
|
||||
</span>
|
||||
$endif$
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue