Active element in the top menu is marked

This commit is contained in:
Filip Gralinski 2019-10-05 18:47:07 +02:00
parent 25ebd08bf7
commit 962035323f
3 changed files with 11 additions and 1 deletions

9
static/js/extra.js Normal file
View File

@ -0,0 +1,9 @@
$(document).ready(function () {
var url = window.location;
$('.navbar-top').find('.active').removeClass('active');
$('.navbar-top li a').each(function () {
if (this.href == url) {
$(this).parent().addClass('active');
}
});
});

View File

@ -23,6 +23,7 @@ $newline never
<script type="text/javascript" src="/static/js/dataTables.buttons.min.js"> <script type="text/javascript" src="/static/js/dataTables.buttons.min.js">
<script type="text/javascript" src="/static/js/buttons.html5.min.js"> <script type="text/javascript" src="/static/js/buttons.html5.min.js">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js">
<script type="text/javascript" src="/static/js/extra.js">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

View File

@ -16,7 +16,7 @@
$if location /= "" $if location /= ""
\@#{location} \@#{location}
$maybe user <- maybeUser $maybe user <- maybeUser
<ul class="nav navbar-nav navbar-collapse collapse"> <ul class="nav navbar-nav navbar-top navbar-collapse collapse">
<li class="dropdown"> <li class="dropdown">
<a id="about" href="#" class="dropdown-toggle" data-toggle="dropdown">_{MsgAbout}<span class="caret"></span> <a id="about" href="#" class="dropdown-toggle" data-toggle="dropdown">_{MsgAbout}<span class="caret"></span>
<ul class="dropdown-menu"> <ul class="dropdown-menu">