Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Display qhub version
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusdc committed Apr 19, 2022
1 parent e14b58e commit 17413b7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
10 changes: 9 additions & 1 deletion qhub_jupyterhub_theme/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
{% endif %}
{% endblock %}

{% block footer %}
{% if display_version %}
<div class="version">
{{ version or 'v0.0.1'}}
</span>
{% endif %}
{% endblock %}

{% block stylesheet %}
<link rel="stylesheet" href="{{ static_url("css/style.min.css") }}" type="text/css"/>
<style>
Expand All @@ -39,7 +47,7 @@
{% for jsurl in jsurls %}
<script type="text/javascript" src="{{ jsurl }}" defer></script>
{% endfor %}

{% endblock %}

{# requires jupyerhub > 0.9.4 https://github.com/jupyterhub/jupyterhub/pull/2296 #} {% block logo %}
Expand Down
14 changes: 14 additions & 0 deletions qhub_jupyterhub_theme/templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,17 @@
vertical-align: top !important;
padding-top: 60px;
}

.version {
position: fixed;
bottom: 20px; /* Place the button at the bottom of the page */
right: 30px; /* Place the button 30px from the right */
z-index: 99; /* Make sure it does not overlap */
width: 100px;
padding: 5px;
background: none;
color: {{ primary_color | default("#4f4173") }};
text-align: center;
font-size: 16px; /* Increase font size */
font-family: "Panton Black Caps";
}
1 change: 1 addition & 0 deletions test_jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
'h2_color': "#652e8e",
'navbar_text_color': '#E8E8E8',
'narbar_hover_color': '#00a3b0',
# 'display_version': 'True',
# 'qhub_theme_extra_js_urls': ['https://google.com/qhub.js']
}

0 comments on commit 17413b7

Please sign in to comment.