Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["svelte.svelte-vscode"],
"recommendations": ["svelte.svelte-vscode"]
}
199 changes: 0 additions & 199 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ npm run dev

Make sure you have `node` installed to run this project.

## UMD js files for web embedding

We will need to build and compile the project first on your local machine:

```
npm build:embed
```

New files will be created for each configurator, e.g. for empresa, these files will be created:

```
/public/empresa
- /bundle.css
- /empresa-configurator.js
- /empresa-configurator.js.map
```

As a simple solution for js and css delivery we are using [jsDelivery](https://www.jsdelivr.com/), for that reason the build code **must be included in the git**. You will need to make a new release version of the repository to promote new changes.
Expand All @@ -43,16 +28,6 @@ As a simple solution for js and css delivery we are using [jsDelivery](https://w

Include styles in `<head>` globally

```html
<!--Embed code-->
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/gh/accora-care/configurators@2.0.0/public/configurators/all.js"
></script>
<!--Configurator styles-->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/accora-care/configurators@2.0.0/public/configurators/bundle.css"
/>
<!--Hubspot: copy this only if hubspot has never been added yet-->
<script
Expand All @@ -62,148 +37,6 @@ Include styles in `<head>` globally
></script>
```

### Initiate each configurator separately

Include only configurator you want to appear on specific page.

#### Empresa

```html
<!--Where you want to render the configurator-->
<div id="empresa-configurator"></div>
<!--At the end of body-->
<script type="text/javascript">
AccoraConfigurators.Empresa("empresa-configurator");
</script>
```

#### Floorbed1

```html
<!--Where you want to render the configurator-->
<div id="floorbed1-configurator"></div>
<!--At the end of body-->
<script type="text/javascript">
AccoraConfigurators.FloorbedOne("floorbed1-configurator");
</script>
```

#### Configura Advance

```html
<!--Where you want to render the configurator-->
<div id="configura-advance"></div>
<!--At the end of body-->
<script type="text/javascript">
AccoraConfigurators.ConfiguraAdvance("configura-advance");
</script>
```

## Empresa Configurator only

Include styles in `<head>`

```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/accora-care/configurators@1.7.0/public/empresa/bundle.css"
/>
```

To include empresa configurator on the website, create a div element with `id` in the desired location of the html.

```html
<div id="empresa-configurator"></div>
```

At the end of `<body>`, include this script, make sure to edit the config:

```html
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/gh/accora-care/configurators@1.7.0/public/empresa/empresa-configurator.js"
></script>
<script defer>
const empresaConfig = {
mainTitle: "Customize your Accora Floor Bed",
bookADemoHref: "https://us.accora.care/book-a-demo",
};
EmpresaConfigurator("empresa-configurator", empresaConfig);
</script>
```

---

## Floorbed 1 Configurator only

Include styles in `<head>`

```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/accora-care/configurators@1.7.0/public/floorbed1/bundle.css"
/>
```

To include empresa configurator on the website, create a div element with `id` in the desired location of the html.

```html
<div id="floorbed1-configurator"></div>
```

At the end of `<body>`, include this script, make sure to edit the config:

```html
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/gh/accora-care/configurators@1.7.0/public/floorbed1/floorbed1-configurator.js"
></script>
<script defer>
const floorbed1Config = {
mainTitle: "Customize your Accora Floorbed 1",
bookADemoHref: "https://us.accora.care/book-a-demo",
};
AccoraFloorbedOne("floorbed1-configurator", floorbed1Config);
</script>
```

---

## Configura Advance Configurator onlyDEFAULT_HUBSPOT_CONFIG

Include styles in `<head>`

```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/accora-care/configurators@1.7.0/public/configura-advance/bundle.css"
/>
```

To include empresa configurator on the website, create a div element with `id` in the desired location of the html.

```html
<div id="configura-advance"></div>
```

At the end of `<body>`, include this script, make sure to edit the config:

```html
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/gh/accora-care/configurators@1.7.0/public/configura-advance/configura-advance-configurator.js"
></script>
<script defer>
const configuraAdvanceConfig = {
mainTitle: "Customize your Accora Configura Advance",
bookADemoHref: "https://us.accora.care/book-a-demo",
};
ConfiguraAdvance("configura-advance", configuraAdvanceConfig);
</script>
```

---

# svelte app

This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template.
Expand Down Expand Up @@ -273,35 +106,3 @@ rm scripts/setupTypeScript.js
```

If you want to use `baseUrl` or `path` aliases within your `tsconfig`, you need to set up `@rollup/plugin-alias` to tell Rollup to resolve the aliases. For more info, see [this StackOverflow question](https://stackoverflow.com/questions/63427935/setup-tsconfig-path-in-svelte).

## Deploying to the web

### With [Vercel](https://vercel.com)

Install `vercel` if you haven't already:

```bash
npm install -g vercel
```

Then, from within your project folder:

```bash
cd public
vercel deploy --name my-project
```

### With [surge](https://surge.sh/)

Install `surge` if you haven't already:

```bash
npm install -g surge
```

Then, from within your project folder:

```bash
npm run build
surge public my-project.surge.sh
```
Loading