Skip to content

Commit

Permalink
[8.8] [DOCS] Add TOC to landing page (elastic#161411) (elastic#161479)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.8`:
- [[DOCS] Add TOC to landing page
(elastic#161411)](elastic#161411)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Rodewig","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-07-07T16:03:32Z","message":"[DOCS]
Add TOC to landing page (elastic#161411)\n\n### Summary\r\n- Adds the TOC to
the Kibana docs landing page. Removes the right sidebar from the landing
page.\r\n- Removes the \"View all Elastic docs\" link from the bottom of
the landing
page","sha":"b7b198e2ba435df5bc909042d2a8dc0e2ab9967a","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","v8.9.0","v8.10.0","v8.8.3"],"number":161411,"url":"https://github.com/elastic/kibana/pull/161411","mergeCommit":{"message":"[DOCS]
Add TOC to landing page (elastic#161411)\n\n### Summary\r\n- Adds the TOC to
the Kibana docs landing page. Removes the right sidebar from the landing
page.\r\n- Removes the \"View all Elastic docs\" link from the bottom of
the landing
page","sha":"b7b198e2ba435df5bc909042d2a8dc0e2ab9967a"}},"sourceBranch":"main","suggestedTargetBranches":["8.9","8.8"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/161411","number":161411,"mergeCommit":{"message":"[DOCS]
Add TOC to landing page (elastic#161411)\n\n### Summary\r\n- Adds the TOC to
the Kibana docs landing page. Removes the right sidebar from the landing
page.\r\n- Removes the \"View all Elastic docs\" link from the bottom of
the landing
page","sha":"b7b198e2ba435df5bc909042d2a8dc0e2ab9967a"}},{"branch":"8.8","label":"v8.8.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Rodewig <[email protected]>
  • Loading branch information
kibanamachine and jrodewig authored Jul 7, 2023
1 parent 0361f07 commit 99729e4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]

include::{docs-root}/shared/attributes.asciidoc[]

include::landing-page.asciidoc[]

include::user/index.asciidoc[]

include::accessibility.asciidoc[]
Expand Down
18 changes: 17 additions & 1 deletion docs/index-custom-title-page.html → docs/landing-page.asciidoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
++++
<style>
* {
box-sizing: border-box;
Expand Down Expand Up @@ -281,4 +282,19 @@ <h4 class="mt-3">
</div>
</div>
<p class="my-4"><a href="https://www.elastic.co/guide/index.html">View all Elastic docs</a></p>
<script>
window.addEventListener("DOMContentLoaded", (event) => {
const left_col = document.getElementById("left_col")
left_col.classList.remove('col-0')
left_col.classList.add("col-12", "col-md-4", "col-lg-3", "h-almost-full-md", "sticky-top-md")
const right_col = document.getElementById("right_col")
right_col.classList.add('d-none')
const middle_col = document.getElementById("middle_col")
middle_col.classList.remove("col-lg-7")
middle_col.classList.add("col-lg-9", "col-md-8")
const toc = middle_col.getElementsByClassName("toc")[0]
toc.remove()
left_col.appendChild(toc);
});
</script>
++++

0 comments on commit 99729e4

Please sign in to comment.