add a copy of the Kapa button to the bottom of the page (#3486)

This commit is contained in:
Deborah Barnard
2025-08-15 14:32:19 +01:00
committed by GitHub
parent 17ff07910e
commit eb8bd089ff
13 changed files with 72 additions and 12 deletions

View File

@@ -162,5 +162,8 @@ https://plausible.io/docs/script-extensions?ref=ryansechrest.com#all-our-script-
{% block content %}
{{ super() }}
{% with inContent=true %}
{% include "partials/kapaButton.html" %}
{% endwith %}
{% include "partials/n8nFeedback.html" %}
{% endblock %}

View File

@@ -112,17 +112,9 @@
</div>
</div>
{% endif %}
<!-- n8n CUSTOM: Kapa -->
<button
class="n8n-kapa-button"
onclick="window.Kapa.open({
mode: 'ai'
})"
type="button"
>
<span class="md-search__icon md-icon">{% set icon = "material/creation" %}{% include ".icons/" ~ icon ~ ".svg" %}</span><span class="n8n-search-text">Chat with the docs</span>
</button>
<!-- n8n CUSTOM: Kapa -->
{% include "partials/kapaButton.html" %}
<!-- Button to open search modal -->
{% if "material/search" in config.plugins %}

View File

@@ -0,0 +1,34 @@
<!-- Determine whether to show kapa button -->
{% set kapaButton = true %}
{% if page.meta and page.meta.hide %}
{% if "kapaButton" in page.meta.hide and inContent == true %}
{% set kapaButton = None %}
{% endif %}
{% endif %}
<!-- n8n CUSTOM: Kapa -->
{% if kapaButton %}
{% if inContent %}
<div class="n8n-wrap-kapa">
<button
class="n8n-kapa-button"
onclick="window.Kapa.open({
mode: 'ai'
})"
type="button"
>
<span class="md-search__icon md-icon">{% set icon = "material/creation" %}{% include ".icons/" ~ icon ~ ".svg" %}</span><span class="n8n-search-text">Chat with the docs</span>
</button>
</div>
{% else %}
<button
class="n8n-kapa-button"
onclick="window.Kapa.open({
mode: 'ai'
})"
type="button"
>
<span class="md-search__icon md-icon">{% set icon = "material/creation" %}{% include ".icons/" ~ icon ~ ".svg" %}</span><span class="n8n-search-text">Chat with the docs</span>
</button>
{% endif %}
{% endif %}

View File

@@ -158,6 +158,28 @@
padding: 0.5em 0.75em;
}
/* wraps the Kapa button at the bottom of content pages */
.n8n-wrap-kapa {
border-top: 1px solid #eee;
padding: 1em 0 0 0;
margin-top: 2em;
}
.n8n-wrap-kapa > .n8n-kapa-button {
justify-content: center;
width: 100%;
}
.n8n-wrap-kapa > button > span.md-search__icon.md-icon {
align-self: anchor-center;
}
.n8n-wrap-kapa > button > span.md-search__icon.md-icon > svg {
border: none;
display: inline;
}
.n8n-search-text {
align-content: center;
margin-left: 0.5em;

View File

@@ -5,7 +5,7 @@ This file contains the styling for the n8nFeedback.html partial
.n8n-feedback-container {
border-top: 1px solid #eee;
color: #666;
margin-top: 2em;
margin-top: 1em;
padding-top: 1em;
}

View File

@@ -5,6 +5,7 @@ description: Use n8n's LangChain integrations to build AI-powered functionality
contentType: overview
hide:
- feedback
- kapaButton
---
# Advanced AI

View File

@@ -4,6 +4,8 @@ template: api.html
hide:
- toc
- navigation
- feedback
- kapaButton
description: API reference for n8n's public REST API.
contentType: reference
---

View File

@@ -7,6 +7,7 @@ search:
boost: 5
hide:
- feedback
- kapaButton
---
# n8n public REST API

View File

@@ -5,6 +5,7 @@ description: Access documentation and guides on using code and expressions in n8
contentType: overview
hide:
- feedback
- kapaButton
---
# Code in n8n

View File

@@ -5,6 +5,7 @@ description: Learn how to white label and integrate n8n into your products with
contentType: overview
hide:
- feedback
- kapaButton
---
# n8n Embed

View File

@@ -6,6 +6,7 @@ contentType: overview
hide:
- toc
- feedback
- kapaButton
---
# Self-hosting n8n

View File

@@ -6,6 +6,7 @@ contentType: overview
hide:
- path
- feedback
- kapaButton
---
# Welcome to n8n Docs

View File

@@ -5,6 +5,7 @@ description: Access n8n integrations documentation and guides. Find comprehensiv
contentType: overview
hide:
- feedback
- kapaButton
---
# Integrations