8000 docs: add kapa ai bot by macolo · Pull Request #8010 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

docs: add kapa ai bot #8010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
add kapa ai bot
  • Loading branch information
Mario Colombo committed Sep 21, 2024
commit f1c3e73906dd907aa7c74b915911cff5a6e8eace
9 changes: 9 additions & 0 deletions docs/_static/kapa-ai.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#kapa-widget-container {
z-index: 10000 !important;
position: absolute !important;
}

.mantine-Modal-root {
z-index: 10000;
position: absolute;
}
27 changes: 27 additions & 0 deletions docs/_static/kapa-ai.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
document.addEventListener("DOMContentLoaded", function () {
var script = document.createElement("script");
script.src = "https://widget.kapa.ai/kapa-widget.bundle.js";
script.setAttribute("data-website-id", "08e64dae-cea6-4fbc-8207-1c8bd260a14c");
script.setAttribute("data-project-name", "django CMS");
script.setAttribute("data-project-color", "#A1C42C");
script.setAttribute("data-modal-title", "django CMS AI Bot - ask me anything!");

script.setAttribute("data-modal-size", "80%");
script.setAttribute("data-modal-image-hide", "true");
script.setAttribute("data-modal-disclaimer", "This is a custom LLM for django CMS trained on publicly available data such as django CMS' technical documentation. Sponsored by kapa.ai");

script.setAttribute("data-button-height", "3em");
script.setAttribute("data-button-width", "4em");

// top right placement conflicts with text on some pages as well,
// so I chose the bottom right position as this is a dominant design pattern
// script.setAttribute("data-button-position-top", "10px");
// script.setAttribute("data-button-position-right", "10px");
script.setAttribute("data-button-image", "https://www.django-cms.org/static/img/django-logo.svg");
script.setAttribute("data-button-image-height", "11");
script.setAttribute("data-button-image-width", "60");
script.setAttribute("data-button-text-shadow", "none");

script.async = true;
document.head.appendChild(script);
});
Binary file removed docs/_static/screen1.png
Binary file not shown.
Binary file removed docs/_static/screen2.png
Binary file not shown.
Binary file removed docs/_static/screen3.png
Binary file not shown.
10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# include the following files in the build output
html_js_files = [
"kapa-ai.js",
]

# include the following files in the build output
html_css_files = [
"kapa-ai.css",
]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
Expand Down
Loading
0