mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2026-03-27 09:28:43 +07:00
add a copy of the Kapa button to the bottom of the page (#3486)
This commit is contained in:
@@ -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 %}
|
||||
@@ -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 %}
|
||||
|
||||
34
_overrides/partials/kapaButton.html
Normal file
34
_overrides/partials/kapaButton.html
Normal 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 %}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ description: Use n8n's LangChain integrations to build AI-powered functionality
|
||||
contentType: overview
|
||||
hide:
|
||||
- feedback
|
||||
- kapaButton
|
||||
---
|
||||
|
||||
# Advanced AI
|
||||
|
||||
@@ -4,6 +4,8 @@ template: api.html
|
||||
hide:
|
||||
- toc
|
||||
- navigation
|
||||
- feedback
|
||||
- kapaButton
|
||||
description: API reference for n8n's public REST API.
|
||||
contentType: reference
|
||||
---
|
||||
|
||||
@@ -7,6 +7,7 @@ search:
|
||||
boost: 5
|
||||
hide:
|
||||
- feedback
|
||||
- kapaButton
|
||||
---
|
||||
|
||||
# n8n public REST API
|
||||
|
||||
@@ -5,6 +5,7 @@ description: Access documentation and guides on using code and expressions in n8
|
||||
contentType: overview
|
||||
hide:
|
||||
- feedback
|
||||
- kapaButton
|
||||
---
|
||||
|
||||
# Code in n8n
|
||||
|
||||
@@ -5,6 +5,7 @@ description: Learn how to white label and integrate n8n into your products with
|
||||
contentType: overview
|
||||
hide:
|
||||
- feedback
|
||||
- kapaButton
|
||||
---
|
||||
|
||||
# n8n Embed
|
||||
|
||||
@@ -6,6 +6,7 @@ contentType: overview
|
||||
hide:
|
||||
- toc
|
||||
- feedback
|
||||
- kapaButton
|
||||
---
|
||||
|
||||
# Self-hosting n8n
|
||||
|
||||
@@ -6,6 +6,7 @@ contentType: overview
|
||||
hide:
|
||||
- path
|
||||
- feedback
|
||||
- kapaButton
|
||||
---
|
||||
|
||||
# Welcome to n8n Docs
|
||||
|
||||
@@ -5,6 +5,7 @@ description: Access n8n integrations documentation and guides. Find comprehensiv
|
||||
contentType: overview
|
||||
hide:
|
||||
- feedback
|
||||
- kapaButton
|
||||
---
|
||||
|
||||
# Integrations
|
||||
|
||||
Reference in New Issue
Block a user