Updated Sidebar nav.

Added arrow svg for toggle
This commit is contained in:
Jake Bonham
2019-05-08 14:09:23 -07:00
committed by mDuo13
parent 15906994b9
commit 9885e1101b
3 changed files with 81 additions and 36 deletions

View File

@@ -616,18 +616,30 @@ a.current {
/* Left navigation ---------------------------------------------------------- */
.tree_nav {
position: sticky;
top: 48px;
overflow: scroll;
padding: 44px 24px 48px;
background-color: #fff;
}
.sidebar_pagelist {
margin-left: 0;
margin-bottom: 0;
padding-left: 0;
padding-bottom: 15px;
margin-bottom: 12px;
margin-left: 24px;
padding-left: 16px;
list-style-type: none;
border-left: 1px solid #eae7e6;
color: hsla(14.999999999999947, 1.98%, 39.61%, 1.00);
}
#sidenav a,
.sidenav_parent a {
font-family: 'Space Mono', sans-serif;
text-decoration: none;
color: black;
line-height: 24px;
color: hsla(14.999999999999947, 1.98%, 39.61%, 1.00);
}
#sidenav a.active-parent {
color: #3B4147;
@@ -642,10 +654,8 @@ a.current {
#sidenav a.active:hover,
.sidenav_parent a.active,
.sidenav_parent a.active:hover {
color: #0F72E5;
font-weight: 700;
cursor: default;
text-decoration: none;
border-left: 2px solid hsla(214.07766990291262, 81.75%, 50.59%, 1.00);
color: hsla(214.07766990291262, 81.75%, 50.59%, 1.00);
}
#sidenav .card + .card {
@@ -659,6 +669,11 @@ a.current {
#sidenav .card-body {
padding: 0;
padding-left: 15px;
}
#sidenav .card-body-single {
margin-left: -25px;
}
#sidenav .collapse {
@@ -666,7 +681,7 @@ a.current {
}
#sidenav .card.active {
background-color: #F1F5F8;
/* background-color: #F1F5F8; */
}
#sidenav .card-header {
@@ -678,7 +693,6 @@ a.current {
#sidenav .card {
padding: 0;
border-radius: 0;
border-top: 1px solid #C9CDD1;
}
#sidenav .card:only-child {
@@ -697,39 +711,42 @@ a.current {
#sidenav .card-header h5 .sidenav_cat_title {
display: block;
padding: 11px 10px 11px 50px;
padding: 11px 10px 11px 40px;
color: #1B1818;
}
#sidenav .card-header .sidenav_cat_toggler {
position: absolute;
left: 0;
padding: 10px 12px 12px 12px;
background-color: #e0e0e0;
color: black;
line-height: 0;
transition: background-color 0.5s;
}
#sidenav .card-header .sidenav_cat_toggler.collapsed {
background-color: #C9CDD1;
/* background-color: #C9CDD1; */
}
#sidenav .card-header .sidenav_cat_toggler:hover {
text-decoration: none;
}
#sidenav .card-header .sidenav_cat_toggler:before {
content: "-";
/* content: "-";
width: 0.8em;
text-align: center;
display: block;
line-height: 17.7px;
line-height: 17.7px; */
}
#sidenav .card-header .sidenav_cat_toggler.collapsed:before {
content: "+";
/* content: "+"; */
}
.xrp-ledger-dev-portal.sidebar-primary .sidebar {
padding-right: 0;
/* padding-right: 0;
padding-left: 0;
overflow: scroll;
background-color: #fff;
padding: 44px 24px 48px; */
}
.xrp-ledger-dev-portal.sidebar-primary .main {
z-index: 5;
@@ -738,6 +755,20 @@ a.current {
min-height: 700px;
}
.accordion-icon {
width: 24px;
height: 24px;
background-image: url(../img/icon-arrow.svg);
background-position: 0px 0px;
background-size: cover;
}
.accordion-icon.accordion-rotated {
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
/* Right navigation --------------------------------------------------------- */
.right-sidebar a {
@@ -799,7 +830,8 @@ a.current {
.card .sidebar_pagelist li a {
display: block;
margin-top: 5px;
padding: 4px 15px 4px 75px;
margin-left: -17px;
padding: 4px 15px 4px 35px;
text-indent: -20px;
font-size: 14px;
color: #27a2db;
@@ -819,7 +851,7 @@ a.current {
}
.card .sidebar_pagelist li .subpage {
padding-left: 105px;
padding-left: 55px;
}
.sidenav_parent a {
@@ -828,6 +860,7 @@ a.current {
font-size: 18px;
font-weight: 700;
padding: 15px 16px 15px 10px;
color: #1B1818;
}
/* Edit on GitHub link ------------------------------------------------------ */

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<style type="text/css">
.st0{fill:#CCCCCC;}
</style>
<path class="st0" d="M10.2,6.3l5.7,5.7l-5.7,5.7V6.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 462 B

View File

@@ -4,25 +4,25 @@
{% if currentpage.supercategory is defined %}
<div class="sidenav_parent">
{% if currentpage == (pages|selectattr('supercategory', 'defined_and_equalto', currentpage.supercategory)|first) %}
<a class="active" href="{{ currentpage.html }}">{{ currentpage.supercategory }}</a>
<a href="{{ currentpage.html }}">{{ currentpage.supercategory }}</a>
{% else %}
<a href="{{ (pages|selectattr('supercategory', 'defined_and_equalto', currentpage.supercategory)|first).html }}"><i class="fa fa-angle-double-left" aria-hidden="true"></i> {{ currentpage.supercategory }}</a>
<a href="{{ (pages|selectattr('supercategory', 'defined_and_equalto', currentpage.supercategory)|first).html }}"> {{ currentpage.supercategory }}</a>
{% endif %}
</div>
{% elif currentpage.doc_type is defined %}
<div class="sidenav_parent">
{% if currentpage == (pages|selectattr('doc_type', 'defined_and_equalto', currentpage.doc_type)|first) %}
<a class="active" href="{{ currentpage.html }}">{{ currentpage.doc_type }}</a>
<a href="{{ currentpage.html }}">{{ currentpage.doc_type }}</a>
{% else %}
<a href="{{ (pages|selectattr('doc_type', 'defined_and_equalto', currentpage.doc_type)|first).html }}"><i class="fa fa-angle-double-left" aria-hidden="true"></i> {{ currentpage.doc_type }}</a>
<a href="{{ (pages|selectattr('doc_type', 'defined_and_equalto', currentpage.doc_type)|first).html }}"> {{ currentpage.doc_type }}</a>
{% endif %}
</div>
{% elif currentpage.funnel is defined %}
<div class="sidenav_parent">
{% if currentpage == (pages|selectattr('funnel', 'defined_and_equalto', currentpage.funnel)|first) %}
<a class="active" href="{{ currentpage.html }}">{{ currentpage.funnel }}</a>
<a href="{{ currentpage.html }}">{{ currentpage.funnel }}</a>
{% else %}
<a href="{{ (pages|selectattr('funnel', 'defined_and_equalto', currentpage.funnel)|first).html }}"><i class="fa fa-angle-double-left" aria-hidden="true"></i> {{ currentpage.funnel }}</a>
<a href="{{ (pages|selectattr('funnel', 'defined_and_equalto', currentpage.funnel)|first).html }}"> {{ currentpage.funnel }}</a>
{% endif %}
</div>
{% endif %}
@@ -34,7 +34,7 @@
{% set funnelpages = pages|selectattr("funnel", 'defined_and_equalto', currentpage.funnel)|list %}
<div id="sidenav" aria-multiselectable="true">
<div class="card active">
<div class="card-body">
<div class="card-body card-body-single">
<ul class="sidebar_pagelist">
{% for page in funnelpages %}
{% if loop.index == 1 %}{# Skip the first element since it's linked by the funnel header #}
@@ -69,11 +69,11 @@
{% set cat_parent = pages|selectattr('category', 'defined_and_equalto', cat)|first %}
<div class="card{% if currentpage.category is defined and currentpage.category == cat %} active{% endif %}">
<div class="card-header" role="tab" id="sidenav_cat_head_{{loop.index}}">
<h5 class="card-title">
{% if catpages|length > 1 %}
<a class="{% if currentpage.category is undefined or currentpage.category != cat %}collapsed {% endif %}sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}">&nbsp;</a>
<a class="{% if currentpage.category is undefined or currentpage.category != cat %}collapsed {% endif %}sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}"><div class="accordion-icon {% if currentpage.category is undefined or currentpage.category == cat %}accordion-rotated {% endif %}"></div></a>
{% endif %}
<a class="sidenav_cat_title{% if currentpage == (cat_parent) %} active{% elif currentpage.category is defined and currentpage.category == cat %} active-parent{% endif %}" href="{{ cat_parent.html }}">{{ cat }}</a>
<h5 class="card-title">
<a class="sidenav_cat_title" href="{{ cat_parent.html }}">{{ cat }}</a>
</h5>
</div><!-- /.card-header -->
@@ -142,10 +142,13 @@
{% set _ = printed_modules.append(page.supercategory) %}
<div class="card">
<div class="card-header" role="tab" id="sidenav_cat_head_{{loop.index}}">
<h5 class="card-title">
{% if supercatpages|length > 1 %}
<a class="collapsed sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}">&nbsp;</a>
<a class="collapsed sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}"><div class="accordion-icon"></div></a>
{% endif %}
<h5 class="card-title">
<!-- {% if supercatpages|length > 1 %}
<a class="collapsed sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}"><div class="accordion-icon"></div></a>
{% endif %} -->
<a class="sidenav_cat_title" href="{{ supercat_parent.html }}">{{ supercat }}</a>
</h5>
</div><!-- /.card-header -->
@@ -193,11 +196,11 @@
{% set cat_parent = catpages|first %}
<div class="card{% if currentpage.category is defined and currentpage.category == cat %} active{% endif %}">
<div class="card-header" role="tab" id="sidenav_cat_head_{{loop.index}}">
<h5 class="card-title">
{% if catpages|length > 1 %}
<a class="{% if currentpage.category is undefined or currentpage.category != cat %}collapsed {% endif %}sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}">&nbsp;</a>
<a class="{% if currentpage.category is undefined or currentpage.category != cat %}collapsed {% endif %}sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}"><div class="accordion-icon {% if currentpage.category is undefined or currentpage.category == cat %}accordion-rotated {% endif %}"></div></a>
{% endif %}
<a class="sidenav_cat_title{% if currentpage == (cat_parent) %} active{% elif currentpage.category is defined and currentpage.category == cat %} active-parent{% endif %}" href="{{ cat_parent.html }}">{{ cat }}</a>
<h5 class="card-title">
<a class="sidenav_cat_title" href="{{ cat_parent.html }}">{{ cat }}</a>
</h5>
</div><!-- /.card-header -->