Initial move towards microformats2

No validation has been attempted yet. Lots of changes left. This
is visibly not (very) different from the previous CSS layout. But
some simplifications have been made.

Might cause issues with local changes to themes and CSS. Also maybe
javascript which depends on certain legacy microformats elements.

The move to microformats2 is motivated by the announcement that all
microformats should be migrated to version 2, as of 2014-06-20 at:
http://microformats.org/2014/06/20/microformats-org-turns-9-upgrade-to-microformats2
This commit is contained in:
Mikael Nordfeldth 2014-06-21 21:01:17 +02:00
parent d16af504f6
commit 414a95a784
56 changed files with 327 additions and 539 deletions

View File

@ -96,11 +96,11 @@ class DocAction extends Action
*/
function showContentBlock()
{
$this->elementStart('div', array('id' => 'content', 'class' => 'hentry'));
$this->elementStart('div', array('id' => 'content', 'class' => 'h-entry'));
$this->showPageTitle();
$this->showPageNoticeBlock();
$this->elementStart('div', array('id' => 'content_inner',
'class' => 'entry-content'));
'class' => 'e-content'));
// show the actual content (forms, lists, whatever)
$this->showContent();
$this->elementEnd('div');

View File

@ -202,7 +202,7 @@ class SearchNoticeListItem extends NoticeListItem {
function showContent()
{
// FIXME: URL, image, video, audio
$this->out->elementStart('p', array('class' => 'entry-content'));
$this->out->elementStart('p', array('class' => 'e-content'));
if ($this->notice->rendered) {
$this->out->raw($this->highlight($this->notice->rendered, $this->terms));
} else {

View File

@ -293,14 +293,14 @@ class RegisterAction extends Action
}
}
// overrided to add hentry, and content-inner class
// overrided to add h-entry, and content-inner class
function showContentBlock()
{
$this->elementStart('div', array('id' => 'content', 'class' => 'hentry'));
$this->elementStart('div', array('id' => 'content', 'class' => 'h-entry'));
$this->showPageTitle();
$this->showPageNoticeBlock();
$this->elementStart('div', array('id' => 'content_inner',
'class' => 'entry-content'));
'class' => 'e-content'));
// show the actual content (forms, lists, whatever)
$this->showContent();
$this->elementEnd('div');

View File

@ -147,20 +147,20 @@ class ShowApplicationAction extends Action
$consumer = $this->application->getConsumer();
$this->elementStart('div', 'entity_profile vcard');
$this->elementStart('div', 'entity_profile h-card');
// TRANS: Header on the OAuth application page.
$this->element('h2', null, _('Application profile'));
if (!empty($this->application->icon)) {
$this->element('img', array('src' => $this->application->icon,
'class' => 'photo logo entity_depiction'));
'class' => 'u-photo logo entity_depiction'));
}
$this->element('a', array('href' => $this->application->source_url,
'class' => 'url fn entity_fn'),
'class' => 'u-url p-name entity_fn'),
$this->application->name);
$this->element('a', array('href' => $this->application->homepage,
'class' => 'url entity_org'),
'class' => 'u-url entity_org'),
$this->application->organization);
$this->element('div',

View File

@ -40,7 +40,7 @@ require_once INSTALLDIR.'/lib/noticelist.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
class ShownoticeAction extends Action
class ShownoticeAction extends ManagedAction
{
/**
* Notice object to show
@ -184,33 +184,7 @@ class ShownoticeAction extends Action
*/
function title()
{
$base = $this->profile->getFancyName();
// TRANS: Title of the page that shows a notice.
// TRANS: %1$s is a user name, %2$s is the notice creation date/time.
return sprintf(_('%1$s\'s status on %2$s'),
$base,
common_exact_date($this->notice->created));
}
/**
* Handle input
*
* Only handles get, so just show the page.
*
* @param array $args $_REQUEST data (unused)
*
* @return void
*/
protected function handle()
{
parent::handle();
if (StatusNet::isAjax()) {
$this->showAjax();
} else {
$this->showPage();
}
return $this->notice->getTitle();
}
/**
@ -223,23 +197,9 @@ class ShownoticeAction extends Action
function showContent()
{
$this->elementStart('ol', array('class' => 'notices xoxo'));
$nli = new SingleNoticeItem($this->notice, $this);
$nli->show();
$this->elementEnd('ol');
}
function showAjax()
{
$this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
// TRANS: Title for page that shows a notice.
$this->element('title', null, _m('TITLE','Notice'));
$this->elementEnd('head');
$this->elementStart('body');
$nli = new NoticeListItem($this->notice, $this);
$nli->show();
$this->elementEnd('body');
$this->endHTML();
$this->elementEnd('ol');
}
/**
@ -270,7 +230,7 @@ class ShownoticeAction extends Action
{
$user = User::getKV($this->profile->id);
if (!$user) {
if (!$user instanceof User) {
return;
}
@ -289,12 +249,3 @@ class ShownoticeAction extends Action
'content' => $this->notice->content));
}
}
// @todo FIXME: Class documentation missing.
class SingleNoticeItem extends DoFollowListItem
{
function avatarSize()
{
return AVATAR_STREAM_SIZE;
}
}

View File

@ -364,7 +364,7 @@ class Peopletag extends PeopletagListItem
function showStart()
{
$mode = $this->peopletag->private ? 'private' : 'public';
$this->out->elementStart('div', array('class' => 'hentry peopletag peopletag-profile mode-'.$mode,
$this->out->elementStart('div', array('class' => 'h-entry peopletag peopletag-profile mode-'.$mode,
'id' => 'peopletag-' . $this->peopletag->id));
}

View File

@ -101,7 +101,7 @@ class TagprofileAction extends Action
function showContent()
{
if (Event::handle('StartShowTagProfileForm', array($this, $this->profile)) && $this->profile) {
$this->elementStart('div', 'entity_profile vcard author');
$this->elementStart('div', 'entity_profile h-card p-author');
// TRANS: Header in list form.
$this->element('h2', null, _('User profile'));
@ -118,7 +118,7 @@ class TagprofileAction extends Action
'class' => 'entity_nickname nickname'),
$this->profile->nickname);
if ($this->profile->fullname) {
$this->element('div', 'fn entity_fn', $this->profile->fullname);
$this->element('div', 'p-name entity_fn', $this->profile->fullname);
}
if ($this->profile->location) {
@ -128,7 +128,7 @@ class TagprofileAction extends Action
if ($this->profile->homepage) {
$this->element('a', array('href' => $this->profile->homepage,
'rel' => 'me',
'class' => 'url entity_url'),
'class' => 'u-url entity_url'),
$this->profile->homepage);
}

View File

@ -108,17 +108,17 @@ class VersionAction extends Action
/*
* Override to add hentry, and content-inner classes
* Override to add h-entry, and content-inner classes
*
* @return void
*/
function showContentBlock()
{
$this->elementStart('div', array('id' => 'content', 'class' => 'hentry'));
$this->elementStart('div', array('id' => 'content', 'class' => 'h-entry'));
$this->showPageTitle();
$this->showPageNoticeBlock();
$this->elementStart('div', array('id' => 'content_inner',
'class' => 'entry-content'));
'class' => 'e-content'));
// show the actual content (forms, lists, whatever)
$this->showContent();
$this->elementEnd('div');

View File

@ -232,6 +232,19 @@ class Notice extends Managed_DataObject
return common_local_url('shownotice', array('notice' => $this->id), null, null, false);
}
public function getTitle()
{
$title = null;
if (Event::handle('GetNoticeTitle', array($this, &$title))) {
// TRANS: Title of a notice posted without a title value.
// TRANS: %1$s is a user name, %2$s is the notice creation date/time.
$title = sprintf(_('%1$s\'s status on %2$s'),
$this->getProfile()->getFancyName(),
common_exact_date($this->created));
}
return $title;
}
/*
* Get the original representation URL of this notice.
*/

View File

