diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-12-02 22:59:47 -0500 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-12-02 22:59:47 -0500 |
commit | 4b586436c8f9baf59b9bdffcdb259f50879f8c7d (patch) | |
tree | 705aa4261018cd0fda207e4861126aa53dd2acdc /lib | |
parent | e0995d2fb78af496f6dcaebab18728e8f9eff22c (diff) |
better microformats from @singpolyma
darcs-hash:20081203035947-84dde-68ce5b3ba2b49bd76e9ef8572cea7857cd05a659.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stream.php | 14 | ||||
-rw-r--r-- | lib/util.php | 8 |
2 files changed, 12 insertions, 10 deletions
diff --git a/lib/stream.php b/lib/stream.php index 7a1a9172e..37edfc978 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -23,7 +23,6 @@ require_once(INSTALLDIR.'/lib/personal.php'); class StreamAction extends PersonalAction { - function public_views_menu() { $action = $this->trimmed('action'); @@ -54,7 +53,7 @@ class StreamAction extends PersonalAction { $user = common_current_user(); # XXX: RDFa - common_element_start('li', array('class' => 'notice_single', + common_element_start('li', array('class' => 'notice_single hentry', 'id' => 'notice-' . $notice->id)); if ($user) { if ($user->hasFave($notice)) { @@ -63,10 +62,11 @@ class StreamAction extends PersonalAction { common_favor_form($notice); } } + common_element_start('span', 'vcard author'); $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE); common_element_start('a', array('href' => $profile->profileurl)); common_element('img', array('src' => ($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_STREAM_SIZE), - 'class' => 'avatar stream', + 'class' => 'avatar stream photo', 'width' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE, 'alt' => @@ -74,10 +74,11 @@ class StreamAction extends PersonalAction { $profile->nickname)); common_element_end('a'); common_element('a', array('href' => $profile->profileurl, - 'class' => 'nickname'), + 'class' => 'nickname fn url'), $profile->nickname); + common_element_end('span'); # FIXME: URL, image, video, audio - common_element_start('p', array('class' => 'content')); + common_element_start('p', array('class' => 'content entry-title entry-content')); if ($notice->rendered) { common_raw($notice->rendered); } else { @@ -93,7 +94,8 @@ class StreamAction extends PersonalAction { $noticeurl = $notice->uri; } common_element_start('p', 'time'); - common_element('a', array('class' => 'permalink', + common_element('a', array('class' => 'permalink published', + 'rel' => 'bookmark', 'href' => $noticeurl, 'title' => common_exact_date($notice->created)), common_date_string($notice->created)); diff --git a/lib/util.php b/lib/util.php index 03720a778..c44d54fbf 100644 --- a/lib/util.php +++ b/lib/util.php @@ -926,9 +926,9 @@ function common_at_link($sender_id, $nickname) { $sender = Profile::staticGet($sender_id); $recipient = common_relative_profile($sender, common_canonical_nickname($nickname)); if ($recipient) { - return '<a href="'.htmlspecialchars($recipient->profileurl).'" class="atlink">'.$nickname.'</a>'; + return '<span class="vcard"><a class="fn nickname url" rel="reply" href="'.htmlspecialchars($recipient->profileurl).'" class="atlink">'.$nickname.'</a></span>'; } else { - return $nickname; + return '<span class="vcard"> <span class="fn nickname">'.$nickname.'</span> </span>'; } } @@ -1751,7 +1751,7 @@ function common_pagination($have_before, $have_after, $page, $action, $args=NULL $newargs = ($args) ? array_merge($args,$pargs) : $pargs; common_element_start('li', 'before'); - common_element('a', array('href' => common_local_url($action, $newargs)), + common_element('a', array('href' => common_local_url($action, $newargs), 'rel' => 'prev'), _('« After')); common_element_end('li'); } @@ -1760,7 +1760,7 @@ function common_pagination($have_before, $have_after, $page, $action, $args=NULL $pargs = array('page' => $page+1); $newargs = ($args) ? array_merge($args,$pargs) : $pargs; common_element_start('li', 'after'); - common_element('a', array('href' => common_local_url($action, $newargs)), + common_element('a', array('href' => common_local_url($action, $newargs), 'rel' => 'next'), _('Before »')); common_element_end('li'); } |