Skip to content
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

DOCS-3727: Readd AI button for mobile #4111

Merged
merged 2 commits into from
Mar 21, 2025
Merged
Changes from all commits
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
1 change: 1 addition & 0 deletions assets/js/inkeep.js
Original file line number Diff line number Diff line change
@@ -86,6 +86,7 @@ const inkeepWidgetAI = Inkeep().embed(config);

// Add event listener to open the Inkeep modal when the button is clicked
inkeepButtonTop.addEventListener("click", handleOpen);
inkeepButtonBottom.addEventListener("click", handleOpen);

// Create an HTML element that the Inkeep widget will be inserted into.
const nav = document.querySelector("#navsearch");
15 changes: 15 additions & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -153,6 +153,7 @@ h7, .h7 {

.td-sidebar {
/* NAV Panel changes */
background-color: #FFFFFF;
}

// TABLE OF CONTENT CHANGES
@@ -2021,6 +2022,10 @@ a.ais-Pagination-link:hover {
width: 100%;
}

#chatButton {
display: none;
}

@media (max-width: 992px) {

#navSearchBar {
@@ -2034,6 +2039,16 @@ a.ais-Pagination-link:hover {
margin-top: 0.5rem;
}

#chatButton {
display: unset;
background-color: #000;
color: white;
}

#scrollButton {
margin-right: 136px;
}

}

#mobile-search {
6 changes: 6 additions & 0 deletions layouts/docs/baseof.html
Original file line number Diff line number Diff line change
@@ -34,6 +34,12 @@
</main>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
</div>
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
<button onclick="toTop()" class="docsbutton" id="scrollButton" title="Go to top" style="visibility: hidden;">
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>
6 changes: 6 additions & 0 deletions layouts/docs/glossary.html
Original file line number Diff line number Diff line change
@@ -47,6 +47,12 @@ <h4 id="{{ printf "%s" $term_identifier }}" class="glossary-anchor">{{ .Title }}
</main>
</div>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
<button onclick="toTop()" class="docsbutton" id="scrollButton" title="Go to top" style="visibility: hidden;">
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>
6 changes: 6 additions & 0 deletions layouts/docs/landing.html
Original file line number Diff line number Diff line change
@@ -24,6 +24,12 @@
</main>
</div>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
</div>
{{ partial "footer.html" . }}
</div>
6 changes: 6 additions & 0 deletions layouts/docs/search.html
Original file line number Diff line number Diff line change
@@ -37,6 +37,12 @@ <h1>{{ .Title }}</h1>
</main>
</div>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
</div>
{{ partial "footer.html" . }}
</div>
6 changes: 6 additions & 0 deletions layouts/docs/tutorials.html
Original file line number Diff line number Diff line change
@@ -101,6 +101,12 @@ <h4 class="alert-heading">Javascript</h4>
</main>
</div>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
</div>
{{ partial "footer.html" . }}
</div>