Skip to content

Commit 5a7864f

Browse files
Merge branch 'develop'
2 parents 9d06e69 + 730e6ec commit 5a7864f

File tree

27 files changed

+69
-33
lines changed

27 files changed

+69
-33
lines changed

.nojekyll

Whitespace-only changes.

CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,29 @@
1111
## Building
1212
1. `npm install`
1313
1. run hugo
14-
* for production simply run `hugo`
15-
* for local development run `HUGO_ENV=development hugo server`
14+
* for production builds simply run `npm run build`
15+
* for local development run `npm run dev`
16+
* for local production tests `npm run serve`
17+
18+
## Optional Dependencies for Size Optimizations
19+
20+
### Font Subsets
21+
To create subsets of font files, e.g. when we know only very few characters are required to render the title of the page "CRYPTOMATOR HUB":
22+
23+
1. First install `pip install fonttools brotli`
24+
2. `pyftsubset quicksand-bold.woff2 --text="CRYPTOMATOR HUB" --verbose --flavor=woff2 --output-file=quicksand-bold.reduced.woff2`
25+
26+
### Image Conversions
27+
Using WebP (for smaller images) or AVIF (for >80 kiB due to larger overhead) may yield in better compression. [Here](https://www.reddit.com/r/AV1/comments/aabqdc/lossless_compression_test_png_vs_webp_vs_avif/) is a (rather old) comparison benchmark. However, we need to test the best format ourselves.
28+
29+
* `brew install libavif` (see [GitHub Project Page](https://github.com/AOMediaCodec/libavif?tab=readme-ov-file#installation) for other installation methods)
30+
* Example (lossless): `avifenc -l input.png output.avif`
31+
* Example (lossy): `avifenc --qcolor 70 --qalpha 100 --depth 8 input.png output.avif`
32+
* `brew install libwebm`
33+
* Example (lossless): `cwebp -preset drawing -lossless -z 6 input.png -o output.webp`
34+
* Example (lossy): `cwebp -preset drawing -q 90 -alpha_q 100 input.png -o output.webp`
35+
* `brew install optipng`
36+
* Example: `optipng -o3 image.png`
37+
38+
> [!TIP]
39+
> If you see color banding in lossy conversions, try avif with 10 bit color depth.

assets/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* custom classes: */
22
.header-bg {
3-
background-image: url(/img/home/header-background.png), linear-gradient(to bottom, #0b0f17 0%, #143454 38%, #3f8bd9 72%, #9ac7f5 90%);
3+
background-image: url(/img/home/header-background.avif), linear-gradient(to bottom, rgb(4.31% 5.88% 9.02%) 0%, rgb(7.84% 20.39% 32.94%) 38%, rgb(24.71% 54.51% 85.1%) 72%, rgb(60.39% 78.04% 96.08%) 90%);
44
background-size: auto 100%;
55
}
66

content/_index.de.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h2>Wie schützt Cryptomator deine Daten?</h2>
6969
<article class="prose prose-sm md:prose max-w-none md:max-w-none">
7070
<h2>Optimaler Schutz dank neuesten Technologie-Standards</h2>
7171
<figure class="mx-auto md:w-5/6 lg:w-2/3">
72-
<img data-src="/de/img/home/split-screenshots.png" class="lazyload aspect-[1664/975] w-full" alt="Gegenüberstellung von verschlüsselten und entschlüsselten Daten in einem Cryptomator-Tresor"/>
72+
<img data-src="/de/img/home/split-screenshots.avif" class="lazyload aspect-[1664/975] w-full" alt="Gegenüberstellung von verschlüsselten und entschlüsselten Daten in einem Cryptomator-Tresor"/>
7373
<figcaption>Schaut jemand in den Ordner in deiner Cloud, kann er keinerlei Rückschlüsse auf deine Daten ziehen.</figcaption>
7474
</figure>
7575
</article>

content/_index.en.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h2>How does Cryptomator protect your data?</h2>
6969
<article class="prose prose-sm md:prose max-w-none md:max-w-none">
7070
<h2>Optimal protection thanks to the latest technology standards</h2>
7171
<figure class="mx-auto md:w-5/6 lg:w-2/3">
72-
<img data-src="/img/home/split-screenshots.png" class="lazyload aspect-[1664/975] w-full" alt="Comparison of encrypted and decrypted data in a Cryptomator vault"/>
72+
<img data-src="/img/home/split-screenshots.avif" class="lazyload aspect-[1664/975] w-full" alt="Comparison of encrypted and decrypted data in a Cryptomator vault"/>
7373
<figcaption>If someone looks into the folder in your cloud, they cannot draw any conclusions about your data.</figcaption>
7474
</figure>
7575
</article>

layouts/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1>Sorry, the page you were looking for was not found.</h1>
1212
</div>
1313
{{ end }}
1414
{{ define "script" }}
15-
{{ if hugo.IsServer }}
15+
{{ if hugo.IsDevelopment }}
1616
{{ $404Js := resources.Get "js/404.js" }}
1717
<script type="text/javascript" src="{{ $404Js.RelPermalink }}" defer></script>
1818
{{ else }}

layouts/_default/baseof.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>{{ .Title }}</title>
7+
{{ block "preloads" . }}
8+
<!-- optional additional page-specific preloads -->
9+
{{ end }}
10+
<link rel="preload" fetchpriority="low" as="image" href="favicon.ico" type="image/x-icon">
11+
<link rel="preload" fetchpriority="low" as="image" href="img/logo.svg" type="image/svg+xml">
12+
<link rel="preload" fetchpriority="low" href="/webfonts/fa-brands-400.woff2" as="font" type="font/woff2" crossorigin="anonymous">
13+
<link rel="preload" fetchpriority="low" href="/webfonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin="anonymous">
714
{{ if and (eq .Section "blog") .IsPage }}
815
<meta name="description" content="{{ .Summary }}">
916
<meta property="og:title" content="{{ .Title }}">
@@ -51,7 +58,7 @@
5158
<meta property="og:locale:alternate" content="{{ .Language.Params.LanguageCode }}" />
5259
{{ end }}
5360
<meta name="apple-itunes-app" content="app-id=1560822163">
54-
{{ if hugo.IsServer }}
61+
{{ if hugo.IsDevelopment }}
5562
{{ $css := resources.Get "css/main.css" | postCSS }}
5663
<link rel="stylesheet" href="{{ $css.RelPermalink }}" media="screen" />
5764
{{ else }}
@@ -62,9 +69,6 @@
6269
{{ range .Translations }}
6370
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .RelPermalink }}" />
6471
{{ end }}
65-
{{ block "head" . }}
66-
<!-- optional additional page-specific stuff that goes into head -->
67-
{{ end }}
6872
</head>
6973
<body x-data="{ isNavOpen: false, globalData: { githubStargazers: null } }" x-init="determineGitHubStargazersCount('{{ .Site.Language.Lang }}', globalData)" :class="isNavOpen && 'overflow-hidden'" class="bg-dark font-body text-gray-900">
7074
{{ partial "nav.html" . }}
@@ -76,7 +80,7 @@
7680
{{ end }}
7781
</div>
7882
{{ partial "footer.html" . }}
79-
{{ if hugo.IsServer }}
83+
{{ if hugo.IsDevelopment }}
8084
<script data-domain="cryptomator.local" src="https://plausible.skymatic.de/js/script.file-downloads.hash.outbound-links.tagged-events.local.js" integrity="sha384-eSdyNyMq4w2Hzeb7A3pkbi2+zvI/skXuKlWsX5uzccigZEHDhHyBYoTASuSW+ZUQ" crossorigin="anonymous" defer></script>
8185
{{ $baseJs := resources.Get "js/base.js" }}
8286
<script type="text/javascript" src="{{ $baseJs.RelPermalink }}" defer></script>

layouts/android/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h3 id="keyrecovery" class="font-headline text-xl md:text-2xl leading-relaxed mb
4747
</section>
4848
{{ end }}
4949
{{ define "script" }}
50-
{{ if hugo.IsServer }}
50+
{{ if hugo.IsDevelopment }}
5151
{{ $storeJs := resources.Get "js/store.js" }}
5252
<script type="text/javascript" src="{{ $storeJs.RelPermalink }}" defer></script>
5353
{{ $keyRecoveryJs := resources.Get "js/keyrecovery.js" }}

layouts/blog/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ <h1><a href="{{ .Parent.RelPermalink }}">{{ .Parent.Title }}</a> / {{ .Title }}<
5757
{{ end }}
5858
{{ end }}
5959
{{ if gt (len $discourseEmbedUrl) 0 }}
60-
{{ if hugo.IsServer }}
60+
{{ if hugo.IsDevelopment }}
6161
{{ $discourseJs := resources.Get "js/discourse.js" }}
6262
<script type="text/javascript" src="{{ $discourseJs.RelPermalink }}" x-url="{{ $discourseEmbedUrl }}" defer></script>
6363
{{ else }}

0 commit comments

Comments
 (0)