Skip to content

Commit

Permalink
Merge pull request #54 from cwhits/key-styling
Browse files Browse the repository at this point in the history
Add styling to key retrieval
  • Loading branch information
grahamgilbert authored Apr 20, 2018
2 parents 1dc5bab + bd10aca commit 2775083
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
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;
}

0 comments on commit 2775083

Please sign in to comment.