Skip to content

Commit

Permalink
Added link to HP buttons
Browse files Browse the repository at this point in the history
Changed HP text if logged in
  • Loading branch information
narduin committed Jul 8, 2020
1 parent 1317a85 commit 10c621d
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 94 deletions.
19 changes: 16 additions & 3 deletions main/templates/main/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<section class="intro hp-intro">
<div class="intro-content intro-content--hp">
<h1>Covid-Open survey</h1>
{% if not request.user.is_authenticated %}
<p>
{% blocktrans %}
COVID-19 has turned our lives upside down. And while this virus continues to spread, millions around the world
Expand All @@ -18,8 +19,20 @@ <h1>Covid-Open survey</h1>
<p>
<strong>I want to help fight COVID-19!</strong>
</p>
<button class="button--white">Start the survey</button>
<a href="#content">Or learn more before taking the survey.</a>
<a class="button button--white" href="{{ request.openhumans_login_url }}">Start the survey</a>
<a href="#settings">Or learn more before taking the survey.</a>
{% else %}
<p>
{% blocktrans %}
Thank you for taking part in this project! The team is grateful and eager for your participation.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
You can find your consent and email settings <a href="#settings">below.</a>
{% endblocktrans %}
</p>
{% endif %}
</div>
<div class="hp-intro__illustration">
<svg width="457" height="418" viewBox="0 0 457 418" xmlns="http://www.w3.org/2000/svg">
Expand Down Expand Up @@ -273,7 +286,7 @@ <h3>{% trans "Transmission properties of the virus" %}</h3>
<h3>{% trans "Medication repurposing" %}</h3>
</li>
</ul>
<button class="button--orange questions__button">{% trans "Take the survey" %}</button>
<a href="{{ request.openhumans_login_url }}" class="button button--orange questions__button">{% trans "Take the survey" %}</a>
</section>

<section class="approach">
Expand Down
2 changes: 1 addition & 1 deletion main/templates/main/includes/consent.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load i18n %}

<section class="consent">
<section id="settings" class="consent">
<div>
{% if openhumansmember.surveyaccount.consent_given %}
<h2>{% trans "You have given your consent, however you can still withdraw it at any time." %}</h2>
Expand Down
9 changes: 7 additions & 2 deletions src/css/parts/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,24 @@ kbd,
samp {
position: relative;
}
button {
button,
.button {
margin: 12px 0;
padding: 16px 20px;
display: block;
max-width: 200px;
font-size: 2.2rem;
font-weight: bold;
text-align: center;
text-decoration: none;
color: var(--dark);
border: none;
border-radius: 2px;
cursor: pointer;
box-shadow: none;
}
button:focus {
button:focus,
.button:focus {
outline: solid 4px cornflowerblue;
}
.button--white {
Expand Down
Loading

0 comments on commit 10c621d

Please sign in to comment.