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

Commit

Permalink
Merge pull request Quansight#2 from Quansight/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
costrouc authored Nov 2, 2020
2 parents e0d8cd8 + eed0202 commit 9be0dde
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 95 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Custom JupyterHub Templates for Jade/Pangeo
# Custom JupyterHub Templates for QHub

This repo contains html jinja2 templates for customising the appearance of JupyterHub. Each HTML file here will override the files in `https://github.com/jupyterhub/jupyterhub/tree/master/share/jupyter/hub/templates`.

Expand Down
64 changes: 0 additions & 64 deletions extra-assets/css/pangeo-style.css

This file was deleted.

67 changes: 67 additions & 0 deletions extra-assets/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@font-face {
font-family: "Panton Black Caps";
/* src: url("http://ff.cdn.1001fonts.net/p/a/panton.black-caps.otf") */
src: url("panton.black-caps.otf");
}

@font-face {
font-family: "Panton Light Caps";
src: url("panton.light-caps.otf");
}

.main h1 {
color: #652e8e;
font-family: "Panton Black Caps";
margin-top: 30px;
margin-bottom: 30px;
}

.main h2 {
font-family: "Panton Light Caps";
font-size: 2rem;
color: #652e8e;
margin-bottom: 20px;
}

.main p {
font-size: 1.7rem;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

.navbar.navbar-default {
background: -webkit-linear-gradient(left, #4f4173, #957da6);
/* Chrome10+, Safari5.1+ */
background: linear-gradient(left, #4f4173, #957da6);
border: None;
}

.navbar.navbar-default .navbar-nav>li>a,
.navbar.navbar-default .navbar-text {
color: #E8E8E8;
}

.navbar.navbar-default .navbar-nav>li>a:hover,
.navbar.navbar-default .navbar-nav>li>a:focus {
background-color: #00a3b0;
}

.navbar.navbar-default .navbar-nav>.open>a,
.navbar.navbar-default .navbar-nav>.open>a:hover,
.navbar.navbar-default .navbar-nav>.open>a:focus {
background-color: #00a3b0;
}

#login-main .auth-form-header {
background: #32C574 !important;
}

.btn-jupyter {
color: #fff;
background-color: #32C574 !important;
border-color: #32C574 !important;
}

#login-main .service-login {
vertical-align: top !important;
padding-top: 60px;
}
Binary file removed extra-assets/images/jupyter_pangeo_small_logo.png
Binary file not shown.
21 changes: 6 additions & 15 deletions templates/login.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
{% extends "templates/login.html" %}
{% set announcement = '' %}

{% block main %}
<div class="container text-center pangeo">
<h1>{{ pangeo_hub_title or 'Pangeo JupyterHub' }}</h1>
<h2>{{ pangeo_hub_subtitle }}</h2>
{% extends "templates/login.html" %} {% set announcement = '' %} {% block main %}
<div class="container text-center main">
<h1>{{ hub_title or 'QHub' }}</h1>
<h2>{{ hub_subtitle }}</h2>
<p>
{% if pangeo_welcome %}
{{ (pangeo_welcome | safe) }}
{% else %}
Welcome to this Pangeo JupyterHub. For more information about Pangeo,
visit <a href="http://pangeo.io">pangeo.io</a>.
{% endif %}
{% if welcome %} {{ (welcome | safe) }} {% else %} Welcome to this Qhub. For more information about QHub, visit <a href="https://qhub.dev/">qhub.dev</a>. {% endif %}
</p>
</div>
{{ super() }}
{% endblock %}
{{ super() }} {% endblock %}
16 changes: 4 additions & 12 deletions templates/page.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{% extends "templates/page.html" %}

{% block stylesheet %}
<link rel="stylesheet" href="{{ static_url("custom/css/pangeo-style.css") }}" type="text/css"/>
<link rel="stylesheet" href="{{ static_url("css/style.min.css") }}" type="text/css"/>
{% endblock %}

{# requires jupyerhub > 0.9.4 https://github.com/jupyterhub/jupyterhub/pull/2296 #}
{% block logo %}
{% extends "templates/page.html" %} {% block stylesheet %}
<link rel="stylesheet" href="{{ static_url(" custom/css/style.css ") }}" type="text/css" />
<link rel="stylesheet" href="{{ static_url(" css/style.min.css ") }}" type="text/css" /> {% endblock %} {# requires jupyerhub > 0.9.4 https://github.com/jupyterhub/jupyterhub/pull/2296 #} {% block logo %}
<span id="jupyterhub-logo" class="pull-left">
<a href="{{logo_url or base_url}}"><img src="{{static_url("custom/images/jupyter_qhub_logo.svg") }}" alt='JupyterHub' class='jpy-logo' title='Home'/></a>
</span>
{% endblock %}
and
</span> {% endblock %}
6 changes: 3 additions & 3 deletions test_jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# QHUB will control these as ways to customize the template
c.JupyterHub.template_vars = {
'pangeo_hub_title': 'this is a test title',
'pangeo_hub_subtitle': 'this is a subtitle',
'pangeo_welcome': 'this is a message to login page',
'hub_title': 'This is QHub',
'hub_subtitle': 'your scalable open source data science laboratory.',
'welcome': 'have fun.',
}

0 comments on commit 9be0dde

Please sign in to comment.