Fix photo sizing
Committed d90357
--- a/canopy/static/screen.css
+++ b/canopy/static/screen.css
border-radius: 50%;
-webkit-box-sizing: unset;
display: inline-block;
- height: 3em;
margin: 0 .25em 0 0;
}
/* .h-card > div {
--- a/canopy/templates/template.html
+++ b/canopy/templates/template.html
$if tx.user.is_owner:
<style>
.h-card img {
- border: .2em solid #007ba7;
- height: 2.6em;
- width: 2.6em; }
+ border: .2em solid #007ba7; }
</style>
<script src=/assets/js-cookie-3.0.5.js></script>
<script>
<header>
<div class=h-card>
$if "photo" in owner:
- <img class=u-photo src=/media/$owner["photo"][0]>
+ $ em = 16
+ $if tx.user.is_owner:
+ $ photo_height, photo_width = [f"{round(em * 2.6)}"] * 2
+ $else:
+ $ photo_height, photo_width = [f"{round(em * 3)}"] * 2
+ <img alt="my eye" height=$photo_height width=$photo_width
+ class=u-photo src=/media/$owner["photo"][0]>
<div class=namedesc>
<a class=p-name rel=home href=/><strong>$owner["name"][0]</strong></a><br>
$if "note" in owner: