Skip to content

Commit

Permalink
Scroll to url anchor when present on docs and recipes pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Westwooo committed Sep 26, 2024
1 parent f80f284 commit 0d9d572
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/couchbase.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ script{
html{
font-family:sans-serif;
-ms-text-size-adjust:100%;
-webkit-text-size-adjust:100%
-webkit-text-size-adjust:100%;
scroll-padding-top: 4rem;
}
a{
background:transparent
Expand Down
13 changes: 13 additions & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
= Couchbase Shell Documentation =
(c) Copyright 2024, All Rights Reserved

++++
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
// Handler for .ready() called.
var hash = $(location).attr('hash');
$('html, body').animate({
scrollTop: $(hash).offset().top - 64
}, 'slow');
});
</script>
++++

:sectnums:
:toclevels: 3

Expand Down
13 changes: 13 additions & 0 deletions docs/recipes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
= Recipes

++++
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
// Handler for .ready() called.
var hash = $(location).attr('hash');
$('html, body').animate({
scrollTop: $(hash).offset().top - 64
}, 'slow');
});
</script>
++++

:sectnums:

Welcome to the recipes section of the Couchbase Shell `cbsh` documentation.
Expand Down

0 comments on commit 0d9d572

Please sign in to comment.