Compare commits

..

2 commits

4 changed files with 109 additions and 5 deletions

View file

@ -48,7 +48,6 @@ in
proxyPass = "http://${config.services.ntfy-sh.settings.listen-http}"; proxyPass = "http://${config.services.ntfy-sh.settings.listen-http}";
extraConfig = '' extraConfig = ''
client_max_body_size 0; # Stream request body to backend client_max_body_size 0; # Stream request body to backend
add_header Access-Control-Allow-Origin https://ntfy.sh;
''; '';
}; };
@ -62,9 +61,8 @@ in
proxyPass = "http://${config.services.ntfy-sh.settings.listen-http}"; proxyPass = "http://${config.services.ntfy-sh.settings.listen-http}";
extraConfig = '' extraConfig = ''
client_max_body_size 0; # Stream request body to backend client_max_body_size 0; # Stream request body to backend
add_header Access-Control-Allow-Origin https://ntfy.sh;
limit_except GET { limit_except GET OPTIONS {
deny all; deny all;
} }

View file

@ -13,6 +13,7 @@
rustPlatform, rustPlatform,
wasm-bindgen-cli_0_2_100, wasm-bindgen-cli_0_2_100,
binaryen, binaryen,
inkscape,
mkShell, mkShell,
clangStdenv, clangStdenv,
@ -134,12 +135,36 @@ let
}); });
}; };
icons = stdenvNoCC.mkDerivation (drv: {
pname = "tlaternet-icons";
version = "1.0";
src = ./public/icon.svg;
dontUnpack = true;
nativeBuildInputs = [
inkscape
];
buildPhase = ''
inkscape -w 48 -h 48 $src --export-filename=favicon-48.png
'';
installPhase = ''
mkdir -p $out
cp $src $out/icon.svg
cp favicon-48.png $out/
'';
});
assets = symlinkJoin { assets = symlinkJoin {
name = "assets-${cargoMetadata.package.name}"; name = "assets-${cargoMetadata.package.name}";
paths = [ paths = [
sass-dependencies.fontsource-arimo.assets sass-dependencies.fontsource-arimo.assets
sass-dependencies.fontsource-nunito.assets sass-dependencies.fontsource-nunito.assets
other-dependencies.hack-font other-dependencies.hack-font
icons
]; ];
}; };

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="260.000000pt"
height="260.000000pt"
viewBox="0 0 260.000000 260.000000"
preserveAspectRatio="xMidYMid meet"
id="svg70"
sodipodi:docname="icon.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
<metadata
id="metadata76">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs74" />
<sodipodi:namedview
inkscape:pagecheckerboard="true"
inkscape:document-rotation="0"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1916"
inkscape:window-height="1059"
id="namedview72"
showgrid="false"
inkscape:zoom="2.2269231"
inkscape:cx="173.33333"
inkscape:cy="173.33333"
inkscape:window-x="-2"
inkscape:window-y="13"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Background">
<rect
style="fill:#99d1ce;stroke-width:0.75;fill-opacity:1"
id="rect843"
width="260"
height="260"
x="2.0117849e-08"
y="2.0117849e-08" />
</g>
<path
style="fill:#0f0f0f;fill-opacity:1;stroke:#991dce;stroke-width:0.1"
id="path62"
d="M 2.0117848e-8,130 V 260 H 130 260 V 130 2.0117848e-8 H 130 2.0117848e-8 Z M 132.5,19.099999 c 1.4,1.300001 2,3.6 2.3,8.300001 l 0.4,6.4 8.2,0.699999 C 160.7,35.9 177.9,40.300001 182.89999,44.600002 188.9,49.6 189.1,58.399998 183.3,62.999999 180,65.6 176.6,65.5 161.7,62.499998 155,61.199999 145.99999,59.8 141.79999,59.399999 l -7.8,-0.700001 V 85.7 v 27 L 147,116.9 c 34.8,11.2 49.4,24.6 50.69999,46.39999 C 198.7,178 194.8,188.9 184.79999,199.5 174.6,210.4 162.6,216.5 144.89999,219.6 l -9.69999,1.7 -0.4,7.5 c -0.3,6.29999 -0.7,7.69999 -2.7,9.29999 -3.5,2.8 -8.5,2.5 -11,-0.69999 -1.7,-2.10001 -2.1,-4.1 -2.1,-9.4 v -6.7 l -7.1,-0.70001 c -8.8,-0.79999 -23.900001,-4 -34.400001,-7.3 -10.300001,-3.3 -15.5,-7.99999 -15.5,-14 0,-5.59999 3.5,-10.49999 8.2,-11.7 2.999999,-0.8 5.4,-0.39999 12.500002,1.7 C 93.099998,192.5 103,194.59999 112.3,195.5 l 6.7,0.7 v -29.1 c 0,-22.50001 -0.3,-29.20001 -1.20001,-29.5 C 93.099998,130.3 81.199997,124.9 72.900001,117.3 58.5,103.9 54.800001,82.499998 63.699999,64.300001 70.999998,49.399999 91.399998,37.199999 113.4,34.499999 L 119,33.8 v -5.7 c 0,-10.400001 7.1,-15.1 13.5,-9.000001 z" />
<path
style="fill:#0f0f0f;stroke:#991dce;stroke-width:0.1;fill-opacity:1"
id="path64"
d="m 113.2,60.6 c -18.4,4.7 -25.8,18.1 -17.7,32 1.3,2.2 4,5.3 6,6.8 3.7,2.9 16.4,9 17.1,8.3 0.3,-0.2 0.3,-11.2 0.2,-24.4 l -0.3,-24 z" />
<path
style="fill:#0f0f0f;stroke:#991dce;stroke-width:0.1;fill-opacity:1"
id="path66"
d="m 134,169.1 v 26.2 l 4.4,-0.5 c 9.6,-1.1 21.1,-8.9 24.2,-16.4 1.9,-4.6 1.7,-12.1 -0.5,-16.9 -2.6,-5.7 -10,-11.8 -18.6,-15.4 -4,-1.7 -7.8,-3.1 -8.4,-3.1 -0.8,0 -1.1,8.2 -1.1,26.1 z" />
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -1,8 +1,8 @@
use leptos::prelude::*; use leptos::prelude::*;
use leptos_meta::{MetaTags, Stylesheet, provide_meta_context}; use leptos_meta::{provide_meta_context, MetaTags, Stylesheet};
use leptos_router::{ use leptos_router::{
StaticSegment,
components::{Route, Router, Routes}, components::{Route, Router, Routes},
StaticSegment,
}; };
mod homepage; mod homepage;
@ -17,6 +17,9 @@ pub fn shell(options: LeptosOptions) -> impl IntoView {
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" data-theme="dark"> <html lang="en" data-theme="dark">
<head> <head>
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
<link rel="icon" type="image/png" href="/favicon-48.png" sizes="48x48" />
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="author" content="Tristan Daniël Maat" /> <meta name="author" content="Tristan Daniël Maat" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />