diff --git a/web/index.html b/web/index.html index dc0e8a4..894179a 100644 --- a/web/index.html +++ b/web/index.html @@ -82,11 +82,12 @@ border-collapse: collapse; } table p { - margin: .5em; + margin: .25em 1em; } tr.post-table, td.post-table { border: 1px dashed #bf616a; + padding: .5em; } td.top { vertical-align: top; diff --git a/web/src/lib.rs b/web/src/lib.rs index 8a1d0b8..7e2aa67 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -321,7 +321,8 @@ pub fn ObjectPage() -> impl IntoView { pub fn Object(object: serde_json::Value) -> impl IntoView { let summary = object.summary().unwrap_or_default().to_string(); let content = dissolve::strip_html_tags(object.content().unwrap_or_default()); - let date = object.published().map(|x| x.to_rfc2822()).unwrap_or_default(); + let date = object.published().map(|x| x.format("%Y/%m/%d %H:%M:%S").to_string()).unwrap_or_default(); + let date_rfc = object.published().map(|x| x.to_rfc3339()).unwrap_or_default(); let author_id = object.attributed_to().id().unwrap_or_default(); let author = CACHE.get(&author_id).unwrap_or(serde_json::Value::String(author_id.clone())); view! { @@ -343,7 +344,7 @@ pub fn Object(object: serde_json::Value) -> impl IntoView { - {date} + {date} @@ -368,8 +369,8 @@ pub fn InlineActivity(activity: serde_json::Value) -> impl IntoView { } else { "[private]" }; - let date = object.published().map(|x| x.to_rfc2822()).unwrap_or_else(|| - activity.published().map(|x| x.to_rfc2822()).unwrap_or_default() + let date = object.published().map(|x| x.format("%Y/%m/%d %H:%M:%S").to_string()).unwrap_or_else(|| + activity.published().map(|x| x.format("%Y/%m/%d %H:%M:%S").to_string()).unwrap_or_default() ); let kind = activity.activity_type().unwrap_or(apb::ActivityType::Activity); view! { @@ -380,13 +381,14 @@ pub fn InlineActivity(activity: serde_json::Value) -> impl IntoView { - {kind.as_ref().to_string()} + {privacy} + {kind.as_ref().to_string()} - {Uri::pretty(&object_id)} + {date} @@ -397,7 +399,6 @@ pub fn InlineActivity(activity: serde_json::Value) -> impl IntoView { apb::ActivityType::Create => view! { }.into_view(), _ => view! {}.into_view(), }} - {date}" "{privacy} } }