Published:
4 minute view time
This guide largely builds off of the Quick Start Guide https://www.contibase.com/blog/quick-start-guideLink Preview
Keep it simple. Use 1-3 colors and a few shapes. Don't include text in the icon. This will result in better viewing from a distance because it will often be used in small areas such as a browser tab.
Use the Contibase Image Generator https://www.contibase.com/tools/image-generatorLink Preview
Crop into a square icon image with slim padding. Download the image.
Switch to the Contibase Image to SVG https://www.contibase.com/tools/image-to-svg https://affinity.serif.com/en-us/designer/Link Preview
Link Preview
Export your design as an SVG. In the export options select "flatten" if its unchecked. And check viewbox. Optimize your SVG code using SVG Optimizer https://www.contibase.com/tools/svg-optimizerLink Preview
Go to the Favicon Generator https://www.contibase.com/tools/favicon-generatorLink Preview
Download your favicons. Drag all files into the /static folder and overwrite the defaults.
Back in your project in VS Code, update
src/lib/components/Logo/index.svelte
Go to your app.html and paste the generated version from the Favicon Generator.
Go to
src/routes/+layout.svelte
Go to contibase.com/settings and click branding. Use the favicon.webp file for the icon. The for the full logo use full_logo.webp. This will be used at the top of emails you send when toggled on in the page.
Your site uses SvelteKit https://svelte.dev/docs/kit/introduction https://www.sveltekit-ui.comLink Preview
Link Preview
It's kind of experimental at the moment, but for building your components this tool, SvelteKit-UI Code Generator https://www.contibase.com/code_generatorLink Preview
Building "managers" for each component with logic encapsulated within, exposing state and methods, leads to a clean code structure where all logic can be assembled into one parent manager at the root of each +page.svelte. The manager is instantiated on page load in the <script> tag and is passed as a manager prop into the HTML. This avoids "prop drilling" and deeply nested bindings.
You are free to write code in any way you find appealing. You are in charge. I am just sharing the way I've found to make the most sense.
If you havent already, create an account on Vercel https://vercel.comLink Preview
In Vercel connect to your Github account and set your "main" branch to be used in production. Connect your domain name to this deployment. Anytime you push to main you will automatically trigger a build and you will see on your live website a couple minutes later pending no errors.
Vercel Analytics is already configured in the code but you'll need to toggle on that feature in your Vercel Dashboard. You'll also want to copy the environment variables we used in the .env file and paste them in the Vercel project settings in the Environment variables page.
The live version of the code from this tutorial project can be found at Live Github Code https://github.com/upppllc/survivorsnuff https://www.survivorsnuff.comLink Preview
Link Preview
Output Type:
No Chat History