From e1708651a3931c1634909e0bd029722b014f21f8 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 16 Apr 2015 16:52:54 -0300 Subject: [PATCH] Added arrow in categories menu --- index.html | 1 + js/main.js | 2 ++ sass/_proposal_categories.scss | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/index.html b/index.html index 239a5f9..b35b62b 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@ {{#each article.categories}}
  • {{#link name id}}{{/link}} +
  • {{/each}} {{#each article.categories}} diff --git a/js/main.js b/js/main.js index ffb238f..dc1736c 100644 --- a/js/main.js +++ b/js/main.js @@ -70,6 +70,8 @@ $.getJSON(noosferoAPI) $('.proposal-category-items').hide(); $('#' + item).show(); $(".proposal-item").dotdotdot(); + $('.proposal-category .arrow-box').hide(); + $(this).siblings('.arrow-box').show(); } event.preventDefault(); }); diff --git a/sass/_proposal_categories.scss b/sass/_proposal_categories.scss index 12570de..b810f99 100644 --- a/sass/_proposal_categories.scss +++ b/sass/_proposal_categories.scss @@ -121,6 +121,10 @@ background-color: $color; border-color: $color; } + #proposal-category-#{$category} .arrow-box:after { + border-bottom-color: $color; + } + .proposal-category-items-#{$category} ul.category li { background-color: $color; background-image: url(./images/icons/#{$category}.png); @@ -135,3 +139,23 @@ content: "#{$description}"; } } + +.arrow-box { + position: relative; + background: #88b7d5; + top: 3px; + &:after { + bottom: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-color: rgba(136, 183, 213, 0); + border-bottom-color: #88b7d5; + border-width: 8px; + margin-left: -8px; + } +} -- libgit2 0.21.2