diff --git a/docs/src/lib/components/ThemeCustomizer.svelte b/docs/src/lib/components/ThemeCustomizer.svelte new file mode 100644 index 000000000..3c628fc71 --- /dev/null +++ b/docs/src/lib/components/ThemeCustomizer.svelte @@ -0,0 +1,498 @@ + + + + + Click Color Circles to Set Theme: + + + {#each Object.keys(defaultStyling) as target} + + + updateThemes(e, target)} + /> + + {target} : {defaultStyling[target]} + + {/each} + + + + await copyStylingConfig()}> Copy Styling Config + + + + + handleBackdrop()} bind:checked /> + + + Disabled Backdrop for Styling + + + + + + + Enter your website url or drag and drop a screenshot to preview web3-onboard on your site + + + + + Preview On Your Website + Reset + {!!$wallets$ && $wallets$.length ? 'Disconnect Wallet' : 'Connect Wallet'} + + + + + Drag and drop an image here to preview + + + + + + diff --git a/docs/src/lib/components/index.ts b/docs/src/lib/components/index.ts index 4bd9babec..6fa4e9b35 100644 --- a/docs/src/lib/components/index.ts +++ b/docs/src/lib/components/index.ts @@ -1,2 +1,3 @@ export * from './examples' export { default as NavBar } from './NavBar.svelte' +export { default as ThemeCustomizer } from './ThemeCustomizer.svelte' diff --git a/docs/src/routes/__layout-kit-docs.svelte b/docs/src/routes/__layout-kit-docs.svelte index 0df338da2..1a31f5672 100644 --- a/docs/src/routes/__layout-kit-docs.svelte +++ b/docs/src/routes/__layout-kit-docs.svelte @@ -6,7 +6,8 @@ '/': '/', '/docs': '/docs', '/faq': '/faq', - '/examples': '/examples' + '/examples': '/examples', + '/theming': '/theming' } }) diff --git a/docs/src/routes/docs/[...4]packages/core.md b/docs/src/routes/docs/[...4]packages/core.md index b7c0f7991..a317df5e2 100644 --- a/docs/src/routes/docs/[...4]packages/core.md +++ b/docs/src/routes/docs/[...4]packages/core.md @@ -964,6 +964,11 @@ The Onboard styles can customized via [CSS variables](https://developer.mozilla. --notify-onboard-main-padding } ``` +### Theming + +Interested in seeing what your site would look like with web3-onboard styled o fit your application? + +[Try out our theming tool](https://onboard.blocknative.com/theming) that not only allows you to drop a screenshot or enter your sites web address to see how web3-onboard looks on your site but also style web3-onboard and match your sites look and feel. You can then copy the theme configuration, add it to your site's main css file and you will have onboard themed specifically for your application. ## Build Environments diff --git a/docs/src/routes/theming/__layout@homepage.svelte b/docs/src/routes/theming/__layout@homepage.svelte new file mode 100644 index 000000000..de0058d5e --- /dev/null +++ b/docs/src/routes/theming/__layout@homepage.svelte @@ -0,0 +1,3 @@ + + + diff --git a/docs/src/routes/theming/index.md b/docs/src/routes/theming/index.md new file mode 100644 index 000000000..86689637f --- /dev/null +++ b/docs/src/routes/theming/index.md @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 109165e31..eb14c09ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2516,6 +2516,34 @@ dependencies: "@walletconnect/window-getters" "^1.0.0" +"@web3-onboard/common@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@web3-onboard/common/-/common-2.2.2.tgz#abef8ca861835ab00e5b4641462de2c3db73fc89" + integrity sha512-04Y2Fryiu48nW27dgAtYmPugdhYbeIZq4HM1wsqRftQjgyEWnsam3YyeKRWBABa5iTsE2a/Fo4LofuBG5RMVYw== + dependencies: + bignumber.js "^9.1.0" + ethers "5.5.4" + joi "^17.4.2" + +"@web3-onboard/core@^2.6.0-alpha.1": + version "2.8.3" + resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.8.3.tgz#e41c3e11b5a38d7b5e2ee15d4dc2cf49307d38c5" + integrity sha512-3CKc33dKqC9jurbf0+7mfvddBJgvCU4n9ADu68XlmCws3xP8Gq1nji4Y/AEUqcfhfdPWno6vIgc/j1cYseCIhw== + dependencies: + "@web3-onboard/common" "^2.2.2" + bignumber.js "^9.0.0" + bnc-sdk "^4.4.1" + bowser "^2.11.0" + ethers "5.5.3" + eventemitter3 "^4.0.7" + joi "17.6.0" + lodash.merge "^4.6.2" + lodash.partition "^4.6.0" + nanoid "^4.0.0" + rxjs "^7.5.2" + svelte "^3.49.0" + svelte-i18n "^3.3.13" + "@web3auth/base-plugin@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@web3auth/base-plugin/-/base-plugin-1.0.1.tgz#1e2a87acf745299fdff6f92e6c46ee9bc38aa670" @@ -3277,6 +3305,11 @@ bignumber.js@^9.0.0, bignumber.js@^9.0.1, bignumber.js@^9.0.2: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== +bignumber.js@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" + integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -9609,6 +9642,11 @@ svelte@^3.31.2, svelte@^3.42.5, svelte@^3.46.4: resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.46.4.tgz#0c46bc4a3e20a2617a1b7dc43a722f9d6c084a38" integrity sha512-qKJzw6DpA33CIa+C/rGp4AUdSfii0DOTCzj/2YpSKKayw5WGSS624Et9L1nU1k2OVRS9vaENQXp2CVZNU+xvIg== +svelte@^3.49.0: + version "3.50.1" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.50.1.tgz#b35fbc5e79ddd71e8bb27c3149ee6ff903841239" + integrity sha512-bS4odcsdj5D5jEg6riZuMg5NKelzPtmsCbD9RG+8umU03TeNkdWnP6pqbCm0s8UQNBkqk29w/Bdubn3C+HWSwA== + swarm-js@^0.1.40: version "0.1.40" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99"