This repository was archived by the owner on Feb 15, 2024. It is now read-only.
forked from Quansight/qhub-jupyterhub-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eval "$(lorri direnv)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# exclude jupyterhub created assets | ||
share | ||
jupyterhub-proxy.pid | ||
jupyterhub.sqlite | ||
jupyterhub_cookie_secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: jupyterhub-theme | ||
dependencies: | ||
- jupyterhub | ||
- jupyterlab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ pkgs ? import <nixpkgs> {}, pythonPackages ? pkgs.python3Packages }: | ||
|
||
pkgs.mkShell { | ||
buildInputs = [ | ||
pythonPackages.jupyterhub | ||
|
||
# keep this line if you use bash | ||
pkgs.bashInteractive | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
{% extends "templates/page.html" %} | ||
|
||
{% block stylesheet %} | ||
<link rel="stylesheet" href="{{ static_url("extra-assets/css/pangeo-style.css") }}" type="text/css"/> | ||
<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 %} | ||
<span id="jupyterhub-logo" class="pull-left"> | ||
<a href="{{logo_url or base_url}}"><img src="{{static_url("extra-assets/images/jupyter_qhub_logo.svg") }}" alt='JupyterHub' class='jpy-logo' title='Home'/></a> | ||
<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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p share | ||
cp -r $(python -c "import jupyterhub.app; print(jupyterhub.app.DATA_FILES_PATH)") share | ||
chmod -R 755 share | ||
# we have to copy assets since jupyterhub does not have an easy way to add static paths... | ||
cp -r extra-assets/css extra-assets/images share/jupyterhub/static/custom | ||
|
||
jupyterhub --config test_jupyterhub_config.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
c.JupyterHub.authenticator_class = 'jupyterhub.auth.DummyAuthenticator' | ||
c.DummyAuthenticator.password = 'test' | ||
|
||
# since we accept any username for launching we cannot use the default pam spawner | ||
c.JupyterHub.spawner_class = 'jupyterhub.spawner.SimpleLocalProcessSpawner' | ||
|
||
c.JupyterHub.logo_file = 'share/jupyterhub/static/custom/images/jupyter_qhub_logo_small.png' | ||
# we have to manually set the data file path to include custom assets... | ||
c.JupyterHub.data_files_path = './share/jupyterhub' | ||
c.JupyterHub.template_paths = [ | ||
'./templates', | ||
'./share/jupyterhub/templates/' | ||
] | ||
|
||
# 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', | ||
} |