From 0af094770c4ebabc56ff761a8bd215bc397c0f7e Mon Sep 17 00:00:00 2001 From: João Augusto Costa Branco Marado Torres Date: Tue, 5 Aug 2025 18:50:37 +0100 Subject: refactor: reading page review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Augusto Costa Branco Marado Torres --- src/components/signature/Downloads.astro | 63 -------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/components/signature/Downloads.astro (limited to 'src/components/signature/Downloads.astro') diff --git a/src/components/signature/Downloads.astro b/src/components/signature/Downloads.astro deleted file mode 100644 index 3497b37..0000000 --- a/src/components/signature/Downloads.astro +++ /dev/null @@ -1,63 +0,0 @@ ---- -import { gitDir } from "@lib/git"; -import { get } from "@utils/anonymous"; - -interface Props { - lang: string; -} - -const { lang } = Astro.props; - -let source = new URL( - `${Astro.url.href.replace(/\/$/, "")}.md`, -); - -const dir = await gitDir(); - -const format: Intl.NumberFormatOptions = { - notation: "compact", - style: "unit", - unit: "byte", - unitDisplay: "narrow", -}; - -const formatter = new Intl.NumberFormat(lang, format); - -const sourceSize = formatter.format( - await Deno.stat( - new URL("public" + source.pathname, dir), - ).then(get("size")), -); -const sig = await Deno.stat( - new URL("public" + source.pathname + ".sig", dir), -).then(get("size")).catch(() => undefined); -const sigSize = formatter.format(sig); ---- - -
-

Ficheiros para descarregar:

-
-
Blog post
-
- text/markdown, {sourceSize} -
- { - sig && ( -
Assinatura digital
-
- application/pgp-signature, {sigSize} -
- ) - } -
-
-- cgit v1.2.3