diff --git a/binderhub/main.py b/binderhub/main.py index 7ef55f614..25557805f 100644 --- a/binderhub/main.py +++ b/binderhub/main.py @@ -7,6 +7,13 @@ from .base import BaseHandler +SPEC_NAMES = { + "gh": "GitHub repository", + "gist": "GitHub Gist", + "gl": "GitLab repository", + "git": "Git repository: ", + "zenodo": "Zenodo DOI" +} class MainHandler(BaseHandler): """Main handler for requests""" @@ -46,6 +53,7 @@ def get(self, provider_prefix, _unescaped_spec): raise HTTPError(400, str(e)) provider_spec = f'{provider_prefix}/{spec}' + social_desc = f"{SPEC_NAMES[provider_prefix]}: {spec}" nbviewer_url = None if provider_prefix == "gh": # we can only produce an nbviewer URL for github right now @@ -60,6 +68,7 @@ def get(self, provider_prefix, _unescaped_spec): base_url=self.settings['base_url'], badge_base_url=self.settings['badge_base_url'], provider_spec=provider_spec, + social_desc=social_desc, nbviewer_url=nbviewer_url, # urlpath=self.get_argument('urlpath', None), submit=True, diff --git a/binderhub/static/images/logo_social.png b/binderhub/static/images/logo_social.png index 18e07b47f..a5c25f0c3 100644 Binary files a/binderhub/static/images/logo_social.png and b/binderhub/static/images/logo_social.png differ diff --git a/binderhub/templates/about.html b/binderhub/templates/about.html index 9032e4cb9..ad5047703 100644 --- a/binderhub/templates/about.html +++ b/binderhub/templates/about.html @@ -1,5 +1,9 @@ {% extends "page.html" %} +{% block head %} + +{{ super() }} +{% endblock head %} {% block main %}
diff --git a/binderhub/templates/index.html b/binderhub/templates/index.html index 5f95529bd..ea7257a41 100644 --- a/binderhub/templates/index.html +++ b/binderhub/templates/index.html @@ -4,6 +4,9 @@ + + + {{ super() }} {% endblock head %} diff --git a/binderhub/templates/loading.html b/binderhub/templates/loading.html index 2adcacfec..39bc3aaf7 100644 --- a/binderhub/templates/loading.html +++ b/binderhub/templates/loading.html @@ -3,6 +3,9 @@ {% block head %} + + + {{ super() }} diff --git a/binderhub/templates/page.html b/binderhub/templates/page.html index f6af6722b..67a761e65 100644 --- a/binderhub/templates/page.html +++ b/binderhub/templates/page.html @@ -8,12 +8,10 @@ - - {% endblock head %}