@ -376,19 +376,16 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<link rel="stylesheet" type="text/css" href="theme/base/css/display.css" media="screen, projection, tv"/>
<link rel="stylesheet" type="text/css" href="theme/neo/css/display.css" media="screen, projection, tv"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!--[if IE]><link rel="stylesheet" type="text/css" href="theme/base/css/ie.css" /><![endif]-->
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" theme/base/css/ie6.css" /><![endif]-->
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" theme/base/css/ie7.css" /><![endif]-->
<script src="js/extlib/jquery.js"></script>
<script src="js/install.js"></script>
</head>
<body id="install">
<div id="wrap">
<div id="header">
<address id="site_contact" class="vcard">
<a class="url home bookmark" href=".">
<img class="logo photo" src="theme/neo/logo.png" alt="GNU social"/>
<span class="fn org">GNU social</span>
<address id="site_contact" class="h-card">
<a class="u-url p-name home bookmark org" href=".">
<img class="logo u-photo" src="theme/neo/logo.png" alt="GNU social"/>
GNU social
</a>
</address>
<div id="site_nav_global_primary"></div>

View File

@ -863,7 +863,7 @@ var SN = { // StatusNet
var m = $(this);
m.addClass(SN.C.S.Processing);
$.get(m.attr('href'), {ajax: 1}, function (data) {
m.parent('.entry-content').html($(data).find('#attachment_view .entry-content').html());
m.parent('.e-content').html($(data).find('#attachment_view .e-content').html());
});
return false;
@ -1361,7 +1361,7 @@ var SN = { // StatusNet
var profileLink = $('#nav_profile a').attr('href');
if (profileLink) {
var authorUrl = $(notice).find('.vcard.author a.url').attr('href');
var authorUrl = $(notice).find('.h-card.u-url').attr('href');
if (authorUrl == profileLink) {
if (action == 'all' || action == 'showstream') {
// Posts always show on your own friends and profile streams.

View File

@ -582,8 +582,7 @@ class Action extends HTMLOutputter // lawsuit
*/
function showLogo()
{
$this->elementStart('address', array('id' => 'site_contact',
'class' => 'vcard'));
$this->elementStart('address', array('id' => 'site_contact', 'class' => 'h-card'));
if (Event::handle('StartAddressData', array($this))) {
if (common_config('singleuser', 'enabled')) {
$user = User::singleUser();
@ -596,7 +595,7 @@ class Action extends HTMLOutputter // lawsuit
$url = common_local_url('public');
}
$this->elementStart('a', array('class' => 'url home bookmark',
$this->elementStart('a', array('class' => 'home bookmark',
'href' => $url));
if (StatusNet::isHTTPS()) {
@ -622,13 +621,11 @@ class Action extends HTMLOutputter // lawsuit
}
if (!empty($logoUrl)) {
$this->element('img', array('class' => 'logo photo',
$this->element('img', array('class' => 'logo u-photo p-name',
'src' => $logoUrl,
'alt' => common_config('site', 'name')));
}
$this->text(' ');
$this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
$this->elementEnd('a');
Event::handle('EndAddressData', array($this));

View File

@ -87,50 +87,26 @@ class ApplicationList extends Widget
{
$user = common_current_user();
$this->out->elementStart(
'li',
array(
'class' => 'application',
'id' => 'oauthclient-' . $this->application->id
)
);
$this->out->elementStart('li', array('class' => 'application h-entry',
'id' => 'oauthclient-' . $this->application->id));
$this->out->elementStart('span', 'vcard author');
$this->out->elementStart(
'a',
array(
'href' => common_local_url(
'showapplication',
$this->out->elementStart('a', array('href' => common_local_url('showapplication',
array('id' => $this->application->id)),
'class' => 'url'
)
);
'class' => 'h-card'));
if (!empty($this->application->icon)) {
$this->out->element(
'img',
array(
'src' => $this->application->icon,
'class' => 'photo avatar'
)
);
$this->out->element('img', array('src' => $this->application->icon,
'class' => 'avatar u-photo'));
}
$this->out->element('span', 'fn', $this->application->name);
$this->out->text($this->application->name);
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$this->out->raw(' by ');
$this->out->element(
'a',
array(
'href' => $this->application->homepage,
'class' => 'url'
),
$this->application->organization
);
$this->out->element('a', array('href' => $this->application->homepage,
'class' => 'u-url'),
$this->application->organization);
$this->out->element('p', 'note', $this->application->description);
$this->out->elementEnd('li');
@ -204,59 +180,33 @@ class ConnectedAppsList extends Widget
{
$app = Oauth_application::getKV('id', $this->connection->application_id);
$this->out->elementStart(
'li',
array(
'class' => 'application',
'id' => 'oauthclient-' . $app->id
)
);
$this->out->elementStart('li', array('class' => 'application h-entry',
'id' => 'oauthclient-' . $app->id));
$this->out->elementStart('span', 'vcard author');
$this->out->elementStart(
'a',
array(
'href' => $app->source_url,
'class' => 'url'
)
);
$this->out->elementStart('a', array('href' => $app->source_url,
'class' => 'h-card p-name'));
if (!empty($app->icon)) {
$this->out->element(
'img',
array(
'src' => $app->icon,
'class' => 'photo avatar'
)
);
$this->out->element('img', array('src' => $app->icon,
'class' => 'avatar u-photo'));
}
if ($app->name != 'anonymous') {
$this->out->element('span', 'fn', $app->name);
$this->out->text($app->name);
} else {
// TRANS: Name for an anonymous application in application list.
$this->out->element('span', 'p-name', _('Unknown application'));
}
$this->out->elementEnd('a');
if ($app->name == 'anonymous') {
// TRANS: Name for an anonymous application in application list.
$this->out->element('span', 'fn', _('Unknown application'));
}
$this->out->elementEnd('span');
if ($app->name != 'anonymous') {
// @todo FIXME: i18n trouble.
// TRANS: Message has a leading space and a trailing space. Used in application list.
// TRANS: Before this message the application name is put, behind it the organisation that manages it.
$this->out->raw(_(' by '));
$this->out->element(
'a',
array(
'href' => $app->homepage,
'class' => 'url'
),
$app->organization
);
$this->out->element('a', array('href' => $app->homepage,
'class' => 'h-card'),
$app->organization);
}
// TRANS: Application access type

View File

@ -38,12 +38,12 @@ class Attachment extends AttachmentListItem
function showLink() {
if (Event::handle('StartShowAttachmentLink', array($this->out, $this->attachment))) {
$this->out->elementStart('div', array('id' => 'attachment_view',
'class' => 'hentry'));
'class' => 'h-entry'));
$this->out->elementStart('div', 'entry-title');
$this->out->element('a', $this->linkAttr(), _('Download link'));
$this->out->elementEnd('div');
$this->out->elementStart('div', 'entry-content');
$this->out->elementStart('div', 'e-content');
$this->showRepresentation();
$this->out->elementEnd('div');
Event::handle('EndShowAttachmentLink', array($this->out, $this->attachment));

View File

@ -90,7 +90,7 @@ class AttachmentList extends Widget
function showListStart()
{
$this->out->elementStart('ol', array('class' => 'attachments entry-content'));
$this->out->elementStart('ol', array('class' => 'attachments'));
}
function showListEnd()

View File

@ -114,9 +114,9 @@ class AttachmentListItem extends Widget
case 'image/jpeg':
try {
$thumb = $this->attachment->getThumbnail();
$this->out->element('img', array('src' => $thumb->getUrl(), 'alt' => ''));
$this->out->element('img', array('class'=>'u-photo', 'src' => $thumb->getUrl(), 'alt' => $e->file->title));
} catch (UseFileAsThumbnailException $e) {
$this->out->element('img', array('src' => $e->file->getUrl(), 'alt' => $e->file->title));
$this->out->element('img', array('class'=>'u-photo', 'src' => $e->file->getUrl(), 'alt' => $e->file->title));
} catch (UnsupportedMediaException $e) {
// FIXME: Show a good representation of unsupported/unshowable images
}
@ -151,7 +151,7 @@ class AttachmentListItem extends Widget
$poster = null;
}
$this->out->elementStart($mediatype,
array('class'=>'attachment_player',
array('class'=>"attachment_player u-{$mediatype}",
'poster'=>$poster,
'controls'=>'controls'));
$this->out->element('source',

View File

@ -66,7 +66,7 @@ class DoFollowListItem extends NoticeListItem
function showContent()
{
// FIXME: URL, image, video, audio
$this->out->elementStart('p', array('class' => 'entry-content'));
$this->out->elementStart('div', array('class' => 'e-content'));
if (!empty($this->notice->rendered)) {
$html = $this->notice->rendered;
@ -83,6 +83,6 @@ class DoFollowListItem extends NoticeListItem
$this->out->raw($html);
$this->out->elementEnd('p');
$this->out->elementEnd('div');
}
}

View File

@ -83,36 +83,29 @@ class GroupList extends Widget
function showGroup()
{
$this->out->elementStart('li', array('class' => 'profile hentry',
$this->out->elementStart('li', array('class' => 'profile h-card',
'id' => 'group-' . $this->group->id));
$user = common_current_user();
$this->out->elementStart('div', 'entity_profile vcard entry-content');
$this->out->elementStart('div', 'entity_profile');
$logo = ($this->group->stream_logo) ?
$this->group->stream_logo : User_group::defaultLogo(AVATAR_STREAM_SIZE);
$logo = $this->group->stream_logo ?: User_group::defaultLogo(AVATAR_STREAM_SIZE);
$this->out->elementStart('a', array('href' => $this->group->homeUrl(),
'class' => 'url entry-title',
'class' => 'u-url p-nickname',
'rel' => 'contact group'));
$this->out->element('img', array('src' => $logo,
'class' => 'photo avatar',
'class' => 'avatar u-photo',
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,
'alt' =>
($this->group->fullname) ? $this->group->fullname :
$this->group->nickname));
$this->out->text(' ');
$hasFN = ($this->group->fullname) ? 'nickname' : 'fn org nickname';
$this->out->elementStart('span', $hasFN);
$this->out->raw($this->highlight($this->group->nickname));
$this->out->elementEnd('span');
'alt' => $this->group->getBestName()));
$this->out->text($this->group->getNickname());
$this->out->elementEnd('a');
if ($this->group->fullname) {
$this->out->text(' ');
$this->out->elementStart('span', 'fn org');
$this->out->elementStart('span', 'p-name');
$this->out->raw($this->highlight($this->group->fullname));
$this->out->elementEnd('span');
}
@ -125,7 +118,7 @@ class GroupList extends Widget
if ($this->group->homepage) {
$this->out->text(' ');
$this->out->elementStart('a', array('href' => $this->group->homepage,
'class' => 'url'));
'class' => 'u-url'));
$this->out->raw($this->highlight($this->group->homepage));
$this->out->elementEnd('a');
}

View File

@ -67,13 +67,11 @@ class GroupMiniList extends GroupList
function showGroup()
{
$this->out->elementStart('li', 'vcard');
$this->out->elementStart('a', array('title' => ($this->group->fullname) ?
$this->group->fullname :
$this->group->nickname,
$this->out->elementStart('li', 'h-card');
$this->out->elementStart('a', array('title' => $this->group->getBestName(),
'href' => $this->group->homeUrl(),
'rel' => 'contact group',
'class' => 'url'));
'class' => 'p-name u-url org'));
$logo = ($this->group->mini_logo) ?
$this->group->mini_logo : User_group::defaultLogo(AVATAR_MINI_SIZE);
@ -82,10 +80,7 @@ class GroupMiniList extends GroupList
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
'class' => 'avatar photo',
'alt' => ($this->group->fullname) ?
$this->group->fullname :
$this->group->nickname));
$this->out->element('span', 'fn org nickname', $this->group->nickname);
'alt' => $this->group->getBestName()));
$this->out->elementEnd('a');
$this->out->elementEnd('li');
}

View File

@ -77,27 +77,18 @@ class GroupSection extends Section
{
$this->out->elementStart('tr');
$this->out->elementStart('td');
$this->out->elementStart('span', 'vcard');
$this->out->elementStart('a', array('title' => ($group->fullname) ?
$group->fullname :
$group->nickname,
$this->out->elementStart('a', array('title' => $group->getBestName(),
'href' => $group->homeUrl(),
'rel' => 'contact group',
'class' => 'url'));
$this->out->text(' ');
$logo = ($group->stream_logo) ?
$group->stream_logo : User_group::defaultLogo(AVATAR_STREAM_SIZE);
'class' => 'h-card org nickname'));
$logo = $group->stream_logo ?: User_group::defaultLogo(AVATAR_STREAM_SIZE);
$this->out->element('img', array('src' => $logo,
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
'class' => 'avatar photo',
'alt' => ($group->fullname) ?
$group->fullname :
$group->nickname));
$this->out->text(' ');
$this->out->element('span', 'fn org nickname', $group->nickname);
'class' => 'avatar u-photo',
'alt' => $group->getBestName()));
$this->out->text($group->nickname);
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$this->out->elementEnd('td');
if ($group->value) {
$this->out->element('td', 'value', $group->value);

View File

@ -35,7 +35,7 @@ class InlineAttachmentList extends AttachmentList
{
function showListStart()
{
$this->out->elementStart('div', array('class' => 'entry-content thumbnails'));
$this->out->elementStart('div', array('class' => 'attachments'));
}
function showListEnd()

View File

@ -67,32 +67,25 @@ abstract class MessageListItem extends Widget
*/
function show()
{
$this->out->elementStart('li', array('class' => 'hentry notice',
$this->out->elementStart('li', array('class' => 'h-entry notice',
'id' => 'message-' . $this->message->id));
$profile = $this->getMessageProfile();
$this->out->elementStart('div', 'entry-title');
$this->out->elementStart('span', 'vcard author');
$this->out->elementStart('a', array('href' => $profile->profileurl,
'class' => 'url'));
'class' => 'p-author'));
$avatarUrl = $profile->avatarUrl(AVATAR_STREAM_SIZE);
$this->out->element('img', array('src' => $avatarUrl,
'class' => 'photo avatar',
'class' => 'avatar u-photo',
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,
'alt' =>
($profile->fullname) ? $profile->fullname :
$profile->nickname));
$this->out->element('span', array('class' => 'nickname fn'),
$profile->nickname);
'alt' => $profile->getBestName()));
$this->out->element('span', array('class' => 'nickname fn'), $profile->getNickname());
$this->out->elementEnd('a');
$this->out->elementEnd('span');
// FIXME: URL, image, video, audio
$this->out->elementStart('p', array('class' => 'entry-content'));
$this->out->elementStart('div', array('class' => 'e-content'));
$this->out->raw($this->message->rendered);
$this->out->elementEnd('p');
$this->out->elementEnd('div');
$messageurl = common_local_url('showmessage',
@ -104,7 +97,7 @@ abstract class MessageListItem extends Widget
$messageurl = $this->message->uri;
}
$this->out->elementStart('div', 'entry-content');
$this->out->elementStart('div', 'entry-metadata');
$this->out->elementStart('a', array('rel' => 'bookmark',
'class' => 'timestamp',
'href' => $messageurl));

View File

@ -113,15 +113,25 @@ class NoticeListItem extends Widget
function showNotice()
{
$this->out->elementStart('div', 'entry-title');
$this->showNoticeTitle();
$this->showAuthor();
$this->showAddressees();
$this->showContent();
$this->out->elementEnd('div');
}
function showNoticeTitle()
{
if (Event::handle('StartShowNoticeTitle', array($this))) {
$this->element('a', array('href' => $this->notice->getUrl(),
'class' => 'p-name metadata'),
$this->notice->getTitle());
Event::handle('EndShowNoticeTitle', array($this));
}
}
function showNoticeInfo()
{
$this->out->elementStart('div', 'entry-content');
$this->out->elementStart('div', 'entry-metadata');
if (Event::handle('StartShowNoticeInfo', array($this))) {
$this->showNoticeLink();
$this->showNoticeSource();
@ -164,7 +174,7 @@ class NoticeListItem extends Widget
{
if (Event::handle('StartOpenNoticeListItemElement', array($this))) {
$id = (empty($this->repeat)) ? $this->notice->id : $this->repeat->id;
$class = 'hentry notice';
$class = 'h-entry notice';
if ($this->notice->scope != 0 && $this->notice->scope != 1) {
$class .= ' limited-scope';
}
@ -209,24 +219,14 @@ class NoticeListItem extends Widget
function showAuthor()
{
$this->out->elementStart('div', 'author');
$this->out->elementStart('span', 'vcard author');
$attrs = array('href' => $this->profile->profileurl,
'class' => 'url',
'title' => $this->profile->nickname);
'class' => 'h-card p-author',
'title' => $this->profile->getNickname());
$this->out->elementStart('a', $attrs);
$this->showAvatar($this->profile);
$this->out->text($this->profile->getStreamName());
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$this->showAddressees();
$this->out->elementEnd('div');
}
function showAddressees()
@ -234,21 +234,16 @@ class NoticeListItem extends Widget
$pa = $this->getProfileAddressees();
if (!empty($pa)) {
$this->out->elementStart('span', 'addressees');
$this->out->elementStart('ul', 'addressees');
$first = true;
foreach ($pa as $addr) {
if (!$first) {
// TRANS: Separator in profile addressees list.
$this->out->text(_m('SEPARATOR',', '));
} else {
// Start of profile addressees list.
$first = false;
}
$this->out->elementStart('li', 'h-card');
$text = $addr['text'];
unset($addr['text']);
$this->out->element('a', $addr, $text);
$this->out->elementEnd('li');
}
$this->out->elementEnd('span', 'addressees');
$this->out->elementEnd('ul', 'addressees');
}
}
@ -261,7 +256,7 @@ class NoticeListItem extends Widget
foreach ($attentions as $attn) {
$class = $attn->isGroup() ? 'group' : 'account';
$pa[] = array('href' => $attn->profileurl,
'title' => $attn->nickname,
'title' => $attn->getNickname(),
'class' => "addressee {$class}",
'text' => $attn->getStreamName());
}
@ -283,8 +278,8 @@ class NoticeListItem extends Widget
*/
function showNickname()
{
$this->out->raw('<span class="nickname fn">' .
htmlspecialchars($this->profile->nickname) .
$this->out->raw('<span class="p-name">' .
htmlspecialchars($this->profile->getNickname()) .
'</span>');
}
@ -300,7 +295,7 @@ class NoticeListItem extends Widget
function showContent()
{
// FIXME: URL, image, video, audio
$this->out->elementStart('p', array('class' => 'entry-content'));
$this->out->elementStart('div', array('class' => 'e-content'));
if ($this->notice->rendered) {
$this->out->raw($this->notice->rendered);
} else {
@ -309,7 +304,7 @@ class NoticeListItem extends Widget
// versions (>> 0.4.x)
$this->out->raw(common_render_content($this->notice->content, $this->notice));
}
$this->out->elementEnd('p');
$this->out->elementEnd('div');
}
function showNoticeAttachments() {
@ -329,7 +324,7 @@ class NoticeListItem extends Widget
function showNoticeLink()
{
$this->out->elementStart('a', array('rel' => 'bookmark',
'class' => 'timestamp',
'class' => 'u-url timestamp',
'href' => $this->notice->getLocalUrl()));
$this->out->element('time', array('class' => 'dt-published',
'datetime' => common_date_iso8601($this->notice->created),
@ -511,21 +506,15 @@ class NoticeListItem extends Widget
$repeater = Profile::getKV('id', $this->repeat->profile_id);
$attrs = array('href' => $repeater->profileurl,
'class' => 'url');
'class' => 'h-card p-author',
'title' => $repeater->getFancyName());
if (!empty($repeater->fullname)) {
$attrs['title'] = $repeater->fullname . ' (' . $repeater->nickname . ')';
}
$this->out->elementStart('span', 'repeat vcard');
$this->out->elementStart('span', 'repeat h-entry');
// TRANS: Addition in notice list item if notice was repeated. Followed by a span with a nickname.
$this->out->raw(_('Repeated by'));
$this->out->raw(' ');
$this->out->raw(_('Repeated by').' ');
$this->out->elementStart('a', $attrs);
$this->out->element('span', 'fn nickname', $repeater->nickname);
$this->out->elementEnd('a');
$this->out->element('a', $attrs, $repeater->getNickname());
$this->out->elementEnd('span');
}
@ -544,7 +533,7 @@ class NoticeListItem extends Widget
if (common_logged_in()) {
$this->out->text(' ');
$reply_url = common_local_url('newnotice',
array('replyto' => $this->profile->nickname, 'inreplyto' => $this->notice->id));
array('replyto' => $this->profile->getNickname(), 'inreplyto' => $this->notice->id));
$this->out->elementStart('a', array('href' => $reply_url,
'class' => 'notice_reply',
// TRANS: Link title in notice list item to reply to a notice.

View File

@ -78,28 +78,21 @@ class NoticeSection extends Section
$notice->id));
return;
}
$this->out->elementStart('li', 'hentry notice');
$this->out->elementStart('div', 'entry-title');
$this->out->elementStart('span', 'vcard author');
$this->out->elementStart('a', array('title' => ($profile->fullname) ?
$profile->fullname :
$profile->nickname,
$this->out->elementStart('li', 'h-entry notice');
$this->out->elementStart('div', 'h-card');
$this->out->elementStart('a', array('title' => $profile->getBestName(),
'href' => $profile->profileurl,
'class' => 'url'));
'class' => 'p-author u-url p-name'));
$avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
$this->out->element('img', array('src' => $avatarUrl,
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
'class' => 'avatar photo',
'alt' => ($profile->fullname) ?
$profile->fullname :
$profile->nickname));
$this->out->text(' ');
$this->out->element('span', 'fn nickname', $profile->nickname);
'class' => 'avatar u-photo',
'alt' => $profile->getBestName()));
$this->out->text($profile->getBestName());
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$this->out->elementStart('p', 'entry-content');
$this->out->elementStart('p', 'e-content');
$this->out->text(mb_strlen($notice->content) > $this->maxchars
? mb_substr($notice->content, 0, $this->maxchars) . '[…]'
: $notice->content);

View File

@ -142,7 +142,7 @@ class PeopletagListItem extends Widget
function showStart()
{
$mode = ($this->peopletag->private) ? 'private' : 'public';
$this->out->elementStart('li', array('class' => 'hentry peopletag mode-' . $mode,
$this->out->elementStart('li', array('class' => 'h-entry peopletag mode-' . $mode,
'id' => 'peopletag-' . $this->peopletag->id));
}
@ -221,20 +221,16 @@ class PeopletagListItem extends Widget
function showCreator()
{
$this->out->elementStart('span', 'author vcard');
$attrs = array();
$attrs['href'] = $this->profile->profileurl;
$attrs['class'] = 'url';
$attrs['class'] = 'h-card p-author nickname p-name';
$attrs['rel'] = 'contact';
$attrs['title'] = $this->profile->getFancyName();
if (!empty($this->profile->fullname)) {
$attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
}
$this->out->elementStart('a', $attrs);
$this->showAvatar($this->profile);
$this->out->text($this->profile->getNickname());
$this->out->elementEnd('a');
$this->out->elementEnd('span');
}
function showUpdated()
@ -287,7 +283,6 @@ class PeopletagListItem extends Widget
function showDescription()
{
$this->out->element('div', 'entry-content description',
$this->peopletag->description);
$this->out->element('div', 'e-content description', $this->peopletag->description);
}
}

View File

@ -142,7 +142,7 @@ class ProfileListItem extends Widget
function startItem()
{
$this->out->elementStart('li', array('class' => 'profile hentry',
$this->out->elementStart('li', array('class' => 'profile h-entry',
'id' => 'profile-' . $this->profile->id));
}
@ -184,14 +184,14 @@ class ProfileListItem extends Widget
function startProfile()
{
$this->out->elementStart('div', 'entity_profile vcard entry-content');
$this->out->elementStart('div', 'entity_profile h-card');
}
function showFullName()
{
if (!empty($this->profile->fullname)) {
$this->out->text(' ');
$this->out->elementStart('span', 'fn');
$this->out->elementStart('span', 'p-name');
$this->out->raw($this->highlight($this->profile->fullname));
$this->out->elementEnd('span');
}
@ -304,13 +304,13 @@ class ProfileListItem extends Widget
function linkAttributes()
{
return array('href' => $this->profile->profileurl,
'class' => 'url entry-title',
'class' => 'u-url',
'rel' => 'contact');
}
function homepageAttributes()
{
return array('href' => $this->profile->homepage,
'class' => 'url');
'class' => 'u-url');
}
}

View File

@ -74,7 +74,7 @@ class ProfileMiniListItem extends ProfileListItem
{
function show()
{
$this->out->elementStart('li', 'vcard');
$this->out->elementStart('li', 'h-card');
if (Event::handle('StartProfileListItemProfileElements', array($this))) {
if (Event::handle('StartProfileListItemAvatar', array($this))) {
$aAttrs = $this->linkAttributes();
@ -83,11 +83,8 @@ class ProfileMiniListItem extends ProfileListItem
$this->out->element('img', array('src' => $avatarUrl,
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
'class' => 'avatar photo',
'alt' => ($this->profile->fullname) ?
$this->profile->fullname :
$this->profile->nickname));
$this->out->element('span', 'fn nickname', $this->profile->nickname);
'class' => 'avatar u-photo',
'alt' => $this->profile->getBestName()));
$this->out->elementEnd('a');
Event::handle('EndProfileListItemAvatar', array($this));
}
@ -103,7 +100,7 @@ class ProfileMiniListItem extends ProfileListItem
$aAttrs['title'] = $this->profile->getBestName();
$aAttrs['rel'] = 'contact member'; // @todo: member? always?
$aAttrs['class'] = 'url';
$aAttrs['class'] = 'u-url p-name';
return $aAttrs;
}

View File

@ -78,26 +78,17 @@ class ProfileSection extends Section
{
$this->out->elementStart('tr');
$this->out->elementStart('td');
$this->out->elementStart('span', 'vcard');
$this->out->elementStart('a', array('title' => ($profile->fullname) ?
$profile->fullname :
$profile->nickname,
$this->out->elementStart('a', array('title' => $profile->getBestName(),
'href' => $profile->profileurl,
'rel' => 'contact member',
'class' => 'url'));
$this->out->text(' ');
'class' => 'h-card u-url'));
$avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
$this->out->element('img', array('src' => $avatarUrl,
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
'class' => 'avatar photo',
'alt' => ($profile->fullname) ?
$profile->fullname :
$profile->nickname));
$this->out->text(' ');
$this->out->element('span', 'fn nickname', $profile->nickname);
'class' => 'avatar u-photo',
'alt' => $profile->getBestName()));
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$this->out->elementEnd('td');
if (isset($profile->value)) {
$this->out->element('td', 'value', $profile->value);

View File

@ -548,7 +548,7 @@ class ThreadedNoticeListInlineFavesItem extends ThreadedNoticeListFavesItem
{
function showStart()
{
$this->out->elementStart('div', array('class' => 'entry-content notice-faves'));
$this->out->elementStart('div', array('class' => 'e-content notice-faves'));
}
function showEnd()
@ -625,7 +625,7 @@ class ThreadedNoticeListInlineRepeatsItem extends ThreadedNoticeListRepeatsItem
{
function showStart()
{
$this->out->elementStart('div', array('class' => 'entry-content notice-repeats'));
$this->out->elementStart('div', array('class' => 'e-content notice-repeats'));
}
function showEnd()

View File

@ -635,17 +635,13 @@ function common_linkify_mention($mention)
$xs = new XMLStringer(false);
$attrs = array('href' => $mention['url'],
'class' => 'url');
'class' => 'h-card '.$mention['type']);
if (!empty($mention['title'])) {
$attrs['title'] = $mention['title'];
}
$xs->elementStart('span', 'vcard');
$xs->elementStart('a', $attrs);
$xs->element('span', 'fn nickname '.$mention['type'], $mention['text']);
$xs->elementEnd('a');
$xs->elementEnd('span');
$xs->element('a', $attrs, $mention['text']);
$output = $xs->getString();

View File

@ -259,7 +259,7 @@ class BookmarkPlugin extends MicroAppPlugin
}
$id = (empty($nli->repeat)) ? $nli->notice->id : $nli->repeat->id;
$class = 'hentry notice bookmark';
$class = 'h-entry notice bookmark';
if ($nli->notice->scope != 0 && $nli->notice->scope != 1) {
$class .= ' limited-scope';
}

View File

@ -68,7 +68,7 @@ ul.bookmark-tags a:hover {
top: 2px;
}
.bookmark div.entry-content {
.bookmark div.e-content {
font-size: 0.88em;
line-height: 1.2em;
margin-top: 6px;
@ -76,7 +76,7 @@ ul.bookmark-tags a:hover {
margin-bottom: 0px;
}
.bookmark:hover div.entry-content {
.bookmark:hover div.e-content {
opacity: 1;
}

View File

@ -74,7 +74,7 @@ class BookmarkListItem extends NoticeListItemAdapter
$profile = $notice->getProfile();
$out->elementStart('p', array('class' => 'entry-content'));
$out->elementStart('p', array('class' => 'e-content'));
// Whether to nofollow

View File

@ -110,7 +110,7 @@ class ConversationTree extends NoticeList
{
$notice = $this->table[$id];
$this->out->elementStart('li', array('class' => 'hentry notice',
$this->out->elementStart('li', array('class' => 'h-entry notice',
'id' => 'notice-' . $id));
$item = $this->newListItem($notice);

View File

@ -205,9 +205,8 @@ class SortableGroupListItem extends SortableSubscriptionListItem
{
$this->startProfile();
$hasFN = ($this->profile->fullname) ? 'nickname' : 'fn org nickname';
$this->out->elementStart('a', array('href' => $this->profile->homeUrl(),
'class' => 'h-card org nickname',
'class' => 'h-card p-org p-nickname',
'rel' => 'contact group'));
// getProfile here is because $this->profile is a User_group, which it should stop
// being by making sure the group listing runs a ->getGroup when it's necessary.

View File

@ -191,7 +191,7 @@ class SortableSubscriptionListItem extends SubscriptionListItem
function startProfile()
{
$this->out->elementStart('td', 'entity_profile vcard entry-content');
$this->out->elementStart('td', 'entity_profile h-card e-content');
}
function endProfile()

View File

@ -6,8 +6,8 @@
.event-notice-count { float: right; }
.event-info { float: left; }
.event-title { margin-left: 0px; }
#content .event .entry-title { margin-left: 0px; }
#content .event .entry-content { margin-left: 0px; }
#content .event .h-entry { margin-left: 0px; }
#content .event .e-content { margin-left: 0px; }
.ui-autocomplete {
max-height: 100px;
overflow-y: auto;
@ -32,13 +32,10 @@ li.rsvp-list .entities li {
margin-bottom: 8px;
display: inline;
}
li.rsvp-list .entities li .photo {
li.rsvp-list .entities li .u-photo {
margin: 0 !important;
float: none !important;
}
li.rsvp-list .entities li .fn {
display: none;
}
.notice .vevent div {
margin-bottom: 8px;

View File

@ -48,10 +48,8 @@ class EventListItem extends NoticeListItemAdapter
{
function showNotice()
{
$this->nli->out->elementStart('div', 'entry-title');
$this->nli->showAuthor();
$this->showContent();
$this->nli->out->elementEnd('div');
}
function showContent()
@ -68,9 +66,9 @@ class EventListItem extends NoticeListItemAdapter
return;
}
$out->elementStart('div', 'vevent event'); // VEVENT IN
$out->elementStart('div', 'vevent event e-content'); // VEVENT IN
$out->elementStart('h3'); // VEVENT/H3 IN
$out->elementStart('h3', 'summary'); // VEVENT/H3 IN
if (!empty($event->url)) {
$out->element('a',

View File

@ -73,7 +73,7 @@ class NoticeTree extends NoticeList
// We take responsibility for doing the li
$this->out->elementStart('li', array('class' => 'hentry notice',
$this->out->elementStart('li', array('class' => 'h-entry notice',
'id' => 'notice-' . $item->notice->id));
$item->show();

View File

@ -70,7 +70,7 @@ class GroupMessageListItem extends Widget
$group = $this->gm->getGroup();
$sender = $this->gm->getSender();
$this->out->elementStart('li', array('class' => 'hentry notice message group-message',
$this->out->elementStart('li', array('class' => 'h-entry notice message group-message',
'id' => 'message-' . $this->gm->id));
$this->out->elementStart('div', 'entry-title');
@ -90,12 +90,12 @@ class GroupMessageListItem extends Widget
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$this->out->elementStart('p', array('class' => 'entry-content message-content'));
$this->out->elementStart('p', array('class' => 'e-content message-content'));
$this->out->raw($this->gm->rendered);
$this->out->elementEnd('p');
$this->out->elementEnd('div');
$this->out->elementStart('div', 'entry-content');
$this->out->elementStart('div', 'e-content');
$this->out->elementStart('a', array('rel' => 'bookmark',
'class' => 'timestamp',
'href' => $this->gm->url));

View File

@ -39,7 +39,7 @@ function getNoticeFromElement(noticeElement)
parseFloat(latlon[1])] };
}
notice['html'] = noticeElement.find(".entry-content").html();
notice['html'] = noticeElement.find(".e-content").html();
notice['url'] = noticeElement.find("a.timestamp").attr('href');
notice['created_at'] = noticeElement.find("abbr.published").text();

View File

@ -292,27 +292,26 @@ class MobileProfilePlugin extends WAP20Plugin
function _showLogo($action)
{
$action->elementStart('address', 'vcard');
$action->elementStart('address');
if (common_config('singleuser', 'enabled')) {
$user = User::singleUser();
$url = common_local_url('showstream', array('nickname' => $user->nickname));
$url = common_local_url('showstream', array('nickname' => $user->getNickname()));
} else {
$url = common_local_url('public');
}
$action->elementStart('a', array('class' => 'url home bookmark',
$action->elementStart('a', array('class' => 'h-card home bookmark',
'href' => $url));
if (common_config('site', 'mobilelogo') ||
file_exists(Theme::file('logo.png')) ||
file_exists(Theme::file('mobilelogo.png'))) {
$action->element('img', array('class' => 'photo',
$action->element('img', array('class' => 'u-photo',
'src' => (common_config('site', 'mobilelogo')) ? common_config('site', 'mobilelogo') :
((file_exists(Theme::file('mobilelogo.png'))) ? (Theme::path('mobilelogo.png')) : Theme::path('logo.png')),
'alt' => common_config('site', 'name')));
}
$action->element('span', array('class' => 'fn org'), common_config('site', 'name'));
$action->elementEnd('a');
$action->elementEnd('address');
}

View File

@ -352,6 +352,6 @@ label[for=blog-entry-content] {
content: '\003E';
}
.user_in .notice div.entry-content {
.user_in .notice div.e-content {
max-width: 150px;
}

View File

@ -86,7 +86,7 @@ class ModPlusPlugin extends Plugin
* @param NoticeListItem $item
* @return boolean hook value
*/
function onStartShowNoticeItem($item)
function onStartShowNoticeItem(NoticeListItem $item)
{
$this->showProfileOptions($item->out, $item->profile);
return true;
@ -108,12 +108,11 @@ class ModPlusPlugin extends Plugin
* Currently only adds output for remote profiles, nothing for local users.
*
* @param HTMLOutputter $out
* @param Profile $profile (may also be an ArrayWrapper... sigh)
* @param Profile $profile
*/
protected function showProfileOptions(HTMLOutputter $out, $profile)
protected function showProfileOptions(HTMLOutputter $out, Profile $profile)
{
$isRemote = !(User::getKV('id', $profile->id));
if ($isRemote) {
if (!$profile->isLocal()) {
$target = common_local_url('remoteprofile', array('id' => $profile->id));
// TRANS: Label for access to remote profile options.
$label = _m('Remote profile options...');

View File

@ -10,14 +10,9 @@
padding: 6px 16px;
padding-left: 32px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-msie-border-radius: 8px;
border-radius: 8px;
box-shadow:3px 3px 7px rgba(194, 194, 194, 0.3);
-moz-box-shadow:3px 3px 7px rgba(194, 194, 194, 0.3);
-webkit-box-shadow:3px 3px 7px rgba(194, 194, 194, 0.3);
display: none;
}

View File

@ -5,7 +5,7 @@
$(function() {
// Notice lists...
$(document).on('mouseenter', '.notice .author', function(e) {
$(document).on('mouseenter', '.notice .p-author', function(e) {
var notice = $(this).closest('.notice');
var popup = notice.find('.remote-profile-options');
if (popup.length) {
@ -21,7 +21,7 @@ $(function() {
});
// Profile lists...
$(document).on('mouseenter', '.profile .avatar', function(e) {
$(document).on('mouseenter', '.profile .u-photo', function(e) {
var profile = $(this).closest('.profile');
var popup = profile.find('.remote-profile-options');
if (popup.length) {

View File

@ -181,14 +181,15 @@ class NoticeTitlePlugin extends Plugin
*
* @return boolean hook value
*/
function onStartShowNoticeItem($nli)
function onStartShowNoticeTitle(NoticeListItem $nli)
{
$title = Notice_title::fromNotice($nli->notice);
if (!empty($title)) {
$nli->out->elementStart('h4', array('class' => 'notice_title'));
$nli->out->element('a', array('href' => $nli->notice->getUrl()), $title);
$nli->out->elementEnd('h4');
$nli->elementStart('h4', array('class' => 'p-name'));
$nli->element('a', array('href' => $nli->notice->getUrl()), $title);
$nli->elementEnd('h4');
return false;
}
return true;
@ -284,21 +285,17 @@ class NoticeTitlePlugin extends Plugin
/**
* If a notice has a title, show it in the <h1> element
*
* @param Action $action Action being executed
* @param Notice $notice Notice we're getting the title for
* @param string $title Reference to the variable which we set to the notice's title
*
* @return boolean hook value
*/
function onStartShowPageTitle($action)
function onGetNoticeTitle(Notice $notice, &$title)
{
$actionName = $action->trimmed('action');
if ($actionName == 'shownotice') {
$title = Notice_title::fromNotice($action->notice);
if (!empty($title)) {
$action->element('h1', null, $title);
$title = Notice_title::fromNotice($notice);
if (!is_null($title)) {
return false;
}
}
return true;
}

View File

@ -109,7 +109,7 @@ class OembedPlugin extends Plugin
if (empty($oembed->author_name) && empty($oembed->provider)) {
return true;
}
$out->elementStart('div', array('id'=>'oembed_info', 'class'=>'entry-content'));
$out->elementStart('div', array('id'=>'oembed_info', 'class'=>'e-content'));
if (!empty($oembed->author_name)) {
$out->elementStart('div', 'fn vcard author');
if (empty($oembed->author_url)) {

View File

@ -401,7 +401,7 @@ class PollPlugin extends MicroAppPlugin
$nli = new NoticeListItem($notice, $out);
$nli->showNotice();
$out->elementStart('div', array('class' => 'entry-content poll-content'));
$out->elementStart('div', array('class' => 'e-content poll-content'));
$poll = Poll::getByNotice($notice);
if ($poll) {
if ($user) {
@ -422,7 +422,7 @@ class PollPlugin extends MicroAppPlugin
$out->elementEnd('div');
// @fixme
$out->elementStart('div', array('class' => 'entry-content'));
$out->elementStart('div', array('class' => 'e-content'));
}
function showNoticePollResponse(Notice $notice, $out)
@ -434,7 +434,7 @@ class PollPlugin extends MicroAppPlugin
$nli->showNotice();
// @fixme
$out->elementStart('div', array('class' => 'entry-content'));
$out->elementStart('div', array('class' => 'e-content'));
}
function entryForm($out)

View File

@ -265,7 +265,7 @@ class QnAPlugin extends MicroAppPlugin
{
case QnA_Question::OBJECT_TYPE:
$id = (empty($nli->repeat)) ? $nli->notice->id : $nli->repeat->id;
$class = 'hentry notice question';
$class = 'h-entry notice question';
if ($nli->notice->scope != 0 && $nli->notice->scope != 1) {
$class .= ' limited-scope';
}
@ -288,7 +288,7 @@ class QnAPlugin extends MicroAppPlugin
case QnA_Answer::OBJECT_TYPE:
$id = (empty($nli->repeat)) ? $nli->notice->id : $nli->repeat->id;
$cls = array('hentry', 'notice', 'answer');
$cls = array('h-entry', 'notice', 'answer');
$answer = QnA_Answer::getKV('uri', $nli->notice->uri);
@ -345,7 +345,7 @@ class QnAPlugin extends MicroAppPlugin
$nli = new NoticeListItem($notice, $out);
$nli->showNotice();
$out->elementStart('div', array('class' => 'entry-content question-description'));
$out->elementStart('div', array('class' => 'e-content question-description'));
$question = QnA_Question::getByNotice($notice);
@ -361,7 +361,7 @@ class QnAPlugin extends MicroAppPlugin
$out->elementEnd('div');
// @fixme
$out->elementStart('div', array('class' => 'entry-content'));
$out->elementStart('div', array('class' => 'e-content'));
}
/**
@ -437,7 +437,7 @@ class QnAPlugin extends MicroAppPlugin
$nli = new NoticeListItem($notice, $out);
$nli->showNotice();
$out->elementStart('div', array('class' => 'entry-content answer-content'));
$out->elementStart('div', array('class' => 'e-content answer-content'));
if (!empty($answer)) {
$form = new QnashowanswerForm($out, $answer);
@ -450,7 +450,7 @@ class QnAPlugin extends MicroAppPlugin
$out->elementEnd('div');
// @todo FIXME
$out->elementStart('div', array('class' => 'entry-content'));
$out->elementStart('div', array('class' => 'e-content'));
}
static function shorten($content, $notice)

View File

@ -326,7 +326,7 @@ class NoticeAnswerListItem extends NoticeListItem
*/
function showContent()
{
$this->out->elementStart('p', array('class' => 'entry-content answer-content'));
$this->out->elementStart('p', array('class' => 'e-content answer-content'));
if ($this->notice->rendered) {
$this->out->raw($this->notice->rendered);
} else {

View File

@ -2,7 +2,7 @@ var QnA = {
// @fixme: Should use ID
close: function (form, best) {
var notice = $(form).closest('li.hentry.notice.question');
var notice = $(form).closest('li.h-entry.notice.question');
notice.find('input#qna-best-answer,#qna-question-close').hide();
notice.find('textarea').hide();
@ -87,7 +87,7 @@ var QnA = {
$('body').click(function (e) {
var dummyAnswer = $('ul.qna-dummy', notice);
var style = dummyAnswer.attr('style');
var ans = $(notice).find('li.hentry.notice.anwer', notice)
var ans = $(notice).find('li.h-entry.notice.anwer', notice)
if (ans > 0) {
hideReplyPlaceholders(notice);
}
@ -300,7 +300,7 @@ var QnA = {
var list = form.closest('.threaded-replies');
// if the inserted notice's parent question needs it give it a placeholder
var ans = questionItem.find('ul > li.hentry.notice.answer');
var ans = questionItem.find('ul > li.h-entry.notice.answer');
if (ans.length == 0) {
SN.U.NoticeInlineReplyPlaceholder(questionItem);
}

View File

@ -632,7 +632,7 @@ RealtimeUpdate = {
*/
initPopupWindow: function()
{
$('.notices .entry-title a, .notices .entry-content a').bind('click', function() {
$('.notices .entry-title a, .notices .e-content a').bind('click', function() {
window.open(this.href, '');
return false;

View File

@ -189,7 +189,7 @@ address img {
max-width: 158px;
}
address img + .fn {
address img + .p-name {
display: none;
}
@ -626,52 +626,52 @@ address .poweredby {
width:100%;
}
.notice .author {
.notice .p-author {
margin-right: 8px;
}
.notice .addressees:before {
.notice .addressees::before {
content: '\25B8';
}
.notice .addressees, .notice .addressees li {
display: inline;
}
.notice .addressees > li::before {
content: ',';
}
.notice .addressees > li:first-child::before {
content: '';
}
.notice .addressees .group {
font-style: italic;
}
.fn {
.p-name {
overflow: hidden;
}
.notice .author .fn {
.notice .p-author {
font-weight: bold;
}
#core .vcard .photo {
display: inline;
margin-right: 11px;
#core .h-card .u-photo {
float: left;
}
#content .notice .author .photo {
position: absolute;
top: 7px;
left: 0px;
float: none;
#content .notice .h-entry {
margin: 2px 0 0 0;
min-height: 32px;
}
#content .notice .entry-title {
margin: 2px 7px 0px 59px;
min-height: 35px;
}
.vcard .url {
.h-card .u-url, .h-card.u-url {
text-decoration:none;
}
.vcard .url:hover {
.h-card .u-url:hover, .h-card.u-url:hover {
text-decoration:underline;
}
.notice .entry-title {
.notice .h-entry {
overflow:hidden;
word-wrap:break-word;
}
@ -688,11 +688,8 @@ font-style:italic;
display:none;
}
#remoteprofile .notice .entry-title, #remoteprofile .notice div.entry-content,
#showstream .notice .entry-title, #showstream .notice div.entry-content {
margin-left: 0;
}
#remoteprofile .notice .h-entry,
#showstream .notice .h-entry,
#remoteprofile .notice .entry-title,
#showstream .notice .entry-title {
min-height: 1px;
@ -708,33 +705,22 @@ font-style:italic;
min-height: 1em;
}
#shownotice .notice .entry-title {
#shownotice .notice .h-entry {,
font-size:2.2em;
min-height:123px;
font-size: 1.6em;
line-height: 1.2em;
}
#shownotice .notice div.entry-content {
margin-left:0;
.notice div.e-content {
margin-left: 55px;
}
.notice p.entry-content {
display:inline;
}
.notice div.entry-content {
clear:left;
float:left;
margin-left:59px;
margin-top: 10px;
}
.entry-content .repeat {
.entry-metadata .repeat {
display: block;
}
.entry-content .repeat .photo {
.entry-metadata .repeat .u-photo {
float:none;
margin-right:1px;
position:relative;
@ -742,11 +728,19 @@ top:4px;
left:0;
}
.entry-metadata {
clear: left;
float: left;
font-size: 0.88em;
}
.entry-metadata, .notice-options {
margin-bottom: 7px;
margin-top: 12px;
}
.notice-options {
float: right;
margin-top: 12px;
margin-right: -6px;
margin-bottom: 10px;
}
.notice-options fieldset {
@ -858,10 +852,10 @@ content: ":";
clear: both;
float: left;
width: 458px;
margin-left: 59px;
margin-top: 10px;
margin-left: 55px;
margin-bottom: 10px;
padding-right: 2px;
padding-top: 5px;
border-left: 3px solid #ECECF2;
background: #fafafa;
color: #222;
@ -872,10 +866,6 @@ content: ":";
margin-bottom: 0px;
}
.user_in .threaded-replies {
margin-top: 0px;
}
#content .notice .threaded-replies .notice,
#content .notice .threaded-replies .notice-data {
width: 440px;
@ -889,34 +879,27 @@ content: ":";
background: none;
}
#content .notice .threaded-replies .h-entry,
#content .notice .threaded-replies .entry-title {
min-height: 1px;
}
#content .threaded-replies .notice .author .photo {
#content .threaded-replies .notice .p-author .u-photo {
height: 24px;
width: 24px;
top: 12px;
}
#content .notice .threaded-replies .notice .entry-title {
margin: 2px 7px 0px 35px;
#content .notice .threaded-replies .notice .h-entry p.e-content {
margin-left: 32px;
}
#content .notice .threaded-replies .notice div.entry-content {
clear:left;
float:left;
margin-left: 35px;
margin-top: 6px !important;
#content .notice .threaded-replies .notice div.e-content {
margin-left: 32px;
}
#content .notice .threaded-replies .notice div.entry-content.notice-faves {
margin-top: 2px !important;
}
#content .notice .threaded-replies .notice .notice-options {
margin-top: 5px;
margin-bottom: 0px;
#content .notice .threaded-replies .notice div.e-content.notice-faves {
clear: both;
}
.threaded-replies li {
@ -986,11 +969,6 @@ content: ":";
width: auto;
}
#conversation .notices .threaded-replies {
margin-left: 59px;
background: #fafafa;
}
#conversation .notices .notices .notices .notices .notices .notices .notices .notices .notices .notices .notices .notices .notices {
background: none;
margin-left: 0px;
@ -1003,7 +981,12 @@ content: ":";
clear:both;
}
.section .vcard .photo {
.notice p.e-content {
clear: none;
display: block;
}
.section .h-card .u-photo {
margin-right:7px;
margin-bottom:0;
}
@ -1021,8 +1004,9 @@ padding-top:0;
.section .notice .author {
margin-right:0;
}
.section .notice .author .fn {
display:none;
.p-name.metadata {
display:none;
}
#aside_primary ol.notices {
@ -1084,12 +1068,9 @@ content: ":";
margin-bottom: 8px;
display: inline;
}
.section .entities li .photo {
.section .entities li .u-photo {
margin: 0;
}
.section .entities li .fn {
display: none;
}
.tag-cloud {
list-style-type:none;
@ -1160,7 +1141,7 @@ clear:both;
margin-bottom:18px;
}
.entry-content .success {
.e-content .success {
padding: 6px;
}
@ -1477,16 +1458,20 @@ margin-left:11px;
width:auto;
}
.hentry .entry-content .form_settings ul {
.h-entry .e-content .form_settings ul {
margin-left:0;
}
.limited-scope .entry-content .timestamp:before {
.entry-metadata .timestamp span.p-name {
display: none;
}
.limited-scope .e-content .timestamp:before {
content:'☠';
font-size:150%;
}
#content .notice-source-activity div.entry-title, .notice-source-activity div.entry-content {
#content .notice-source-activity div.entry-title, .notice-source-activity div.e-content {
margin-left: 0;
}
@ -1609,25 +1594,25 @@ height:16px;
margin-left:0;
}
.entity_profile .nickname {
.entity_profile .p-nickname {
font-size:1.4em;
}
.entity_profile .fn {
.entity_profile .p-name {
font-size: 1.2em;
clear: left;
}
.entity_profile .fn:before {
.entity_profile .p-name:before {
content: "(";
font-weight:normal;
}
.entity_profile .fn:after {
.entity_profile .p-name:after {
content: ")";
font-weight:normal;
}
.entity_profile .nickname:after,
.entity_profile .nickname:before {
.entity_profile .p-nickname:after,
.entity_profile .p-nickname:before {
content:"";
}
.entity_profile dt,
@ -1884,13 +1869,13 @@ display:none;
margin-bottom: 20px;
}
.profile .entity_profile .fn.nickname,
.profile .entity_profile .url[rel~=contact] {
.profile .entity_profile .p-name,
.profile .entity_profile .u-url[rel~=contact] {
margin-left:0;
display:inline;
}
.profile .entity_profile .fn,
.profile .entity_profile .p-name,
.profile .entity_profile .label {
margin-left:11px;
margin-bottom:4px;
@ -1899,10 +1884,10 @@ clear:none;
}
.profile .entity_profile .note,
.profile .entity_profile .url,
.profile .entity_profile .u-url,
.profile .entity_profile .entity_tags,
.profile .entity_profile .form_subscription_edit {
margin-left:59px;
margin-left:55px;
clear:none;
display:block;
width:auto;
@ -1933,7 +1918,7 @@ min-height: 90px;
list-style: none;
}
.peopletag .entry-content {
.peopletag .e-content {
width:auto;
}
@ -1976,13 +1961,13 @@ font-weight:normal;
margin-right:10px;
}
.profile-lister li .photo {
.profile-lister li .u-photo {
display:inline;
margin-right:7px;
margin-bottom:-5px;
}
.profile-lister li .fn {
.profile-lister li .p-name {
font-weight:bold;
}
@ -2082,8 +2067,8 @@ width:68%;
#showapplication .entity_profile .entity_fn {
margin-left:0;
}
#showapplication .entity_profile .fn:before,
#showapplication .entity_profile .fn:after {
#showapplication .entity_profile .p-name:before,
#showapplication .entity_profile .p-name:after {
content:'';
}
#showapplication .entity_data {

View File

@ -421,28 +421,22 @@ h6 {font-size: 1em;}
border-bottom: 2px dotted #eee;
}
.notice div.entry-content {
font-size: 0.88em;
.notice div.e-content {
line-height: 1.2em;
margin-top: 6px;
}
.user_in .notice div.entry-content {
.user_in .notice div.e-content {
max-width: 440px;
}
.entry-content a.conversation:before {
.e-content a.conversation:before {
content: " (";
}
.entry-content a.conversation:after {
.e-content a.conversation:after {
content: ")";
}
.notice-options {
margin-top: 4px;
}
.notice-options .form_repeat.dialogbox {
margin-right: 0px;
border: 1px solid #aaa;
@ -459,11 +453,7 @@ h6 {font-size: 1em;}
min-width: 80px;
}
#content .threaded-replies .notice .author .photo {
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}
.user_in.realtime-popup .notice div.entry-content {
.user_in.realtime-popup .notice div.e-content {
max-width: 320px;
}
@ -747,31 +737,31 @@ padding-right:0;
/* Limited-scope */
.limited-scope .entry-content .timestamp {
.limited-scope .e-content .timestamp {
padding-left: 20px;
position: relative;
}
.limited-scope .entry-content .timestamp:before {
.limited-scope .e-content .timestamp:before {
content: url(../images/lock.png);
position: absolute;
top: -2px;
left: 0px;
}
.limited-scope li .entry-content .timestamp {
.limited-scope li .e-content .timestamp {
padding-left: 0px;
}
.limited-scope li .entry-content .timestamp:before {
.limited-scope li .e-content .timestamp:before {
content: none;
}
.limited-scope li.limited-scope .entry-content .timestamp {
.limited-scope li.limited-scope .e-content .timestamp {
padding-left: 20px;
}
.limited-scope li.limited-scope .entry-content .timestamp:before {
.limited-scope li.limited-scope .e-content .timestamp:before {
content: url(../images/lock.png);
position: absolute;
top: -2px;
@ -970,13 +960,13 @@ td.entity_profile {
min-width: 250px;
}
.profile_list .fn {
.profile_list .p-name {
display: block;
font-size: 1.1em;
width: auto;
}
.profile_list .nickname, .profile_list .fn.nickname {
.profile_list .nickname, .profile_list .p-name.nickname {
position: relative;
top: -8px;
display: block;

View File

@ -15,7 +15,7 @@ span.rtl{
direction: rtl !important;
}
#content .notice .entry-title{
#content .notice .h-entry {
direction: ltr;
}
@ -27,12 +27,12 @@ span.rtl{
float: left;
}
.notice div.entry-content {
.notice div.e-content {
float: right;
clear: right;
}
#content .notice .threaded-replies .notice div.entry-content{
#content .notice .threaded-replies .notice div.e-content{
clear: right;
float: right;
}
@ -86,7 +86,7 @@ address{
margin-left: 0;
}
.notice p.entry-content {
.notice p.e-content {
float: left;
}
@ -104,15 +104,7 @@ address{
/* background-position: right center; */
}
#content .notice .threaded-replies .notice .entry-title{
margin: 2px 35px 0 7px;
}
#content .notice .entry-title {
margin: 2px 59px 0 7px;
}
#content .notice .author .photo{
#content .notice .author .u-photo{
right: 0;
left: auto;
}
@ -121,12 +113,12 @@ address{
float: left;
}
.notice div.entry-content {
.notice div.e-content {
margin-right: 59px;
margin-left: 0;
}
#core .vcard .photo {
#core .h-card .u-photo {
margin-left: 11px;
margin-right: 0;
}
@ -135,14 +127,10 @@ address{
margin: 2px 10px 4px 0;
}
#shownotice .notice div.entry-content {
#shownotice .notice div.e-content {
margin-right: 0;
}
.notice .addressees:before {
content: '\25C2';
}
#content thead th {
text-align: right;
}
@ -270,12 +258,12 @@ select {
float: left;
}
.profile .entity_profile .fn, .profile .entity_profile .label {
.profile .entity_profile .p-name, .profile .entity_profile .label {
margin-right: 11px;
margin-left: 0;
}
#core .vcard .photo {
#core .h-card .u-photo {
float: right;
}
@ -302,16 +290,16 @@ select {
margin-right: 0;
}
#showstream .notice .entry-title, #showstream .notice div.entry-content {
#showstream .notice .h-entry, #showstream .notice div.e-content {
margin-right: 0;
}
.limited-scope .entry-content .timestamp:before {
.limited-scope .e-content .timestamp:before {
right: 0;
left: auto;
}
.limited-scope .entry-content .timestamp {
.limited-scope .e-content .timestamp {
padding-left: 0;
padding-right: 20px;
}