Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add start page #61

Merged
merged 15 commits into from
Feb 16, 2022
5 changes: 5 additions & 0 deletions app/main/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def index():
return render_template("index.html", title="Mentor matcher")


@main_bp.route("/match", methods=["GET"])
def match():
return render_template("match.html", title="Mentor matcher")


@main_bp.route("/cookies")
def cookies():
return render_template("cookies.html", title="Cookies")
Expand Down
45 changes: 16 additions & 29 deletions app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,21 @@
{% endblock %}
{% block content %}

<div class="grid-row main-wrapper--lg">
<div class="grid-column-full">
<h2>Tasks</h2>
<div class="page--content">
<p>Pick a task length.</p>
<div class="button-group" role="group" aria-label="Basic example">
<button type="button" class="button" onclick="handleClick('small')">50 participants</button>
<button type="button" class="button" onclick="handleClick('large')">500 participants</button>
</div>
</div>
</div>
<div class="grid-row">
<div class="grid-column-two-thirds">
<div class="page--content">
<h2 class="heading-md">Before you start</h2>
<ol>
<li><strong>This tool will only work with data in specific formats.</strong> You must have two files – <code>mentees.csv</code> and <code>mentors.csv</code> – to start the matching process. Those files need to be formatted with specific column headings. You can <a href="#">download a template</a> from this website.</li>
johnpeart marked this conversation as resolved.
Show resolved Hide resolved
<li><strong>Do not close your browser window during the matching process.</strong> Doing this may cause the matching process to fail and you to lose your matches.</li>
<li><strong>The larger the number of matches you need, the longer this takes.</strong> Matching mentors to mentees takes around 10 minutes to match 500 participants.</li>
</ol>
<hr>
<div class="button-group">
<a href="/match" class="button button--action">Start now</a>
johnpeart marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
</div>
</div>

<dialog class="dialog" id="dialog-box">
<!-- this dialog will only show when required -->
<!-- note that this won't work in Safari yet -->
<section class="dialog--header">
<h2 class="heading-lg dialog--title">Matching complete</h2>
</section>
<section class="dialog--content">
<p>The matching process is complete.</p>
<p>Use the <kbd>Download matches</kbd> button to get the results.</p>
</section>
<footer class="dialog--actions">
<a class="button button--dialog" id="download-matches" title="Download matching results">Download
matches</a>
<button onclick="closeDialog('dialog-box')" class="button button--secondary button--dialog button--close">Close
this dialog</button>
</footer>
</dialog>
{% endblock %}
{% endblock %}
63 changes: 63 additions & 0 deletions app/templates/match.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{% extends "base.html" %}
{% block title %}Match mentees to mentors{% endblock %}
{% block head %}
{{ super() }}
{% endblock %}

{% block pagecaption %}Mentor matcher{% endblock %}
{% block pageheading %}Match mentors to mentees{% endblock %}
{% block pageexcerpt %}Upload your data and wait for matching to complete.{% endblock %}

{% block content %}

<div class="grid-row main-wrapper--lg">
<div class="grid-column-full">
<h2>Tasks</h2>
<div class="page--content">
<p>Pick a task length.</p>
<div class="button-group" role="group" aria-label="Basic example">
<button type="button" class="button" onclick="handleClick('small')">50 participants</button>
<button type="button" class="button" onclick="handleClick('large')">500 participants</button>
</div>
</div>
</div>
</div>

<dialog class="dialog" id="dialog-box">
<!-- this dialog will only show when required -->
<!-- note that this won't work in Safari yet -->
<section class="dialog--header">
<h2 class="heading-lg dialog--title">Matching complete</h2>
</section>
<section class="dialog--content">
<p>The matching process is complete.</p>
<p>Use the <kbd>Download matches</kbd> button to get the results.</p>
</section>
<footer class="dialog--actions">
<a class="button button--dialog" id="download-matches" title="Download matching results">Download
matches</a>
<button onclick="closeDialog('dialog-box')" class="button button--secondary button--dialog button--close">Close
this dialog</button>
</footer>
</dialog>

<div class="grid-row main-wrapper--lg">
<div class="grid-column-full">
<details>
<summary>Logging information</summary>
<table class="table">
<thead>
<tr>
<th width="50%">ID</th>
<th width="20%">Status</th>
<th width="30%">Result</th>
</tr>
</thead>
<tbody id="tasks">

</tbody>
</table>
</details>
</div>
</div>
{% endblock %}