diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index 4d3dd72..3524a0a 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -24,6 +24,22 @@ http { text/javascript mjs; } + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_min_length 256; + gzip_types + text/plain + text/css + text/javascript + application/javascript + application/json + application/xml + image/svg+xml + font/woff2 + application/font-woff2; + server { listen 80; server_name $DOMAIN www.$DOMAIN; @@ -61,6 +77,24 @@ http { ssl_certificate /etc/letsencrypt/live/$DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/$DOMAIN/privkey.pem; + # Vite hashed assets - immutable, cache 1 year + location /assets/ { + expires 1y; + add_header Cache-Control "public, immutable"; + } + + # Fonts - cache 30 days + location /fonts/ { + expires 30d; + add_header Cache-Control "public"; + } + + # Images - cache 7 days + location /img/ { + expires 7d; + add_header Cache-Control "public"; + } + location /uploads/ { alias /uploads/; add_header X-Content-Type-Options nosniff always; diff --git a/nginx/nginx_dev.conf.template b/nginx/nginx_dev.conf.template index ee97491..7fa11e3 100644 --- a/nginx/nginx_dev.conf.template +++ b/nginx/nginx_dev.conf.template @@ -24,6 +24,22 @@ http { text/javascript mjs; } + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_min_length 256; + gzip_types + text/plain + text/css + text/javascript + application/javascript + application/json + application/xml + image/svg+xml + font/woff2 + application/font-woff2; + server { listen 80; server_name $DOMAIN www.$DOMAIN; diff --git a/vue/index.html b/vue/index.html index 62b1046..c7760ba 100644 --- a/vue/index.html +++ b/vue/index.html @@ -5,6 +5,8 @@ AF + + diff --git a/vue/public/fonts/AldotheApache.ttf b/vue/public/fonts/AldotheApache.ttf deleted file mode 100644 index 4328d87..0000000 Binary files a/vue/public/fonts/AldotheApache.ttf and /dev/null differ diff --git a/vue/public/fonts/CreatoDisplay-Bold.otf b/vue/public/fonts/CreatoDisplay-Bold.otf deleted file mode 100644 index 9e283fd..0000000 Binary files a/vue/public/fonts/CreatoDisplay-Bold.otf and /dev/null differ diff --git a/vue/public/fonts/CreatoDisplay-Bold.woff2 b/vue/public/fonts/CreatoDisplay-Bold.woff2 new file mode 100644 index 0000000..7996887 Binary files /dev/null and b/vue/public/fonts/CreatoDisplay-Bold.woff2 differ diff --git a/vue/public/fonts/CreatoDisplay-Regular.otf b/vue/public/fonts/CreatoDisplay-Regular.otf deleted file mode 100644 index 4d470c0..0000000 Binary files a/vue/public/fonts/CreatoDisplay-Regular.otf and /dev/null differ diff --git a/vue/public/fonts/Robot_Font.otf b/vue/public/fonts/Robot_Font.otf deleted file mode 100644 index 35d4105..0000000 Binary files a/vue/public/fonts/Robot_Font.otf and /dev/null differ diff --git a/vue/public/fonts/big_noodle_titling.ttf b/vue/public/fonts/big_noodle_titling.ttf deleted file mode 100644 index 5577c00..0000000 Binary files a/vue/public/fonts/big_noodle_titling.ttf and /dev/null differ diff --git a/vue/public/fonts/big_noodle_titling.woff2 b/vue/public/fonts/big_noodle_titling.woff2 new file mode 100644 index 0000000..f9f3500 Binary files /dev/null and b/vue/public/fonts/big_noodle_titling.woff2 differ diff --git a/vue/public/fonts/m12.ttf b/vue/public/fonts/m12.ttf deleted file mode 100644 index ac4cc8b..0000000 Binary files a/vue/public/fonts/m12.ttf and /dev/null differ diff --git a/vue/src/assets/styles.css b/vue/src/assets/styles.css index 51bec96..3a61402 100644 --- a/vue/src/assets/styles.css +++ b/vue/src/assets/styles.css @@ -33,16 +33,18 @@ /* FONTS */ @font-face { font-family: "big_noodle_titling"; - src: url("/fonts/big_noodle_titling.ttf") format("truetype"); + src: url("/fonts/big_noodle_titling.woff2") format("woff2"); font-weight: normal; font-style: normal; + font-display: swap; } @font-face { font-family: "CreatoDisplay"; - src: url("/fonts/CreatoDisplay-Bold.otf") format("opentype"); + src: url("/fonts/CreatoDisplay-Bold.woff2") format("woff2"); font-weight: normal; font-style: normal; + font-display: swap; } /* END OF FONTS */ diff --git a/vue/src/components/util/CommitHistory.vue b/vue/src/components/util/CommitHistory.vue index 8111e31..598de46 100644 --- a/vue/src/components/util/CommitHistory.vue +++ b/vue/src/components/util/CommitHistory.vue @@ -21,7 +21,7 @@ const { gitFeed: feed, loaded } = storeToRefs(homeData); class="flex-1 flex flex-col overflow-y-auto overflow-x-hidden" >

Last git activity

- User avatar + User avatar

repo: {{ feed.repoName }}

diff --git a/vue/src/components/util/Wip.vue b/vue/src/components/util/Wip.vue index c2d4535..5ea06d4 100644 --- a/vue/src/components/util/Wip.vue +++ b/vue/src/components/util/Wip.vue @@ -1,7 +1,7 @@