Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix menu styling on JupyterHub 5.0, require 5.0 #21

Merged
merged 4 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions nebari_jupyterhub_theme/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
{% block nav_bar_left_items %}

<!-- Default nav bar items -->
<li><a href="{{base_url}}home {% if cdsdashboards_restricted %}-cds{% endif %}">Home</a></li>
<li><a href="{{base_url}}token">Token</a></li>
<li class="nav-item"><a class="nav-link" href="{{base_url}}home {% if cdsdashboards_restricted %}-cds{% endif %}">Home</a></li>
<li class="nav-item"><a class="nav-link" href="{{base_url}}token">Token</a></li>

<!-- Access to admin dashboard -->
{% if user.admin %}
<li><a href="{{base_url}}admin">Admin</a></li>
<li class="nav-item"><a class="nav-link" href="{{base_url}}admin">Admin</a></li>
{% endif %}

{% if services %}
<li class="dropdown">
<li class="nav-item dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Services<span class="caret"></span></a>
<ul class="dropdown-menu">
{% for service in services %}
Expand All @@ -26,16 +26,34 @@
{% endif %}

<!-- Custom integrations-->
<li><a href="/auth/admin/nebari/console/">User Management</a></li>
<li><a href="/argo">Argo Workflows</a></li>
<li class="nav-item"><a class="nav-link" href="/auth/admin/nebari/console/">User Management</a></li>
<li class="nav-item"><a class="nav-link" href="/argo">Argo Workflows</a></li>
{% if cdsdashboards_enabled %}
<li><a href="{{ base_url }}dashboards">Dashboards</a></li>
<li class="nav-item"><a class="nav-link" href="{{ base_url }}dashboards">Dashboards</a></li>
{% endif %}
<li><a href="/conda-store">Environment Management</a></li>
<li><a href="/monitoring">Monitoring</a></li>
<li class="nav-item"><a class="nav-link" href="/conda-store">Environment Management</a></li>
<li class="nav-item"><a class="nav-link" href="/monitoring">Monitoring</a></li>

{% endblock nav_bar_left_items %}

<!-- Switch login button to light -->
{% block login_widget %}
<span id="login_widget">
{% if user %}
<span class="navbar-text me-1">{{ user.name }}</span>
<a id="logout"
role="button"
class="btn btn-sm btn-outline-light"
href="{{ logout_url }}"> <i aria-hidden="true" class="fa fa-sign-out"></i> Logout</a>
{% else %}
<a id="login"
role="button"
class="btn btn-sm btn-outline-light"
href="{{ login_url }}">Login</a>
{% endif %}
</span>
{% endblock login_widget %}

{% block footer %}
{% if display_version %}
<div class="version">
Expand Down
27 changes: 17 additions & 10 deletions nebari_jupyterhub_theme/templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,29 @@ a{
}

/* Navbar */
.nav{
.navbar-nav {
margin-left:10px;
}

.navbar.navbar-default {
background: var(--navbar-background-color);
.navbar.bg-body-tertiary {
background: var(--navbar-background-color)!important;
box-shadow: 0px 1.5px 3px 0px rgba(72, 74, 94, 0.16);
border: None;
}

.navbar.navbar-default .navbar-nav>li>a,
.navbar.navbar-default .navbar-text {
.navbar.bg-body-tertiary .navbar-nav>li>a,
.navbar.bg-body-tertiary .navbar-text {
color: var(--navbar-text-color);
text-decoration: none;
}

/* Spawner form */

#kubespawner-profiles-list > label.profile {
margin-bottom: 12px;
padding-bottom: 0;
}

/* Authenticator form */
#login-main .auth-form-header {
background: var(--accent-color) !important;
Expand All @@ -125,8 +132,8 @@ a{

/* Focus states */

.navbar.navbar-default .navbar-nav>li>a:focus,
.navbar.navbar-default .navbar-nav>.open>a:focus,
.navbar.bg-body-tertiary .navbar-nav>li>a:focus,
.navbar.bg-body-tertiary .navbar-nav>.open>a:focus,
a:focus {
color: var(--text-color);
background-color: var(--accent-color);
Expand Down Expand Up @@ -192,14 +199,14 @@ a:hover{
text-decoration-thickness: var(--text-decoration-thickness);
}

.navbar.navbar-default .navbar-nav>li>a:hover {
.navbar.bg-body-tertiary .navbar-nav>li>a:hover {
color: var(--text-color);
background-color: var(--navbar-hover-color);
text-decoration: underline;
}

.navbar.navbar-default .navbar-nav>.open>a,
.navbar.navbar-default .navbar-nav>.open>a:hover{
.navbar.bg-body-tertiary .navbar-nav>.open>a,
.navbar.bg-body-tertiary .navbar-nav>.open>a:hover{
background-color: {{ navbar_hover_color | default("#00a3b0") }};
}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers = [
"Topic :: Software Development :: Build Tools",
"Operating System :: OS Independent",
]
dependencies = ["jupyterhub"]
dependencies = ["jupyterhub>=5.0.0"]

[project.urls]
"Bug Reports" = "https://github.com/nebari-dev/nebari-jupyterhub-theme/issues"
Expand Down