Add microformat tags (#341)

Close #229 
Adding `<div>` might have broken the layout in some places. I've tried to fix it, tell me if I missed it somewhere
This commit is contained in:
fdb-hiroshima
2018-12-08 21:52:46 +01:00
committed by Baptiste Gelez
parent 4182e67dbf
commit e9f2f769be
11 changed files with 108 additions and 66 deletions
+3 -4
View File
@@ -45,12 +45,11 @@ impl Size {
pub fn avatar(conn: &Connection, user: &User, size: Size, pad: bool, catalog: &Catalog) -> Html<String> {
let name = escape(&user.name(conn)).to_string();
Html(format!(
r#"<div
class="avatar {size} {padded}"
r#"<div class="avatar {size} {padded}"
style="background-image: url('{url}');"
title="{title}"
aria-label="{title}"
></div>"#,
aria-label="{title}"></div>
<img class="hidden u-photo" src="{url}"/>"#,
size = size.as_str(),
padded = if pad { "padded" } else { "" },
url = user.avatar_url(conn),