Skip to content

Commit

Permalink
Drupal 8 Theming - Part 18 - Taxonomy and Drop Down Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandoric committed Dec 5, 2015
1 parent 1d1522d commit 1c6174b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
2 changes: 1 addition & 1 deletion css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/style.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/main.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
jQuery(document).ready(function($) {

$('#block-endymion-main-menu li').hover(function(){
$(this).find('.sub-menu').toggle();
});
});
25 changes: 25 additions & 0 deletions sass/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@

li{
float: left;
position: relative;
}

ul ul{
position: absolute;
width:200px;
background: #FFF;
display: none;

li{
float:none;

a{
color:#2BA6CB;
display: block;
padding:5px;
border-bottom: 1px solid #efefef;

&:hover{
background: #2BA6CB;
color:#fff;
text-decoration: none;
}
}
}
}

a{
Expand Down
2 changes: 1 addition & 1 deletion templates/navigation/menu.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{% if menu_level == 0 %}
<ul{{ attributes.addClass('menu') }}>
{% else %}
<ul>
<ul class="sub-menu">
{% endif %}
{% for item in items %}
<li{{ item.attributes }}>
Expand Down

0 comments on commit 1c6174b

Please sign in to comment.