From 1ab3d71d6fb0749c05bed9cd43a3ecc8973ff8bd Mon Sep 17 00:00:00 2001 From: Hubert Van De Walle Date: Tue, 5 May 2020 22:03:19 +0200 Subject: [PATCH] Improve performance --- caddy/Caddyfile | 4 ++-- frontend/assets/main.css | 11 +++++++++++ frontend/components/LoginForm.vue | 8 ++++++-- frontend/components/Navbar.vue | 6 +++++- frontend/components/RegisterForm.vue | 13 +++++++++---- frontend/nuxt.config.js | 1 + frontend/package.json | 1 + frontend/pages/account.vue | 4 +++- frontend/pages/notes.vue | 10 +++++++--- .../static/fonts/roboto-v20-latin-regular.woff | Bin 0 -> 20268 bytes .../static/fonts/roboto-v20-latin-regular.woff2 | Bin 0 -> 15736 bytes frontend/yarn.lock | 5 +++++ 12 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 frontend/static/fonts/roboto-v20-latin-regular.woff create mode 100644 frontend/static/fonts/roboto-v20-latin-regular.woff2 diff --git a/caddy/Caddyfile b/caddy/Caddyfile index a6a1958..09880e7 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -24,12 +24,12 @@ localhost { } route /* { - reverse_proxy http://localhost:3000 + file_server } handle_errors { rewrite @404 /404.html - reverse_proxy http://localhost:3000 + file_server } route /api/* { diff --git a/frontend/assets/main.css b/frontend/assets/main.css index 0e5f910..d92c42a 100644 --- a/frontend/assets/main.css +++ b/frontend/assets/main.css @@ -1,3 +1,14 @@ +/* roboto-regular - latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), + url('/fonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('/fonts/roboto-v20-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + + .page-enter-active, .page-leave-active { transition: opacity .5s; } diff --git a/frontend/components/LoginForm.vue b/frontend/components/LoginForm.vue index 66c0a7a..d12c903 100644 --- a/frontend/components/LoginForm.vue +++ b/frontend/components/LoginForm.vue @@ -7,7 +7,7 @@ :rules="usernameRules" label="Username" required - prepend-icon="mdi-account" + :prepend-icon="mdiAccount" > @@ -35,9 +35,13 @@