Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Commit

Permalink
refactor(header): add dropdown for development
Browse files Browse the repository at this point in the history
Signed-off-by: Naylin Medina <[email protected]>
  • Loading branch information
Naylin15 committed Sep 26, 2018
1 parent 0059409 commit b31cc78
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 7 deletions.
77 changes: 70 additions & 7 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,78 @@
<a class="color-type-secondary" href="{{ '/screenshots' | absolute_url }}">Screenshots</a>
</li>

<li class="dropdown" data-proofer-ignore>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Development<i class="glyph glyph-chevron-down-2"></i></a>
<li class="dropdown">
<a
href="#"
class="dropdown-toggle"
data-toggle="dropdown"
role="button"
aria-expanded="false"
aria-label="Development"
>
Development <i class="glyph glyph-chevron-down-2"></i>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ 'development/code-documentation/' | absolute_url }}">Code documentation</a></li>
<li class="divider"></li>
<li><a href="{{ 'development/coverage/' | absolute_url }}">Coverage</a></li>
<li><a href="{{ 'development/test-reports/' | absolute_url }}">Test report</a></li>
<li class="dropdown-submenu">
<a
href="#"
class="dropdown-toggle"
data-toggle="dropdown"
aria-label="Code documentation"
>
Code documentation <i class="glyph glyph-chevron-down-2"></i>
</a>
<ul class="dropdown-menu">
<li><a href="{{ '/development/code-documentation/develop' | absolute_url }}">Develop</a></li>
<li><a href="{{ '/development/code-documentation/master' | absolute_url }}">Master</a></li>
{% for version in site.data.whitelist_version %}
<li>
<a href="{{ 'development/code-documentation/support/' | absolute_url }}{{ version }}">{{ version }}</a>
</li>
{% endfor %}
</ul>
</li>
<li class="divider"></li>
<li class="dropdown-submenu">
<a
href="#"
class="dropdown-toggle"
data-toggle="dropdown"
aria-label="Coverage"
>
Coverage<i class="glyph glyph-chevron-down-2"></i>
</a>
<ul class="dropdown-menu">
<li><a href="{{ '/development/coverage/develop/' | absolute_url }}">Develop</a></li>
<li><a href="{{ '/development/coverage/master/' | absolute_url }}">Master</a></li>
{% for version in site.data.whitelist_version %}
<li>
<a href="{{ 'development/coverage/support/' | absolute_url }}">{{ version }}</a>
</li>
{% endfor %}
</ul>
</li>
<li class="dropdown-submenu">
<a
href="#"
class="dropdown-toggle"
data-toggle="dropdown"
aria-label="Coverage"
>
Test Report<i class="glyph glyph-chevron-down-2"></i>
</a>
<ul class="dropdown-menu">
<li><a href="{{ '/development/test-report/develop/' | absolute_url }}">Develop</a></li>
<li><a href="{{ '/development/test-report/master/' | absolute_url }}">Master</a></li>
{% for version in site.data.whitelist_version %}
<li>
<a href="{{ 'development/test-report/support/' | absolute_url }}">{{ version }}</a>
</li>
{% endfor %}
</ul>
</li>
</ul>
</li>
</li>

<li>
<a class="color-type-secondary" href="{{ '/howtos' | absolute_url }}">How-tos</a>
Expand Down
24 changes: 24 additions & 0 deletions _sass/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ header {
}
}

.dropdown-submenu {
display: list-item;
position: relative;

&>.dropdown-menu {
left: 100%;
margin-top: -52px;
top: 0;
}

.pull-left {
float: none;

&>.dropdown-menu {
left: -100%;
}
}

i {
font-size: 6px;
line-height: 15px;
}
}

@media (max-width: 1084px) {
.logo {
height: 30px;
Expand Down
7 changes: 7 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@
});
})();

// Dropdown sub-menu
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function toggleDropdownMenu(event) {
event.preventDefault()
event.stopPropagation()
$(this).parent().siblings().removeClass('open')
$(this).parent().toggleClass('open')
})

// Tooltips
$('[data-toggle="tooltip"]').tooltip({
Expand Down

0 comments on commit b31cc78

Please sign in to comment.