diff --git a/Dockerfile b/Dockerfile index f5bcc24..caf31aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ FROM denoland/deno:debian WORKDIR /app RUN mkdir -p /usr/share/fonts/truetype/inconsolata -COPY stuff/Inconsolata-Bold.otf /usr/share/fonts/truetype/inconsolata +COPY static/font/Inconsolata-Bold.otf /usr/share/fonts/truetype/inconsolata RUN apt update && apt install -y file procps figlet fortune cowsay pslist inkscape imagemagick --no-install-recommends && rm -rf /var/lib/apt/lists/* diff --git a/src/server.deno.ts b/src/server.deno.ts index 78f2bab..a8a70c9 100644 --- a/src/server.deno.ts +++ b/src/server.deno.ts @@ -171,7 +171,7 @@ async function handleEvent(e: RequestEvent): Promise { }); } - const resp = await serveDir(e.request, { fsRoot: "static", quiet: true }); + const resp = await serveDir(e.request, { fsRoot: "static", quiet: true, enableCors: true }); if (![200, 301, 304].includes(resp.status)) { if (resp.status !== 404) console.error(resp); diff --git a/src/tg/init.deno.ts b/src/tg/init.deno.ts index d7ce0e4..f9649be 100644 --- a/src/tg/init.deno.ts +++ b/src/tg/init.deno.ts @@ -119,7 +119,7 @@ async function domeny() { resp2 = await resp2; const data2 = await resp2.json() as any; - if (data2.daily.temperature_2m_max[0] > 3e1) { + while (data2.daily.temperature_2m_max[0] > 3e1) { await tgCall( { chat_id: MAIN_CHAT_ID, @@ -128,6 +128,7 @@ async function domeny() { }, "sendSticker", ); + data2.daily.temperature_2m_max[0] -= 5e0; } } diff --git a/stuff/Inconsolata-Bold.otf b/static/font/Inconsolata-Bold.otf similarity index 100% rename from stuff/Inconsolata-Bold.otf rename to static/font/Inconsolata-Bold.otf diff --git a/static/font/Inconsolata-Bold.woff2 b/static/font/Inconsolata-Bold.woff2 new file mode 100644 index 0000000..f567109 Binary files /dev/null and b/static/font/Inconsolata-Bold.woff2 differ diff --git a/static/logo.svg b/static/logo.svg index fcc74c9..cc6322e 100644 --- a/static/logo.svg +++ b/static/logo.svg @@ -10,6 +10,13 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> +