|
38 | 38 | />{{/unless}}
|
39 | 39 | {{{redocHead}}}
|
40 | 40 | <link rel="stylesheet" type="text/css" href="/api.css" />
|
41 |
| - <script type="text/javascript" |
42 |
| - async="true" |
43 |
| - src="https://widget.kapa.ai/kapa-widget.bundle.js" |
44 |
| - data-website-id="a02bca75-1dd3-411e-95c0-79ee1139be4d" |
45 |
| - data-project-name="InfluxDB" |
46 |
| - data-project-color="#d30971" |
47 |
| - data-project-logo="/img/influx-logo-cubo-white.png" |
48 |
| - data-modal-disclaimer="This AI can access [documentation for InfluxDB, clients, and related tools](https://docs.influxdata.com). Information you submit is used in accordance with our [Privacy Policy](https://www.influxdata.com/legal/privacy-policy/)." |
49 |
| - data-modal-example-questions="How do I write and query data with the {{title}}?, How do I use client libraries for the {{title}}?" data-button-height="65px" data-button-width="65px" |
50 |
| - data-button-text="Ask AI" data-conversation-button-icons-only="true" |
51 |
| - data-font-family="Proxima Nova, sans-serif" |
52 |
| - data-modal-example-questions-col-span="8" |
53 |
| - data-modal-full-screen-on-mobile="true" |
54 |
| - data-modal-header-bg-color="#d30971" |
55 |
| - data-modal-header-border-bottom="none" data-modal-header-padding=".5rem" |
56 |
| - data-modal-header-text-color="#ffffff" data-modal-x-offset="0" |
57 |
| - data-modal-y-offset="0" data-modal-with-overlay="false" |
58 |
| - data-modal-inner-flex-direction="column" |
59 |
| - data-modal-inner-justify-content="end" data-modal-inner-max-width="600px" |
60 |
| - data-modal-inner-position-left="auto" |
61 |
| - data-modal-inner-position-right="20px" |
62 |
| - data-modal-inner-position-bottom="calc(2.5rem + 25px)" |
63 |
| - data-modal-size="640px" |
64 |
| - data-modal-title-color="#fff" |
65 |
| - data-modal-title-font-size="1.25rem" |
66 |
| - data-modal-lock-scroll="false" ></script> |
67 |
| - </head> |
| 41 | + <script> |
| 42 | + // Load Kapa AI widget after DOM content is loaded |
| 43 | + document.addEventListener('DOMContentLoaded', function() { |
| 44 | + const askAI = document.createElement('script'); |
| 45 | + askAI.type = 'text/javascript'; |
| 46 | + askAI.async = true; |
| 47 | + askAI.src = 'https://widget.kapa.ai/kapa-widget.bundle.js'; |
| 48 | + |
| 49 | + // Set all data attributes |
| 50 | + askAI.setAttribute('data-website-id', 'a02bca75-1dd3-411e-95c0-79ee1139be4d'); |
| 51 | + askAI.setAttribute('data-project-name', 'InfluxDB'); |
| 52 | + askAI.setAttribute('data-project-color', '#d30971'); |
| 53 | + askAI.setAttribute('data-project-logo', '/img/influx-logo-cubo-white.png'); |
| 54 | + askAI.setAttribute('data-modal-disclaimer', 'This AI can access [documentation for InfluxDB, clients, and related tools](https://docs.influxdata.com). Information you submit is used in accordance with our [Privacy Policy](https://www.influxdata.com/legal/privacy-policy/).'); |
| 55 | + askAI.setAttribute('data-modal-example-questions', 'How do I write and query data with the {{title}}?, How do I use client libraries for the {{title}}?'); |
| 56 | + askAI.setAttribute('data-button-height', '65px'); |
| 57 | + askAI.setAttribute('data-button-width', '65px'); |
| 58 | + if (window.matchMedia('(max-width: 600px)').matches) { |
| 59 | + // For mobile devices (smaller than 600px) |
| 60 | + askAI.setAttribute('data-button-position-bottom', '130px'); |
| 61 | + } else { |
| 62 | + // For larger screens |
| 63 | + askAI.setAttribute('data-button-position-bottom', '20px'); |
| 64 | + } |
| 65 | + askAI.setAttribute('data-button-text', 'Ask AI'); |
| 66 | + askAI.setAttribute('data-conversation-button-icons-only', 'true'); |
| 67 | + askAI.setAttribute('data-font-family', 'Proxima Nova, sans-serif'); |
| 68 | + askAI.setAttribute('data-modal-example-questions-col-span', '8'); |
| 69 | + askAI.setAttribute('data-modal-full-screen-on-mobile', 'true'); |
| 70 | + askAI.setAttribute('data-modal-header-bg-color', '#d30971'); |
| 71 | + askAI.setAttribute('data-modal-header-border-bottom', 'none'); |
| 72 | + askAI.setAttribute('data-modal-header-padding', '.5rem'); |
| 73 | + askAI.setAttribute('data-modal-header-text-color', '#ffffff'); |
| 74 | + askAI.setAttribute('data-modal-x-offset', '0'); |
| 75 | + askAI.setAttribute('data-modal-y-offset', '0'); |
| 76 | + askAI.setAttribute('data-modal-with-overlay', 'false'); |
| 77 | + askAI.setAttribute('data-modal-inner-flex-direction', 'column'); |
| 78 | + askAI.setAttribute('data-modal-inner-justify-content', 'end'); |
| 79 | + askAI.setAttribute('data-modal-inner-max-width', '600px'); |
| 80 | + askAI.setAttribute('data-modal-inner-position-left', 'auto'); |
| 81 | + askAI.setAttribute('data-modal-inner-position-right', '50px'); |
| 82 | + askAI.setAttribute('data-modal-inner-position-bottom', 'calc(2.5rem + 25px)'); |
| 83 | + askAI.setAttribute('data-modal-size', '640px'); |
| 84 | + askAI.setAttribute('data-modal-title-color', '#fff'); |
| 85 | + askAI.setAttribute('data-modal-title-font-size', '1.25rem'); |
| 86 | + askAI.setAttribute('data-modal-lock-scroll', 'false'); |
| 87 | + |
| 88 | + // Add the script to the document head |
| 89 | + document.head.appendChild(askAI); |
| 90 | + }); |
| 91 | + </script> |
| 92 | + </head> |
68 | 93 |
|
69 | 94 | <body>
|
70 | 95 | {{! <script>
|
|
0 commit comments