Skip to content

Commit

Permalink
updated navbar with tpch button
Browse files Browse the repository at this point in the history
  • Loading branch information
YedilSerzhan committed Jul 22, 2022
1 parent ff44ffb commit e34bf07
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
37 changes: 37 additions & 0 deletions rest_api/static/css/navigation.css
Expand Up @@ -28,3 +28,40 @@
margin-left: auto;
margin-right: 10px;
}

.dropdown {
float: left;
overflow: hidden;
}

.dropdown .dropbtn {
outline: none;
color: black;
margin: 0;
}

.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}

.dropdown-content a {
float: none;
color: black;
padding: 5px 5px;
text-decoration: none;
display: block;
text-align: left;
}

.dropdown-content a:hover {
background-color: #ddd;
}

.dropdown:hover .dropdown-content {
display: block;
}
10 changes: 9 additions & 1 deletion rest_api/templates/partials/_navbar.html
Expand Up @@ -6,7 +6,15 @@
<div id="navigation__links">
<a class="navigation__links__item" href="{% url 'index' %}"><button>HOME</button></a>
<a class="navigation__links__item" href="{% url 'machines:index' %}"><button>MACHINES</button></a>
<a class="navigation__links__item" href="{% url 'benchmarks:benchmarks_machines' %}"><button>BENCHMARKS</button></a>
<div class="dropdown">
<button class="dropbtn">BENCHMARKS
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a class="navigation__links__item" href="{% url 'benchmarks:benchmarks_machines' %}">Pgbench</a>
<a class="navigation__links__item" href="">TPC-H</a>
</div>
</div>
{% if user.is_authenticated %}
<a id="navigation__links__login" href="{% url 'machines:usermachine' %}"><button>{{user}}</button></a>
<a class="navigation__links__item" href="{% url 'users:logout' %}"><button>logout</button></a>
Expand Down

0 comments on commit e34bf07

Please sign in to comment.