summaryrefslogtreecommitdiff
path: root/src/components/Footer.astro
blob: c3dffca7262f3b637277827e65d20c1703f68e25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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 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>
    <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>
  <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>
        &lt;<a href="/" hreflang="pt-PT">cravodeabril.pt</a>&gt; Copyright
        &copy; 2025 João Augusto Costa Branco Marado Torres
      </p>
      <p>
        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>
        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>
        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 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>