Skip to content

Commit

Permalink
Make menu clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
Merlin Buczek committed Jun 10, 2019
1 parent afc1440 commit 9fe4f4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mpicms/static/js/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
document.addEventListener('DOMContentLoaded', function () {

// Dropdowns
var $dropdowns = getAll('.dropdown:not(.is-hoverable)');
var $dropdowns = getAll('.dropdown:not(.is-hoverable), .has-dropdown:not(.is-hoverable)');

if ($dropdowns.length > 0) {
$dropdowns.forEach(function ($el) {
Expand Down Expand Up @@ -55,4 +55,4 @@ document.addEventListener('DOMContentLoaded', function () {
function getAll(selector) {
return Array.prototype.slice.call(document.querySelectorAll(selector), 0);
}
});
});
5 changes: 4 additions & 1 deletion mpicms/templates/menus/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ <h1 class="title is-1">Intranet</h1>
<div class="navbar-start">
{% for child in request.site.root_page.get_children.live.in_menu %}
<div class="navbar-item has-dropdown is-hoverable">
<a href="#" class="navbar-link navbar-title">
<a href="{% pageurl child %}" class="navbar-link navbar-title is-hidden-touch">
{{ child }}
</a>
<a href="#" class="navbar-link navbar-title is-hidden-desktop">
{{ child }}
</a>

Expand Down

0 comments on commit 9fe4f4c

Please sign in to comment.