Skip to content

Commit 2736387

Browse files
committed
cwh-repo2docker: Add brand text to navigation header
1 parent ef20cbb commit 2736387

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

jupyterhub/cwh-repo2docker/cwh_repo2docker/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def template_namespace(self):
2828
self.settings['hub_prefix']),
2929
prefix=self.settings['base_url'],
3030
service_prefix=self.settings['service_prefix'],
31+
brand_text=self.settings['brand_text'],
3132
user=user,
3233
static_url=self.static_url,
3334
no_spawner_check=True

jupyterhub/cwh-repo2docker/cwh_repo2docker/service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ class CwhRepo2DockerApplication(Application):
2727
help="The config file to load").tag(
2828
config=True
2929
)
30+
brand_text = Unicode(
31+
'Environments',
32+
help='Brand text in navigation header').tag(
33+
config=True
34+
)
3035
aliases = {
3136
"config-file": "CwhRepo2DockerApplication.config_file"
3237
}
@@ -72,6 +77,7 @@ async def start(self):
7277
'app': self,
7378
'log': self.log,
7479
'base_url': base_url,
80+
'brand_text': self.brand_text,
7581
'jinja2_env': jinja_env,
7682
'static_path': jupyterhub_static_path,
7783
'static_url_prefix': url_path_join(base_url, 'static/'),

jupyterhub/cwh-repo2docker/cwh_repo2docker/templates/page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<span id="jupyterhub-logo" class="pull-left">
88
<a href="{{logo_url or base_url}}"><img src='{{base_url}}logo' alt='JupyterHub logo' class='jpy-logo' title='Home'/></a>
99
</span>
10+
<span class="navbar-brand">{{ brand_text }}</span>
1011
</div>
1112
<div class="collapse navbar-collapse" id="thenavbar">
1213
<ul class="nav navbar-nav">

0 commit comments

Comments
 (0)