diff options
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/style.css | 24 | ||||
-rw-r--r-- | src/frontend/templates/mod.rs | 11 |
2 files changed, 31 insertions, 4 deletions
diff --git a/src/frontend/style.css b/src/frontend/style.css index 1d6586b..a0add44 100644 --- a/src/frontend/style.css +++ b/src/frontend/style.css @@ -26,9 +26,9 @@ h1, .xxxlarge { margin-bottom: 0; font-size: 3.052rem; } -h2 .xxlarge {font-size: 2.441rem;} -h3 .xlarge {font-size: 1.953rem;} -h4 .larger {font-size: 1.563rem;} +h2, .xxlarge {font-size: 2.441rem;} +h3, .xlarge {font-size: 1.953rem;} +h4, .larger {font-size: 1.563rem;} h5, .large {font-size: 1.25rem;} h6, .normal {font-size: 1rem;} small, .small { font-size: 0.8em; } @@ -159,4 +159,20 @@ article.h-card img.u-photo { height: 8rem; border: 1px solid gray; margin-right: .75em; -} \ No newline at end of file +} + +.mini-h-card img { + height: 2em; + display: inline-block; + border: 2px solid gray; + border-radius: 100%; + margin-right: 0.5rem; +} + +.mini-h-card * { + vertical-align: middle; +} + +.mini-h-card a { + text-decoration: none; +} diff --git a/src/frontend/templates/mod.rs b/src/frontend/templates/mod.rs index a7c01e0..3585804 100644 --- a/src/frontend/templates/mod.rs +++ b/src/frontend/templates/mod.rs @@ -68,6 +68,17 @@ markup::define! { h1."p-name" { @post["properties"]["name"][0].as_str().unwrap() } + } else { + @if post["properties"]["author"][0].is_object() { + section."mini-h-card" { + a.larger[href=post["properties"]["author"][0]["properties"]["uid"][0].as_str().unwrap()] { + @if post["properties"]["author"][0]["properties"]["photo"][0].is_string() { + img[src=post["properties"]["author"][0]["properties"]["photo"][0].as_str().unwrap()] {} + } + @post["properties"]["author"][0]["properties"]["name"][0].as_str().unwrap() + } + } + } } div { span { |