diff options
-rw-r--r-- | src/frontend/mod.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index b37dfea..28c4c15 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -42,6 +42,12 @@ mod templates { link[rel="micropub", href="/micropub"]; // Static, because it's built into the server itself link[rel="authorization_endpoint", href=&endpoints.authorization_endpoint]; link[rel="token_endpoint", href=&endpoints.token_endpoint]; + @if endpoints.webmention.is_some() { + link[rel="webmention", href=&endpoints.webmention.as_ref()]; + } + @if endpoints.microsub.is_some() { + link[rel="microsub", href=&endpoints.microsub.as_ref()]; + } } body { nav#headerbar { @@ -466,6 +472,14 @@ mod templates { p."p-note" { @card["properties"]["note"][0]["value"].as_str().unwrap_or_else(|| card["properties"]["note"][0].as_str().unwrap()) } + @if card["properties"]["url"].is_array() { + ul { + "Can be found elsewhere at:" + @for url in card["properties"]["url"].as_array().unwrap().iter().filter_map(|v| v.as_str()).filter(|v| v != &card["properties"]["uid"][0].as_str().unwrap()) { + li { a."u-url"[href=url, rel="me"] { @url } } + } + } + } } } Food<'a>(food: &'a serde_json::Value) { |