Skip to content

Commit f548606

Browse files
authored
Add arrow for main nav ecosystem and resources dropdown (#59)
* Add arrows for main nav ecosystem and resources dropdown
1 parent 1c7fe51 commit f548606

File tree

4 files changed

+53
-4
lines changed

4 files changed

+53
-4
lines changed

_includes/main_menu.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
<li class="main-menu-item {% if current[1] == 'ecosystem' or current[1] == 'hub' %}active{% endif %}">
88

9-
<div class="ecosystem-dropdown">
10-
<a id="dropdownMenuButton" data-toggle="ecosystem-dropdown">
9+
<div id="dropdownMenuButton" data-toggle="ecosystem-dropdown" class="ecosystem-dropdown">
10+
<a class="ecosystem-option with-right-white-arrow">
1111
Ecosystem
1212
</a>
1313
<div class="ecosystem-dropdown-menu">
@@ -41,8 +41,8 @@
4141

4242
<li class="main-menu-item {% if current[1] == 'resources' or current[1] == 'features' %}active{% endif %}">
4343

44-
<div class="resources-dropdown">
45-
<a id="resourcesDropdownButton" data-toggle="resources-dropdown">
44+
<div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown">
45+
<a class="resource-option with-right-white-arrow">
4646
Resources
4747
</a>
4848
<div class="resources-dropdown-menu">

_sass/navigation.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,32 @@
242242
cursor: pointer;
243243
}
244244

245+
.ecosystem-dropdown, .resources-dropdown {
246+
.with-right-white-arrow {
247+
padding-right: rem(32px);
248+
position: relative;
249+
background-image: url($baseurl + "/assets/images/chevron-right-white.svg");
250+
background-size: 7px 12px;
251+
background-position: top 7px right 15px;
252+
background-repeat: no-repeat;
253+
&:hover {
254+
background-image: url($baseurl + "/assets/images/chevron-right-orange.svg");
255+
}
256+
}
257+
258+
.with-down-white-arrow {
259+
padding-right: rem(32px);
260+
position: relative;
261+
background-image: url($baseurl + "/assets/images/chevron-down-white.svg");
262+
background-size: 13px 13px;
263+
background-position: top 7px right 10px;
264+
background-repeat: no-repeat;
265+
&:hover {
266+
background-image: url($baseurl + "/assets/images/chevron-down-orange.svg");
267+
}
268+
}
269+
}
270+
245271
.dropdown-menu {
246272
border-radius: 0;
247273
padding: 0;

assets/images/chevron-down-white.svg

Lines changed: 17 additions & 0 deletions
Loading

assets/main-menu-dropdown.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
$("[data-toggle='ecosystem-dropdown']").on("click", function() {
22
toggleDropdown($(this).attr("data-toggle"));
3+
toggleArrowClass(".ecosystem-option");
34
});
45

56
$("[data-toggle='resources-dropdown']").on("click", function() {
67
toggleDropdown($(this).attr("data-toggle"));
8+
toggleArrowClass(".resource-option");
79
});
810

911
function toggleDropdown(menuToggle) {
@@ -17,3 +19,7 @@ function toggleDropdown(menuToggle) {
1719
$(menuClass).addClass(showMenuClass);
1820
}
1921
}
22+
23+
function toggleArrowClass(dropdown) {
24+
$(dropdown).toggleClass("with-right-white-arrow with-down-white-arrow");
25+
}

0 commit comments

Comments
 (0)