# Inspired by https://gitmemory.com/issue/jupyterhub/zero-to-jupyterhub-k8s/1266/632726020

apiVersion: v1
kind: ConfigMap
metadata:
  name: hub-templates
data:
  login.html: |
    {% extends "templates/login.html" %}
    {% block main %}
    <div class="container">
      <center><h2>Welcome to JWebbinar</h2></center><br/>
      Welcome to the JWebbinar compute platform. Use this service to work along with class material. The requirements to use this service are to register for JWebbinar sessions and create a MyST account.<br/>
    </div>
    {{ super() }}
    {% endblock %}
  spawn.html: |
    {% extends "page.html" %}
    {% if announcement_spawn %}
      {% set announcement = announcement_spawn %}
    {% endif %}

    {% block main %}

    <div class="container">
      {% block heading %}

      <div class="row">
        <center>
          <h2>Welcome to JWebbinar</h2>
        </center>
        <br/>
      Welcome to the JWebbinar compute platform. Use this service to work along with class material. The requirements to use this service are to register for JWebbinar sessions and create a MyST account.<br/><br/>
      JupyterHub is a platform for running Python Notebooks and other code remotely in a web browser without needing to install anything on your local computer.  Notebooks are a convenient way of packaging code, its outputs, and visualizations.  For JWebbinars, we expect that you will most often navigate directly to executable Notebooks via direct links.  In addition, you can access a generic user interface by navigating to <a href="https://jwebbinar.science.stsci.edu/">https&#58;//jwebbinar.science.stsci.edu</a>, which will allow you to create new, empty notebooks and navigate a user-specific filesystem.<br/><br/>
      We cannot guarantee that this service, or any files created in this service, will be available beyond the duration of class sessions.<br/><br/><br/>
      </div>

      {% endblock %}
      <div class="row col-sm-offset-2 col-sm-8">
        {% if for_user and user.name != for_user.name -%}
          <p>Spawning server for {{ for_user.name }}</p>
        {% endif -%}
        {% if error_message -%}
          <p class="spawn-error-msg text-danger">
            Error: {{error_message}}
          </p>
        {% endif %}
        <form enctype="multipart/form-data" id="spawn_form" action="{{url}}" method="post" role="form">
          {{spawner_options_form | safe}}
          <br>
          <input type="submit" value="Start server" class="btn btn-jupyter form-control">
        </form>
      </div>
    </div>

    {% endblock %}
