From cd1675098fd0055136b69578bed265ce783861ff Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 14 Jun 2023 14:54:27 +0100 Subject: [PATCH] removing need for external internet assets and self hosting our own fonts --- packages/builder/index.html | 7 ++++--- packages/builder/package.json | 2 ++ packages/builder/public/bblogoimgur.png | Bin 0 -> 4612 bytes .../builder/src/pages/builder/Branding.svelte | 4 ++-- .../onboarding/_components/ExampleApp.svelte | 2 +- packages/builder/vite.config.js | 13 +++++++++++++ .../client/src/components/app/Layout.svelte | 2 +- .../app/deprecated/Navigation.svelte | 2 +- .../static/templates/BudibaseApp.svelte | 17 ++++++----------- .../controllers/static/templates/preview.hbs | 14 ++++---------- 10 files changed, 34 insertions(+), 29 deletions(-) create mode 100644 packages/builder/public/bblogoimgur.png diff --git a/packages/builder/index.html b/packages/builder/index.html index 96abc8e582..02743a383b 100644 --- a/packages/builder/index.html +++ b/packages/builder/index.html @@ -5,9 +5,10 @@ Budibase - - + + + + diff --git a/packages/builder/package.json b/packages/builder/package.json index 73bc003343..a2567dc638 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -70,6 +70,7 @@ "@codemirror/state": "^6.2.0", "@codemirror/theme-one-dark": "^6.1.2", "@codemirror/view": "^6.11.2", + "@fontsource/source-sans-pro": "^5.0.3", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", @@ -122,6 +123,7 @@ "tsconfig-paths": "4.0.0", "typescript": "4.7.3", "vite": "^3.0.8", + "vite-plugin-static-copy": "^0.16.0", "vitest": "^0.29.2" }, "nx": { diff --git a/packages/builder/public/bblogoimgur.png b/packages/builder/public/bblogoimgur.png new file mode 100644 index 0000000000000000000000000000000000000000..5ff80d25cd9fe70188def8e7b1b25f6eff946e23 GIT binary patch literal 4612 zcmc&Y_ahuk)2EA^?ul|*5M78KUGyjsPV`QcL<^^!<3#k{<;f|D7ETG_h~9g&;M5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n$ zoS(mcas4A&`W+Y%o>iKfnVV=_q|-StV!R`o-FP!Ta`2~B;TMEI;5fsLL1G=gKfoy4 zNI~ie$zJfH<+jC*eoAcK>J?&;fpHla)Xc>E_C=T7G8tMU!nHGF#97X9=dP0@Lm=iP ztmIO1Rk~OD#mZvH+`u5_-)edr<85~x21TYEau8C+>h-!Z?4?}`{SLU~ACn#Xw;CE6 zh;KX=W@gY{jGKyVO($*QxrT#-wA?)Ajf9?;*1ccj@a~NAxum3zg0SIz^$60a1vz=p za{J?KY8segXed6_Xbm5e_(4c%>3s`J%a>qq+^_GVX&Gt1!DoyPPPsjYw5HS5PQph= zsJSu?A@0n;$hP@Qd3xcG|%I^;jB|C?P$gx=W;$mDHV*2#Cw)SD~rNv*;62q^_ z0S8nRELTHGxpmWIxXj7syxK$+(*FODKZO9>g6l{)kO+Q8rRW7qDn@X!Al}9aHni{a z@IXwc3e->8L1)0$G&$X&d5&F_gGe)NjelId8T3$;%XF5DhsR?$EEL!r_)wJQp5|h` z{m#S7*%$j;^OVV7Oz0e`J@-C5bBY`g1~5;cI5}4OfG1M$dw^f3<{kO0Tldsvh=UvS zP7!La(jrq*g7pA^@l*2=hg|7@aCtvt3SFVKhpJ3!L4AL;xv|yVVUb_#YC-W90PV6s zm;3|<8lCn=$4kw>la?4?o@w)vW)CWKG*%_99Ik%9@*A>)#`w79ZJ`5MWPQu{<#ykH zi;Wr71#ozE29PDQd{;_YFXB>9Q1pFkx>nvw*K)xLm77(mGEu-ERY#pgouu*!3{3Cv ztWHu7n>^Z|Zt9%*A_@)_4`t&{X-*39QF|FdB!0NfOV*3JMq8X?n`g~zw(o020}9Z9 z8-Tx=d88&MSqMI01F%+!&&5v@JfD8x9j|zNEi5L_WVT^H>5Ti`0cfe|sa8C*3H=Y@ CP_=ac literal 0 HcmV?d00001 diff --git a/packages/builder/src/pages/builder/Branding.svelte b/packages/builder/src/pages/builder/Branding.svelte index 142473abb8..a55b92032f 100644 --- a/packages/builder/src/pages/builder/Branding.svelte +++ b/packages/builder/src/pages/builder/Branding.svelte @@ -8,7 +8,7 @@ $: platformTitle = !$auth.user && platformTitleText ? platformTitleText : "Budibase" - $: faviconUrl = $organisation.faviconUrl || "https://i.imgur.com/Xhdt1YP.png" + $: faviconUrl = $organisation.faviconUrl || "/builder/bblogoimgur.png" onMount(async () => { await organisation.init() @@ -27,6 +27,6 @@ {:else} - + {/if} diff --git a/packages/builder/src/pages/builder/portal/apps/onboarding/_components/ExampleApp.svelte b/packages/builder/src/pages/builder/portal/apps/onboarding/_components/ExampleApp.svelte index 0b290decbf..a997e9086c 100644 --- a/packages/builder/src/pages/builder/portal/apps/onboarding/_components/ExampleApp.svelte +++ b/packages/builder/src/pages/builder/portal/apps/onboarding/_components/ExampleApp.svelte @@ -44,7 +44,7 @@
- Budibase Logo + Budibase Logo

{name}

diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index 7227551850..8a26923e1c 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -1,6 +1,7 @@ import { svelte } from "@sveltejs/vite-plugin-svelte" import replace from "@rollup/plugin-replace" import { defineConfig, loadEnv } from "vite" +import { viteStaticCopy } from "vite-plugin-static-copy" import path from "path" const ignoredWarnings = [ @@ -59,6 +60,18 @@ export default defineConfig(({ mode }) => { ), "process.env.SENTRY_DSN": JSON.stringify(process.env.SENTRY_DSN), }), + viteStaticCopy({ + targets: [ + { + src: "../../node_modules/@fontsource/source-sans-pro", + dest: "fonts" + }, + { + src: "../../node_modules/remixicon/fonts/*", + dest: "fonts", + } + ] + }) ], optimizeDeps: { exclude: ["@roxi/routify"], diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index 244500f266..e30fb14955 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -181,7 +181,7 @@