Skip to content

Commit

Permalink
✨ Add Sophia AI
Browse files Browse the repository at this point in the history
  • Loading branch information
ujibang committed Sep 10, 2024
1 parent ae30dfe commit d17df8a
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 5 deletions.
2 changes: 2 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.js"></script>
<!-- Github buttons. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!--iframeResizer-->
<script src="/assets/js/iframe-resizer.parent.js"></script>
<!-- Favicons ================================================== -->
<link rel="apple-touch-icon" sizes="57x57" href="{{ "/images/favicon/apple-icon-57x57.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ "/images/favicon/apple-icon-60x60.png" | prepend: site.baseurl }}">
Expand Down
5 changes: 3 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ <h2 class="text-white"><strong>REST</strong>Heart</h2>
<li class="{{ stars_classes }} ">
<a class="github-button" href="https://github.com/SoftInstigate/restheart" data-size="large" data-show-count="true" aria-label="Star SoftInstigate/restheart on GitHub"></a>
</li>
<li class="nav-item"><a class="ml-1 ml-lg-2 ml-xl-4" href="{{ "/docs" | prepend: site.baseurl }}">Docs</a></li>
<li class="nav-item"><a class="ml-1 ml-lg-2 ml-xl-4" href="{{ "/docs/sophia" | prepend: site.baseurl }}"><strong>Ask Sophia</strong></a></li>
<li class="nav-item"><a class="ml-1 ml-lg-2 ml-xl-4" href="{{ "/docs" | prepend: site.baseurl }}"><strong>Docs</strong></a></li>
<li class="nav-item"><a class="ml-1 ml-lg-2 ml-xl-4" href="{{ "/docs/faq" | prepend: site.baseurl }}"><strong>FAQ</strong></a></li>
<li class="nav-item"><a class="ml-1 ml-lg-2 ml-xl-4" href="{{ "/docs/setup-with-docker/" | prepend: site.baseurl }}"><strong>GET</strong></a></li>
<li class="nav-item"><a class="ml-1 ml-lg-2 ml-xl-4" href="{{ "/contact" | prepend: site.baseurl }}">Contacts</a></li>
<li class="nav-item"><a class="ml-1 ml-lg-2 ml-xl-4" href="{{ "/contact" | prepend: site.baseurl }}"><strong>Contacts</strong></a></li>
</ul>
</div>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion _includes/run-restheart-seriously-banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="container bg-lightx">
<div class="row my-0">
<div class="col-12 px-5 my-2 mb-0 py-1 mx-auto text-center">
<h3 class="mb-0"><span class="text-muted">Looking for Cloud Services or Professional Support? Check </span><a class="d-inline" href="https://restheart.com">restheart.com</a></h3>
<h3 class="mb-0"><span class="text-muted d-none d-md-inline">Looking for Cloud Services or Support? </span><span class="text-muted">Check </span><a class="d-inline" href="https://restheart.com">restheart.com</a></h3>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion _sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ hr {
margin: 10px 0 10px auto;
color: #fff;
border-color: #fff;
font-size: 26px;
}

.navbar-nav > li > a {
Expand Down
20 changes: 20 additions & 0 deletions assets/js/iframe-resizer.child.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions assets/js/iframe-resizer.jquery.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions assets/js/iframe-resizer.parent.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,15 @@ text-black {

.mw-keypoint {
max-width: 400px;
}

.iframe-parent {
height: calc(100vh - 115px);
border: none;
}

iframe {
height: 100%;
width: 100%;
border: none;
}
7 changes: 7 additions & 0 deletions docs/sophia.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
---

<div class="iframe-parent mb-5">
<iframe src="https://sophia.restheart.com" scrolling="yes"></iframe>
</div>
20 changes: 19 additions & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,25 @@ stars-bounce: true
</div>
</section>

<div class="container text-center mt-0 mw-800 px-0">
<div class="mb-5">
<p class="color-primary text-center">Ask Sophia AI about RESTHeart</p>
<iframe id="sophiaFrame" src="https://sophia.restheart.com?h=auto" style="border: none; width: 100%"></iframe>
</div>

<script>
iframeResize({
license: 'GPLv3',
waitForLoad: true,
onResized: ({ iframe, height, width, type }) => {
if (type === 'overflowChanged' && document.readyState == 'complete') {
window.scrollTo({top: height+200, left: 0, behavior: 'auto'});
}
}
}, '#sophiaFrame' );
</script>

<div class="container text-center mt-5 mw-800 px-0">
<p class="color-primary">MongoDB REST API in action</p>
<img src="/images/restheart.gif" class="img-fluid"/>
</div>

Expand Down

0 comments on commit d17df8a

Please sign in to comment.