Skip to content

Commit

Permalink
add kapa btn
Browse files Browse the repository at this point in the history
  • Loading branch information
fantkolja committed May 15, 2024
1 parent bc096f8 commit 43a2cfe
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion preview-src/ui-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ site:
homeUrl: &home_url /index.html
# uncomment below to test analytics locally
keys:
aiSearchUrl: 'https://chatgpt.com/'
# googleAnalytics: 'GTM-MQ59XD6'
# clarity: 'l8c076m4u9'
aiSearchId: 'ad664bf0-07e2-42e7-9150-2e1b04b15cca'
components:
- name: abc
title: Hazelcast IMDG
Expand Down
3 changes: 2 additions & 1 deletion src/css/header.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
body {
padding-top: var(--navbar-height);
/* important so the Kapa widget does not overwrite it */
padding-top: var(--navbar-height) !important;
}

.navbar .button.navbar-button {
Expand Down
4 changes: 3 additions & 1 deletion src/css/home.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.home {
--cards-padding: 15px;
--search-container-height: 36px;

width: 100%;
margin: 0 auto;
Expand Down Expand Up @@ -51,6 +52,7 @@

.home .search-buttons {
width: 100%;
min-height: var(--search-container-height);
display: flex;
flex-direction: column;
align-items: center;
Expand All @@ -64,7 +66,7 @@
border: none;
border-radius: 10px;
padding: 10px;
height: 36px;
height: var(--search-container-height);
display: flex;
align-items: center;
gap: 8px;
Expand Down
2 changes: 1 addition & 1 deletion src/partials/body-home.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</p>
<div class="search-buttons">
<div id="search-input" class="search-container searchbox"></div>
{{#with site.keys.aiSearchUrl}}
{{#with site.keys.aiSearch}}
<button class="ai-button" onclick="window.open('{{this}}','_blank'); return false;">
<i data-feather="message-circle" class="ai-button-img"></i>
<span class="ai-button-text">Ask AI</span>
Expand Down
19 changes: 19 additions & 0 deletions src/partials/head-scripts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,24 @@
<!-- End Clarity snippet -->
{{/with}}

{{#with site.keys.aiSearchId}}
<!-- Kapa snippet -->
<script
src="https://widget.kapa.ai/kapa-widget.bundle.js"
data-website-id="{{this}}"
data-project-name="Hazelcast"
data-project-color="#000000"
data-project-logo="https://avatars.githubusercontent.com/u/1453152?s=200&amp;v=4"
data-modal-disclaimer="This is a custom LLM for Hazelcast with access to all documentation (docs.hazelcast.com/) and support knowledge base (support.hazelcast.com/s/)"
data-modal-example-questions="How do I enable persistence on Kubernetes?,What is the minimum JDK version for Platform 5.3?"
data-button-border-radius="10px"
data-button-bg-color="#0080a9"
data-button-text-font-family="PP Telegraf"
data-button-text-font-size="16px"
data-button-text-font-weight="400"
></script>
<!-- End Kapa snippet -->
{{/with}}

<script src="https://kit.fontawesome.com/11f046e3f7.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>

0 comments on commit 43a2cfe

Please sign in to comment.