diff options
Diffstat (limited to 'src/components/Footer.astro')
-rw-r--r-- | src/components/Footer.astro | 125 |
1 files changed, 85 insertions, 40 deletions
diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 11c62c4..c3dffca 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,62 +1,107 @@ --- +import { env } from "@lib/env"; +const { + PUBLIC_GIT_URL, + PUBLIC_TOR_URL, + PUBLIC_GIT_TOR_URL, + PUBLIC_SIMPLE_X_ADDRESS, +} = env; +const isOnion = Astro.url.origin.endsWith(".onion"); +const site = isOnion ? PUBLIC_TOR_URL : Astro.site; +const git = isOnion ? PUBLIC_GIT_TOR_URL ?? PUBLIC_GIT_URL : PUBLIC_GIT_URL; --- -<footer> +<footer class="small"> + { + !isOnion && PUBLIC_TOR_URL && ( + <p class="mute"> + Disponível também em: <a class="tor" href={PUBLIC_TOR_URL}>{ + PUBLIC_TOR_URL + }</a> + </p> + ) + } <address> - Sítio web de <a href={Astro.site} target="_blank" rel="author" - >João Augusto Costa Branco Marado Torres</a> + <p> + Sítio web de <a href={site} target="_blank" rel="author" + >João Augusto Costa Branco Marado Torres</a> + </p> + { + PUBLIC_SIMPLE_X_ADDRESS && ( + <p> + Contacte-me através do <a href={PUBLIC_SIMPLE_X_ADDRESS}>SimpleX</a>! + </p> + ) + } </address> - <section id="copying"> - <h2>Licença de <span lang="en">Software</span></h2> + <p> + Isto é <abbr title="Free Libre and Open Source Software">FLOSS</abbr>, <a + href={git} + >usa as tuas liberdades</a> + </p> + <section id="copying" class="mute"> + <h2 class="sr-only">Licença de <span lang="en">Software</span></h2> <div lang="en"> <p> - <small> - <<a href="/" hreflang="pt-PT">cravodeabril.pt</a>> Copyright - © 2025 João Augusto Costa Branco Marado Torres - </small> + <<a href="/" hreflang="pt-PT">cravodeabril.pt</a>> Copyright + © 2025 João Augusto Costa Branco Marado Torres </p> <p> - <small> - This program is free software: you can redistribute it and/or modify - it under the terms of the <a - href="https://www.gnu.org/licenses/agpl-3.0.html" - target="_blank" - rel="external license" - >GNU Affero General Public License</a> as published by the Free - Software Foundation, either version 3 of the License, or (at your - option) any later version. - </small> + This program is free software: you can redistribute it and/or modify it + under the terms of the <a + href="https://www.gnu.org/licenses/agpl-3.0.html" + target="_blank" + rel="external license" + >GNU Affero General Public License</a> as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any + later version. </p> <p> - <small> - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Affero General Public License for more details. - </small> + This program is distributed in the hope that it will be useful, but + <strong>without any warranty</strong>; without even the implied warranty + of + <strong>merchantability</strong> or <strong>fitness for a particular + purpose</strong>. See the GNU Affero General Public License for more + details. </p> <p> - <small> - You should have received a copy of the GNU Affero General Public - License along with this program. If not, see <a - href="https://www.gnu.org/licenses/" - target="_blank" - rel="external" - >https://www.gnu.org/licenses</a> - </small> + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <a + href="https://www.gnu.org/licenses/" + target="_blank" + rel="external" + >https://www.gnu.org/licenses</a> </p> </div> </section> <nav> <ul> - <li><a>Código de Conduta</a></li> - <li><a>Declaração de Exoneração de Responsabilidade</a></li> - <li><a>Aviso sobre cookies</a></li> - <li><a>Declaração de acessibilidade</a></li> - <li><a>Apoio</a></li> - <li><a>Contacto</a></li> - <li><a>Código fonte</a></li> + <li><a href="/">Código de Conduta</a></li> + <li><a href="/">Declaração de Exoneração de Responsabilidade</a></li> + <li><a href="/">Aviso sobre cookies</a></li> + <li><a href="/">Declaração de acessibilidade</a></li> + <li><a href="/">Apoio</a></li> </ul> </nav> </footer> + +<style> + footer { + border-block-start: 1px solid var(--color-light); + padding-block-start: calc(var(--size-4) * 1em); + } + + .tor { + word-wrap: break-word; + } + + nav > ul { + display: flex; + flex-direction: column; + gap: calc(var(--size-1) * 1em); + & > li { + padding-block: calc(var(--size-1) * 1em); + } + } +</style> |