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 styling to key retrieval #54

Merged
merged 1 commit into from
Apr 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion server/templates/server/retrieve.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,21 @@ <h4>{{ computer.serial }}</h4>

<div class="row">
<div class="col-sm-6 col-md-6">
<p><strong>{{ the_request.secret.get_secret_type_display }}:</strong><br /><code>{{ the_request.secret.secret }}</code></p>
<p><strong>{{ the_request.secret.get_secret_type_display }}:</strong><br />
<code>
{% spaceless %}
{% for char in the_request.secret.secret %}
{% if char in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" %}
<span class="letter">{{ char }}</span>
{% elif char in "0123456789" %}
<span class="number">{{ char }}</span>
{% else %}
<span class="other">{{ char }}</span>
{% endif %}
{% endfor %}
{% endspaceless %}
</code>
</p>

<p>This approval is valid for 7 days, after which you will need to submit another request for access.</p>
</div>
Expand Down
21 changes: 20 additions & 1 deletion site_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,23 @@ h1, h2, h3, h4, h5, h6, h3 a{
font-family: 'Lato', "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
font-weight:normal;
color: black;
}
}

code {
background-color: #444;
padding: 5px;
}
code span {
padding-left: 2px;
padding-right: 2px;
font-size: 1.25em;
}
code span.letter {
color: #fff;
}
code span.number {
color: #a1bcea;
}
code span.other {
color: #f2a5bd;
}