1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Don't use SVG for the hidden service

The Tor Browser's "safest" mode blocks SVG rendering, but the browser
doesn't download or use any fallback images because of fingerprinting
concerns.
This commit is contained in:
Rohan Kumar 2022-03-08 19:12:25 -08:00
parent 5d685d2ce6
commit 90344bc451
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 5 additions and 1 deletions

View file

@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://seirdy.one{{ .RelPermalink }}" rel="canonical">
<link href="https://seirdy.one/webmentions/receive" rel="webmention">
{{- if and (eq .Site.BaseURL "https://seirdy.one/") (eq .Site.BaseURL "http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/") -}}
{{- if or (eq .Site.BaseURL "https://seirdy.one/") (eq .Site.BaseURL "http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/") -}}
<!-- IDC how much content is extracted from my pages, go knock yourself out. huge images, long snippets, whatever. -->
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1">
{{- end }}

View file

@ -2,8 +2,12 @@
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
{{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
{{- $favicon_bigpng := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}
{{- if (ne .Site.BaseURL "http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/") -}}
<picture itemprop="image" class="u-photo photo">
<source srcset="{{ $favicon_svg.RelPermalink }}" type="image/svg+xml">
{{- end -}}
<img src="data:image/png;base64,{{ $favicon_base64 }}" width="16" height="16" alt=""
srcset="{{ $favicon_bigpng.RelPermalink }} 2x">
{{- if (ne .Site.BaseURL "http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/") -}}
</picture>
{{- end -}}