Skip to content

Commit

Permalink
Center and size officer profile pictures (#974)
Browse files Browse the repository at this point in the history
## Fixes issue
#931

## Description of Changes
I centered and addressed sizing issues with the officer profile pictures
in the profile page, officer list page, and officer image page.

## Screenshots (if appropriate)
Located in the comments.

## Tests and linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
  • Loading branch information
michplunkett authored Jul 17, 2023
1 parent eb84c13 commit b462294
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
32 changes: 32 additions & 0 deletions OpenOversight/app/static/css/openoversight.css
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,42 @@ tr:hover .row-actions {
}

.officer-face {
border: none;
height: 300px;
margin: auto;
}

.officer-face.officer-profile {
display: block;
}

@media (min-width: 992px) {
.officer-face.officer-profile {
height: 510px;
}
}

@media (min-width: 768px) and (max-width: 991px) {
.officer-face.officer-profile {
height: 590px;
}
}

@media (max-width: 767px) {
.officer-face.officer-profile {
height: 460px;
padding-bottom: 10px;
}
}

#face-img {
border: none;
display: block;
margin: auto;
max-height: 500px;
padding-bottom: 10px;
}

.face-wrap {
margin: auto;
position: relative;
Expand Down
4 changes: 3 additions & 1 deletion OpenOversight/app/templates/partials/officer_faces.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% for path in paths %}
{# Don't try to link if only image is the placeholder #}
{% if faces %}<a href="{{ url_for('main.display_tag', tag_id=faces[loop.index - 1].id) }}">{% endif %}
<img class="officer-face" src="{{ path }}" alt="Submission">
<img class="officer-face officer-profile"
src="{{ path }}"
alt="Submission">
{% if faces %}</a>{% endif %}
{% endfor %}
2 changes: 1 addition & 1 deletion OpenOversight/app/templates/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1>Tag {{ face.id }} Detail</h1>
</div>
<div class="container">
<div class="row">
<div class="col-sm-12">You can download the full officer photo by clicking the image below:</div>
<div class="col-sm-12 text-center">You can download the full officer photo by clicking the image below.</div>
</div>
<br>
<div class="row">
Expand Down

0 comments on commit b462294

Please sign in to comment.