From b31cc78878ae7be5b3abbefa0d1a1d262dda9bcc Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Wed, 26 Sep 2018 13:35:46 -0400 Subject: [PATCH] refactor(header): add dropdown for development Signed-off-by: Naylin Medina --- _includes/header.html | 77 +++++++++++++++++++++++++++++++++++++++---- _sass/_header.scss | 24 ++++++++++++++ js/app.js | 7 ++++ 3 files changed, 101 insertions(+), 7 deletions(-) diff --git a/_includes/header.html b/_includes/header.html index f0beed6..edf19ae 100755 --- a/_includes/header.html +++ b/_includes/header.html @@ -36,15 +36,78 @@ Screenshots - +
  • How-tos diff --git a/_sass/_header.scss b/_sass/_header.scss index acfc380..70b8413 100644 --- a/_sass/_header.scss +++ b/_sass/_header.scss @@ -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; diff --git a/js/app.js b/js/app.js index da03fa6..8fd8040 100755 --- a/js/app.js +++ b/js/app.js @@ -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({