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:
committed by
Baptiste Gelez
parent
4182e67dbf
commit
e9f2f769be
@@ -15,8 +15,9 @@
|
||||
])
|
||||
|
||||
@if !recents.is_empty() {
|
||||
<div class="h-feed">
|
||||
<h2>
|
||||
@i18n!(ctx.1, "Latest articles")
|
||||
<span class="p-name">@i18n!(ctx.1, "Latest articles")</span>
|
||||
<small><a href="@uri!(user::atom_feed: name = user.get_fqn(ctx.0))" title="@i18n!(ctx.1, "Atom feed")">@icon!("rss")</a></small>
|
||||
</h2>
|
||||
<div class="cards">
|
||||
@@ -24,14 +25,17 @@
|
||||
@:post_card(ctx, article)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if !reshares.is_empty() {
|
||||
<h2>@i18n!(ctx.1, "Recently boosted")</h2>
|
||||
<div class="h-feed">
|
||||
<h2 class="p-name">@i18n!(ctx.1, "Recently boosted")</h2>
|
||||
<div class="cards">
|
||||
@for article in reshares {
|
||||
@:post_card(ctx, article)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,41 +4,45 @@
|
||||
|
||||
@(ctx: BaseContext, user: &User, follows: bool, is_remote: bool, instance_url: String)
|
||||
|
||||
<div class="user">
|
||||
<div class="flex wrap">
|
||||
@avatar(ctx.0, &user, Size::Medium, false, ctx.1)
|
||||
<div class="h-card">
|
||||
<div class="user">
|
||||
<div class="flex wrap">
|
||||
@avatar(ctx.0, &user, Size::Medium, false, ctx.1)
|
||||
|
||||
<h1 class="grow flex vertical">
|
||||
@user.name(ctx.0)
|
||||
<small>@user.get_fqn(ctx.0)</small>
|
||||
</h1>
|
||||
<h1 class="grow flex vertical">
|
||||
<span class="p-name">@user.name(ctx.0)</span>
|
||||
<small class="p-nickname">@user.get_fqn(ctx.0)</small>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
@if user.is_admin {
|
||||
<span class="badge">@i18n!(ctx.1, "Admin")</span>
|
||||
}
|
||||
<p>
|
||||
@if user.is_admin {
|
||||
<span class="badge">@i18n!(ctx.1, "Admin")</span>
|
||||
}
|
||||
|
||||
@if ctx.2.clone().map(|u| u.id == user.id).unwrap_or(false) {
|
||||
<span class="badge">@i18n!(ctx.1, "It is you")</span>
|
||||
<a href="@uri!(user::edit: name = &user.username)" class="button inline-block">@i18n!(ctx.1, "Edit your profile")</a>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
@if ctx.2.clone().map(|u| u.id == user.id).unwrap_or(false) {
|
||||
<span class="badge">@i18n!(ctx.1, "It is you")</span>
|
||||
<a href="@uri!(user::edit: name = &user.username)" class="button inline-block">@i18n!(ctx.1, "Edit your profile")</a>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@if is_remote {
|
||||
<a class="inline-block" href="@user.ap_url" target="_blank">@i18n!(ctx.1, "Open on {0}"; instance_url)</a>
|
||||
}
|
||||
|
||||
@if ctx.2.clone().map(|u| u.id != user.id).unwrap_or(false) {
|
||||
<form class="inline" method="post" action="@uri!(user::follow: name = user.get_fqn(ctx.0))">
|
||||
@if follows {
|
||||
<input type="submit" value="@i18n!(ctx.1, "Unfollow")">
|
||||
@if is_remote {
|
||||
<a class="inline-block u-url" href="@user.ap_url" rel="me" target="_blank">@i18n!(ctx.1, "Open on {0}"; instance_url)</a>
|
||||
} else {
|
||||
<input type="submit" value="@i18n!(ctx.1, "Follow")">
|
||||
<a class="u-url" href="@user.ap_url"></a>
|
||||
}
|
||||
</form>
|
||||
}
|
||||
</div>
|
||||
<div class="user-summary">
|
||||
@Html(user.summary.clone())
|
||||
|
||||
@if ctx.2.clone().map(|u| u.id != user.id).unwrap_or(false) {
|
||||
<form class="inline" method="post" action="@uri!(user::follow: name = user.get_fqn(ctx.0))">
|
||||
@if follows {
|
||||
<input type="submit" value="@i18n!(ctx.1, "Unfollow")">
|
||||
} else {
|
||||
<input type="submit" value="@i18n!(ctx.1, "Follow")">
|
||||
}
|
||||
</form>
|
||||
}
|
||||
</div>
|
||||
<div class="user-summary p-note">
|
||||
@Html(user.summary.clone())
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user