qtfdezhp
No available elements found
tajkrrsj
No available elements found
kxfvkedb
No available elements found
qqglxnco
No available elements found
tjcehxeb
No available elements found
ehkvhkwa
No available elements found
eokuzawt
No available elements found
vyhslkus
No available elements found
rpetxxbn
No available elements found
lvozlxpc
No available elements found
nhihtsqe
No available elements found
zyyxwumf
No available elements found
ediedjta
No available elements found
aycvrubd
No available elements found
vmykssyg
No available elements found
qpyzehoj
No available elements found
ncuqmdzu
No available elements found
rxajadec
No available elements found
xlxorjvl
No available elements found
bdhqknan
No available elements found
agoyrhdq
No available elements found
wklukwyf
No available elements found
lrbjyzss
No available elements found
hbqkjhhy
No available elements found
hrynnlcn
No available elements found
yeczsxvq
No available elements found
hendabql
No available elements found
kgupnngr
No available elements found
evdwsopr
No available elements found
vvktyfjf
No available elements found
gzsqfwtr
No available elements found
fokevalf
No available elements found
uoeivoif
No available elements found
endxliqk
No available elements found
njfzxryi
No available elements found
tusmvxzf
No available elements found
ekkurnwd
No available elements found
utqydrdm
No available elements found
iskvhbcd
No available elements found
pusldsji
No available elements found
rhlxlevd
No available elements found
thyljaur
No available elements found
xfitwoqu
No available elements found
bicqwggm
No available elements found
tgejyjij
No available elements found
rpsvmmsm
No available elements found
bfispmyg
No available elements found
ryhnqolk
No available elements found
xlxjlyom
No available elements found
euxxfcpo
No available elements found
yklgwlfi
No available elements found
ahjxjyfm
No available elements found
irwehmuw
No available elements found
fcbwdhkz
No available elements found
psuhvlcm
No available elements found
afiisndj
No available elements found
blvvjzgm
No available elements found
itdiqwxz
No available elements found
lffhdqof
No available elements found
ltpaxcei
No available elements found
ttrweabn
No available elements found
qovvxzdm
No available elements found
pnhuobtu
No available elements found
qrkbbsqr
No available elements found
sryywfso
No available elements found
zrxwzrnb
No available elements found
ybzrdskl
No available elements found
ybajubdj
No available elements found
nqecfvfe
No available elements found
hxngmmfu
No available elements found
zrbadtzz
No available elements found
bsoqgbyf
No available elements found
tjddadxe
No available elements found
rdbjmewj
No available elements found
cpnybkoz
No available elements found
laawbzfg
No available elements found
winpozaz
No available elements found
lkpgxnua
No available elements found
ulfeqmfv
No available elements found
hnochyxt
No available elements found
bejqtxts
No available elements found
xqnncyby
No available elements found
ddiwhcra
No available elements found
xygicvcv
No available elements found
bhxscmfq
No available elements found
ababkome
No available elements found
elgvajqa
No available elements found
txsgrcrz
No available elements found
myafcruh
No available elements found
wpgwzymz
No available elements found
bnjdfrjn
No available elements found
yrbajwld
No available elements found
ysjyhdtn
No available elements found
wkhevkrc
No available elements found
idfqxmgg
No available elements found
wxmnsdde
No available elements found
asimpyjl
No available elements found
zlfmfzwr
No available elements found
xbpnjaoo
No available elements found
alzekgmb
No available elements found
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
Element ID
Note: for valid json make sure all keys and strings are in double quotes, and no trailing commas. example:
{ "type_id": "div", "children": [] }
Input Type:
Component Name
ContentInput
Builder Function Name
create_content_input_manager
Description
offers a panel builder for creating and editing a nested content structure (ASTC format) with interactive insertion, removal, and attribute editing of various node types
Use like example
Config
Property | Type | Default | Description |
---|---|---|---|
val | object | the initial top-level ASTC node | |
on_change | function | callback triggered when the ASTC structure changes | |
on_finish | function | callback triggered when the user finishes editing | |
on_event | function | callback invoked for certain child content manager events | |
definition_stack | any | external definition_stack variables object for show_conditions or other variable-based usage | |
mapkit_js_token | string | token for mapkit if needed by location-based nodes | |
storage | any | storage definition used when uploading or managing files | |
storage_default_folder_path | string | default folder path for storage uploads | |
storage_path | string | template path for retrieving stored media if needed by child nodes |
Methods
Method | Description | Parameters | Returns |
---|---|---|---|
init | initial setup; stores the initial value, populates managers, and sets the selected version to 0 | config: object | void |
clean_content | validates a node's type, ensures allowed attributes, and recursively computes text stats | val: object | object with { warnings, word_count, character_count, embedding_text, total_elements, total_nests, val } |
add_version | inserts a new version of the ASTC into the version stack, triggers on_change if provided | version: object | void |
finish | calls on_finish with the current astc structure | No Params | void |
copy_markdown | copies the entire current ASTC as markdown to clipboard | No Params | void |
copy_astc | copies the entire current ASTC (json) to clipboard | No Params | void |
copy_text | copies an embedding-friendly text representation of the ASTC to clipboard | No Params | void |
set_focused_selector_id | tracks which selector id is currently focused in the UI | selector_id: string | void |
open_edit_markdown_modal | opens a popover with the current ASTC as markdown, allowing direct editing/replacement | No Params | void |
set_astc_from_markdown | parses markdown (or astc) from a text area, updates the current version with that content | No Params | void |
initiate_add_sibling_el_to_selector | prompts the user to add a sibling node right below a given selector id | selector_id: string | void |
add_sibling_el | creates a new sibling node (or uses a provided astc node) below the specified selector id | selector_id: string el_type_id: string | null element_to_add: object | void |
initiate_add_child_el_to_selector | prompts the user to add a child node under a given selector id | selector_id: string | void |
add_child_el | creates a new child node of the specified type, appended to an element’s children array | selector_id: string type_id: string | void |
add_astc_to_element_children | directly appends a parsed ASTC string as a child to a given element’s children array | element: object | void |
copy_element_astc | copies the ASTC json for a specific node identified by selector_id | selector_id: string | void |
copy_element_markdown | copies the markdown representation for a specific node identified by selector_id | selector_id: string | void |
shift_el | moves a node up or down within its siblings by a specified integer offset | selector_id: string i_shift: number | void |
delete_el | removes a node by selector_id from the current ASTC | selector_id: string | void |
open_edit_element_attributes_popover | opens an attribute editor popover for a given node identified by selector_id | selector_id: string | void |
set_element_attribute | sets a single attribute on a node identified by selector_id | selector_id: string attribute: string val: any | void |
set_element_attributes | overwrites the attributes object for a node identified by selector_id | selector_id: string new_attributes: object | void |
pass_event_down | propagates external events through the content manager, used by child components for updates | input: object | void |
get_new_element_to_add | creates a blank node of the specified type, initializing children & attributes from node_types | type_id: string | object |
calc_child_element_options | determines the set of valid child node types that can be appended to a given element | element: object is_sibling: boolean | array of available type_ids |
Returned Properties
Property | Type | Description |
---|---|---|
id | string | unique identifier for this content input instance |
val | object | the current ASTC version being displayed |
variables_data_type | any | the data-type object used for attribute editing |
variables | any | the variables reference for conditions or loops |
versions_len | number | the total number of versions in the version stack |
selected_version_prepped | object | the currently selected version in a processed/prepped form |
storage | any | storage definition object if used for file management |
storage_default_folder_path | string | default folder path for storage |
focused_selector_id | string | tracks the selector id of the currently focused node |
paste_astc_markdown_popover_manager | object | popover manager for switching between astc or markdown input |
paste_astc_markdown_location_to_add_element | object | stores the context of adding astc/markdown content as child or sibling |
paste_astc_markdown_dropdown_manager | object | dropdown manager to select 'astc' or 'markdown' as input |
paste_astc_markdown_text_input_manager | object | text input manager containing either markdown or a raw astc object |
paste_astc_markdown_finish_button_manager | object | button manager to finalize the markdown/astc insertion |
location_to_add_element | string | tracks where a new element is inserted: 'child' or 'sibling' |
astc_element_string | string | transient state for storing raw astc text being inserted |
all_selector_ids | array | list of all selector ids found in the current ASTC |
preempt_add_first_element_button_manager | object | button manager offering to add the very first element if none exists |
first_el_add_element_manager | object | add element manager used for adding an initial node |
content_manager | object | the underlying content manager that renders the ASTC |
content_overall_manager | object | an object with references for handling focus and attribute editing popovers |
attributes_input | object | the manager for attributes editing popover |