18 |
19 | {title}
20 |
21 |
{text}
22 |
23 | {linkText}
24 |
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/src/component/externalScripts/appendScript.ts:
--------------------------------------------------------------------------------
1 | export const appendScript = (
2 | url?: string,
3 | defer = true,
4 | dataset: DOMStringMap = {},
5 | innerHTML?: string
6 | ) => {
7 | const script = document.createElement('script');
8 | if (url) {
9 | script.src = url;
10 | }
11 | Object.entries(dataset).forEach(([key, value]) => {
12 | script.dataset[key] = value;
13 | });
14 | script.defer = defer;
15 | script.async = true;
16 | if (innerHTML) {
17 | script.innerHTML = innerHTML;
18 | }
19 | document.head.append(script);
20 | return () => {
21 | document.head.removeChild(script);
22 | };
23 | };
24 |
--------------------------------------------------------------------------------
/src/component/externalScripts/getTypebotScript.ts:
--------------------------------------------------------------------------------
1 | export const getTypebotScript = (typebotToken: string) => {
2 | return `
3 | import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0.2/dist/web.js';
4 |
5 | Typebot.initBubble({
6 | typebot: '${typebotToken}',
7 | theme: {
8 | button: { backgroundColor: 'var(--ifm-color-primary)' },
9 | },
10 | });
11 | `;
12 | };
13 |
--------------------------------------------------------------------------------
/src/component/githubButton/GithubButton.css:
--------------------------------------------------------------------------------
1 | .github-btn {
2 | @apply flex
3 | items-center
4 | border
5 | border-solid
6 | border-emphasis-400
7 | rounded-[20px]
8 | text-sm
9 | gap-[6px]
10 | px-3
11 | py-[7px]
12 | text-home-text;
13 | }
14 |
15 | .github-btn--container {
16 | @apply flex
17 | items-center
18 | text-home-text
19 | hover:text-emphasis-1000;
20 | }
21 |
22 | .github-btn--count {
23 | @apply text-[18px]
24 | text-home-text
25 | hover:text-emphasis-1000
26 | hover:no-underline;
27 | }
28 |
29 | .github-btn--logo {
30 | width: 20px !important;
31 | height: 20px;
32 | }
33 |
--------------------------------------------------------------------------------
/src/component/images/Docs.svg:
--------------------------------------------------------------------------------
1 |