diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/rocksdb/docs/_includes/nav | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rocksdb/docs/_includes/nav')
4 files changed, 114 insertions, 0 deletions
diff --git a/src/rocksdb/docs/_includes/nav/collection_nav.html b/src/rocksdb/docs/_includes/nav/collection_nav.html new file mode 100644 index 00000000..a3c7a2dd --- /dev/null +++ b/src/rocksdb/docs/_includes/nav/collection_nav.html @@ -0,0 +1,64 @@ +<div class="docsNavContainer"> + <nav class="toc" id="doc_nav"> + <div class="toggleNav" id="collection_nav"> + <section class="navWrapper wrapper"> + <div class="navBreadcrumb wrapper"> + <div class="navToggle" id="collection_nav_toggler"> + <i></i> + </div> + <h2> + <a href="{{ include.sectionpath }}">{{ include.sectiontitle }}</a> + {% if include.currentgroup %} + <i>›</i> + <span>{{ include.currentgroup }}</span> + {% endif %} + </h2> + </div> + <div class="navGroups"> + {% if include.type == "blog" %} + {% assign grouptitle = "All Posts" %} + {% assign groupitems = include.navdata %} + {% include nav/collection_nav_group.html %} + {% else %} + {% for group in include.navdata %} + {% assign grouptitle = group.title %} + {% for item in group.items %} + {% if item.id == page.docid %} + {% assign currentgroup = group %} + {% endif %} + {% endfor %} + {% include nav/collection_nav_group.html %} + {% endfor %} + {% endif %} + </div> + </section> + </div> + </nav> +</div> +<script> + var docsevent = document.createEvent('Event'); + docsevent.initEvent('docs_slide', true, true); + document.addEventListener('docs_slide', function (e) { + document.body.classList.toggle('docsSliderActive'); + }, false); + + var collectionNav = document.getElementById('collection_nav'); + var collectionNavToggler = + document.getElementById('collection_nav_toggler'); + collectionNavToggler.addEventListener('click', function(e) { + collectionNav.classList.toggle('toggleNavActive'); + document.dispatchEvent(docsevent); + }); + + var groups = document.getElementsByClassName('navGroup'); + for(var i = 0; i < groups.length; i++) { + var thisGroup = groups[i]; + thisGroup.onclick = function() { + for(var j = 0; j < groups.length; j++) { + var group = groups[j]; + group.classList.remove('navGroupActive'); + } + this.classList.add('navGroupActive'); + } + } +</script> diff --git a/src/rocksdb/docs/_includes/nav/collection_nav_group.html b/src/rocksdb/docs/_includes/nav/collection_nav_group.html new file mode 100644 index 00000000..b236ac5e --- /dev/null +++ b/src/rocksdb/docs/_includes/nav/collection_nav_group.html @@ -0,0 +1,19 @@ +<div class="navGroup{% if currentgroup == group %} navGroupActive navGroupCurrent{% endif %}"> + <h3><i>+</i><span>{{ grouptitle }}</span></h3> + <ul> + {% if include.data_collection %} + {% for item in group.items %} + {% for collectionitem in include.data_collection %} + {% if collectionitem.docid == item.id %} + {% assign groupitem = collectionitem %} + {% include nav/collection_nav_group_item.html %} + {% endif %} + {% endfor %} + {% endfor %} + {% else %} + {% for groupitem in groupitems %} + {% include nav/collection_nav_group_item.html %} + {% endfor %} + {% endif %} + </ul> +</div>
\ No newline at end of file diff --git a/src/rocksdb/docs/_includes/nav/collection_nav_group_item.html b/src/rocksdb/docs/_includes/nav/collection_nav_group_item.html new file mode 100644 index 00000000..fbb063de --- /dev/null +++ b/src/rocksdb/docs/_includes/nav/collection_nav_group_item.html @@ -0,0 +1 @@ +<li class="navListItem"><a class="navItem" href="{{ groupitem.url | absolute_url }}">{{ groupitem.title }}</a></li> diff --git a/src/rocksdb/docs/_includes/nav/header_nav.html b/src/rocksdb/docs/_includes/nav/header_nav.html new file mode 100644 index 00000000..0fe945cd --- /dev/null +++ b/src/rocksdb/docs/_includes/nav/header_nav.html @@ -0,0 +1,30 @@ +<div id="header_nav"> + <div class="navSlideout"> + <i class="menuExpand" id="header_nav_expander"><span></span><span></span><span></span></i> + </div> + <nav class="slidingNav"> + <ul> + {% for item in site.data.nav %} + <li class="navItem"> + <a href="{{ item.href }}"{% if item.category == "external" %} target="_blank"{% endif %}>{{ item.title }}</a> + </li> + {% endfor %} + {% if site.searchconfig %} + {% include nav_search.html inputselector="search_input_react" %} + {% endif %} + </ul> + </nav> +</div> +<script> + var event = document.createEvent('Event'); + event.initEvent('slide', true, true); + document.addEventListener('slide', function (e) { + document.body.classList.toggle('sliderActive'); + }, false); + var headerNav = document.getElementById('header_nav'); + var headerNavExpander = document.getElementById('header_nav_expander'); + headerNavExpander.addEventListener('click', function(e) { + headerNav.classList.toggle('navSlideoutActive'); + document.dispatchEvent(event); + }, false); +</script>
\ No newline at end of file |