Some more Microformats2 data for notices and rendering

This commit is contained in:
Mikael Nordfeldth 2016-03-02 13:29:54 +01:00
parent 6529fdd28d
commit dc1ceca86e
2 changed files with 9 additions and 3 deletions

View File

@ -301,9 +301,15 @@ class NoticeListItem extends Widget
foreach ($attentions as $attn) { foreach ($attentions as $attn) {
$class = $attn->isGroup() ? 'group' : 'account'; $class = $attn->isGroup() ? 'group' : 'account';
$this->pa[] = array('href' => $attn->profileurl, $profileurl = $attn->getUri();
if (common_valid_http_url($profileurl)) {
$class .= ' u-uid';
} else {
$profileurl = $attn->getUrl();
}
$this->pa[] = array('href' => $profileurl,
'title' => $attn->getNickname(), 'title' => $attn->getNickname(),
'class' => "addressee {$class}", 'class' => "addressee {$class} p-name u-url",
'text' => $attn->getStreamName()); 'text' => $attn->getStreamName());
} }

View File

@ -692,7 +692,7 @@ function common_linkify_mention(array $mention)
$xs = new XMLStringer(false); $xs = new XMLStringer(false);
$attrs = array('href' => $mention['url'], $attrs = array('href' => $mention['url'],
'class' => 'h-card '.$mention['type']); 'class' => 'h-card u-url p-nickname '.$mention['type']);
if (!empty($mention['title'])) { if (!empty($mention['title'])) {
$attrs['title'] = $mention['title']; $attrs['title'] = $mention['title'];