Skip to content

Commit

Permalink
html/css additions after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
heartsucker committed Feb 4, 2017
1 parent 1b4a6f3 commit 10c937a
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 45 deletions.
4 changes: 2 additions & 2 deletions securedrop/journalist_templates/admin_edit_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ <h2>Reset Two Factor Authentication</h2>
<form method="post" action="{{ url_for('admin_reset_two_factor_totp') }}" id="reset-two-factor-totp">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
<input name="uid" type="hidden" value="{{ user.id }}"/>
<button type="submit" class="center">RESET TWO FACTOR AUTHENTICATION (GOOGLE AUTHENTICATOR)</button>
<button type="submit" class="pull-right">RESET TWO FACTOR AUTHENTICATION (GOOGLE AUTHENTICATOR)</button>
</form>
<br />
<form method="post" action="{{ url_for('admin_reset_two_factor_hotp') }}" id="reset-two-factor-hotp">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
<input name="uid" type="hidden" value="{{ user.id }}"/>
<button class="sd-button" type="submit" class="center">RESET TWO FACTOR AUTHENTICATION (HOTP YUBIKEY)</button>
<button class="sd-button" type="submit" class="pull-right">RESET TWO FACTOR AUTHENTICATION (HOTP YUBIKEY)</button>
</form>
{% endblock %}
4 changes: 2 additions & 2 deletions securedrop/journalist_templates/edit_account.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ <h2>Reset Two Factor Authentication</h2>
<p>If your two factor authentication credentials have been lost or compromised, or you got a new device, you can reset your credentials here. <em>If you do this, make sure you are ready to set up your new device, otherwise you will be locked out of your account.</em></p>
<form method="post" action="{{ url_for('account_reset_two_factor_totp') }}" id="reset-two-factor-totp">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
<button class="sd-button" type="submit" class="center">RESET TWO FACTOR AUTHENTICATION (GOOGLE AUTHENTICATOR)</button>
<button class="sd-button" type="submit" class="pull-right">RESET TWO FACTOR AUTHENTICATION (GOOGLE AUTHENTICATOR)</button>
</form>
<br />
<form method="post" action="{{ url_for('account_reset_two_factor_hotp') }}" id="reset-two-factor-hotp">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
<button class="sd-button" type="submit" class="center">RESET TWO FACTOR AUTHENTICATION (HOTP YUBIKEY)</button>
<button class="sd-button" type="submit" class="pull-right">RESET TWO FACTOR AUTHENTICATION (HOTP YUBIKEY)</button>
</form>
{% endblock %}
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>Login to access the journalist interface</h1>
<p class="center"><input type="text" name="username" autocomplete="off" placeholder="Username" autofocus></p>
<p class="center"><input type="password" name="password" placeholder="Password"></p>
<p class="center"><input name="token" id="token" type="text" placeholder="Two-factor Code"></p>
<p class="center"><button class="sd-button" type="submit">LOG IN</i></button></p>
<p class="pull-right"><button class="sd-button" type="submit">LOG IN</i></button></p>
</form>

{% endblock %}
17 changes: 1 addition & 16 deletions securedrop/sass/_base.sass
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
font-weight: bold

h1, h2
color: #004080
color: #7985aa

h1
text-align: left
Expand Down Expand Up @@ -389,17 +389,6 @@
ul.plain
list-style: none

a#already-have-codename
float: right
margin-right: 12px
margin-top: 10px
color: #888
text-decoration: none

&:hover
text-decoration: underline
color: #666

ul.starred
margin-bottom: 1.33em

Expand Down Expand Up @@ -442,10 +431,6 @@
#regenerate-codename-btn-label
font-size: 10px

.journalist-view-single
padding-top: 0px
text-align: center

footer
clear: both
text-align: center
Expand Down
5 changes: 2 additions & 3 deletions securedrop/sass/_button-rules.sass
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,13 @@
&.primary
display: block
margin: 0 auto
width: 35%
display: inline-block

&.secondary
@extend .primary
background: white
color: $color_blue_medium
border: 1px solid $color_blue_medium
color: $color_purple_medium_darker
border: 1px solid $color_purple_medium_darker

button.block, a.btn.block
text-decoration: none
Expand Down
3 changes: 1 addition & 2 deletions securedrop/sass/_variables.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ $color_warning_red: #ae3840
$color_warning_red_pale: #d55c5c

$color_purple_medium: #7985aa
$color_purple_medium_darker: #727c9b

$color_grey_dark: #626161
$color_grey_medium: #9e9e9e
$color_grey_light: #f0f0f0
$color_grey_xlight: #f3f3f3

$color_blue_medium: #004080
8 changes: 4 additions & 4 deletions securedrop/source_templates/generate.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block body %}
<h1>Remember this codename and keep it secret</h1>
<p class="center">To protect your identity, we're assigning you a unique codename.</p>
<p>To protect your identity, we're assigning you a unique codename.</p>

<hr class="no-line" />

Expand All @@ -29,9 +29,9 @@ <h1>Remember this codename and keep it secret</h1>

<hr class="no-line" />

<form id="create-form" method="post" action="/create" autocomplete="off">
<form id="create-form" method="post" action="/create" autocomplete="off" class="pull-right">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<button type="submit" class="sd-button btn block pull-right" id="continue-button">CONTINUE</button>
<a id="already-have-codename" href="/login">Already have a codename?</a>
<a id="already-have-codename" href="/login" class="sd-button btn secondary">ALREADY HAVE A CODENAME?</a>
<button type="submit" class="sd-button btn primary" id="continue-button">CONTINUE</button>
</form>
{% endblock %}
2 changes: 1 addition & 1 deletion securedrop/source_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h2 class="welcome-text">
</h2>
<hr class="cut-out" />
<p>If you have already submitted documents in the past, log in here to check for responses.</p>
<a href="/login" id="login-button" class="sd-button btn block">CHECK FOR A RESPONSE</a>
<a href="/login" id="login-button" class="sd-button btn primary index">CHECK FOR A RESPONSE</a>
</div>
</div>

Expand Down
9 changes: 4 additions & 5 deletions securedrop/source_templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ <h1>Enter Codename</h1>
<form method="post" action="/login" autocomplete="off">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<p class="center"><input id="login-with-existing-codename" type="password" name="codename" class="codename" autocomplete="off" placeholder="Enter your codename" autofocus /></p>
<p class="center">
<p class="center"><input type="password" name="codename" class="codename" autocomplete="off" placeholder="Enter your codename" autofocus /></p>
<a href="{{ url_for('lookup') }}" class="btn secondary" id="cancel">CANCEL</a>
<p class="center"><button type="submit" class="sd-button btn block">CONTINUE</button></p>
</p>
<div class="pull-right">
<a href="{{ url_for('index') }}" class="btn secondary" id="cancel">CANCEL</a>
<button type="submit" class="sd-button btn primary">CONTINUE</button>
</div>
</form>
{% endblock %}
11 changes: 3 additions & 8 deletions securedrop/source_templates/lookup.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@
<h1 class="headline">Submit Materials</h1>
<p class="explanation">If you are already familiar with GPG, you can optionally encrypt your files and messages with our <a href="/journalist-key" class="text-link">public key</a> before submission. Files are encrypted as they are received by SecureDrop. <a href="/why-journalist-key" class="text-link">Learn more</a>.</p>

<h1 class="headline">Submit documents and messages</h1>

<div class="center">
<p>You can send a file, a message, or both.</p>

<hr class="no-line">
</div>
<p>You can send a file, a message, or both.</p>
<hr class="no-line">

<form id="upload" method="post" action="/submit" enctype="multipart/form-data" autocomplete="off">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
Expand All @@ -40,7 +35,7 @@ <h1 class="headline">Submit documents and messages</h1>
</div>

<hr class="no-line">
<div class="center">
<div class="pull-right">
<a href="{{ url_for('lookup') }}" class="btn secondary" id="cancel">CANCEL</a>
<button type="submit" class="sd-button btn primary">SUBMIT</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion securedrop/tests/test_unit_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_generate_has_login_link(self):
if they already have a codename, rather than create a new one.
"""
resp = self.client.get('/generate')
self.assertIn("Already have a codename?", resp.data)
self.assertIn("ALREADY HAVE A CODENAME?", resp.data)
soup = BeautifulSoup(resp.data)
already_have_codename_link = soup.select('a#already-have-codename')[0]
self.assertEqual(already_have_codename_link['href'], '/login')
Expand Down

0 comments on commit 10c937a

Please sign in to comment.