From 785ffd5b9b70ea1614ba66b3c7b195f39027eeb6 Mon Sep 17 00:00:00 2001 From: sarven Date: Thu, 22 Jan 2009 21:03:59 +0000 Subject: [PATCH] Populat notices and some css cleanup --- js/util.js | 2 +- lib/noticesection.php | 38 +++++++++++++++++----------------- theme/base/css/display.css | 24 ++++++++++++++++----- theme/identica/css/display.css | 7 ++++++- 4 files changed, 45 insertions(+), 26 deletions(-) diff --git a/js/util.js b/js/util.js index 579b4952ae..de486cf740 100644 --- a/js/util.js +++ b/js/util.js @@ -184,7 +184,7 @@ $(document).ready(function(){ $("#form_notice").ajaxForm(PostNotice); $("#form_notice").each(addAjaxHidden); - $(".notice").hover( + $("#content .notice").hover( function () { $(this).addClass('hover'); }, diff --git a/lib/noticesection.php b/lib/noticesection.php index 9d10790701..7dfa0472d3 100644 --- a/lib/noticesection.php +++ b/lib/noticesection.php @@ -54,13 +54,13 @@ class NoticeSection extends Section $cnt = 0; - $this->out->elementStart('table', 'notices'); + $this->out->elementStart('ul', 'notices'); while ($notices->fetch() && ++$cnt <= NOTICES_PER_SECTION) { $this->showNotice($notices); } - $this->out->elementEnd('table'); + $this->out->elementEnd('ul'); return ($cnt > NOTICES_PER_SECTION); } @@ -73,9 +73,15 @@ class NoticeSection extends Section function showNotice($notice) { $profile = $notice->getProfile(); - $this->out->elementStart('tr'); - $this->out->elementStart('td'); + $this->out->elementStart('li', 'hentry notice'); + $this->out->elementStart('div', 'entry-title'); $avatar = $profile->getAvatar(AVATAR_MINI_SIZE); + $this->out->elementStart('span', 'vcard author'); + $this->out->elementStart('a', array('title' => ($profile->fullname) ? + $profile->fullname : + $profile->nickname, + 'href' => $profile->noticeurl, + 'class' => 'url')); $this->out->element('img', array('src' => (($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_MINI_SIZE)), 'width' => AVATAR_MINI_SIZE, 'height' => AVATAR_MINI_SIZE, @@ -83,25 +89,19 @@ class NoticeSection extends Section 'alt' => ($profile->fullname) ? $profile->fullname : $profile->nickname)); - $this->out->elementEnd('a'); - $this->out->elementEnd('td'); - $this->out->elementStart('td'); - $this->out->elementStart('a', array('title' => ($profile->fullname) ? - $profile->fullname : - $profile->nickname, - 'href' => $profile->noticeurl, - 'rel' => 'contact member', - 'class' => 'url')); $this->out->element('span', 'fn nickname', $profile->nickname); - $this->out->elementEnd('td'); - $this->out->elementStart('td'); + $this->out->elementEnd('a'); + $this->out->elementEnd('span'); + + $this->out->elementStart('p', 'entry-content'); $this->out->raw($notice->rendered); - $this->out->elementEnd('td'); + $this->out->elementEnd('p'); if ($notice->value) { - $this->out->elementStart('td'); + $this->out->elementStart('p'); $this->out->text($notice->value); - $this->out->elementEnd('td'); + $this->out->elementEnd('p'); } - $this->out->elementEnd('tr'); + $this->out->elementEnd('div'); + $this->out->elementEnd('li'); } } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index c55b3fd23a..2208529c03 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -799,7 +799,7 @@ display:inline; #laconicat .notice p.entry-content { /*margin-left:199px;*/ } -.notice p.entry-content a:visited { +#content .notice p.entry-content a:visited { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; @@ -1061,7 +1061,6 @@ background-color:#fff; text-align:left; text-transform:uppercase; } - #top_posters thead { display:none; } @@ -1071,15 +1070,30 @@ width:199px; #top_poster_number-of-notices { width:123px; } -#top_posters tbody td { + +.section tbody td { padding-right:11px; -padding-bottom:4px; +padding-bottom:11px; } -#top_posters img { +.section .vcard .photo { margin-right:7px; margin-bottom:0; } +.section .notice { +padding-top:11px; +padding-bottom:11px; + +} + +.section .notice:first { +border-top:0; +} + + + + + /* tagcloud */ .tag-cloud { list-style-type:none; diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index c16dc9fd70..b7ff0eb2d3 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -49,7 +49,12 @@ div.notice-options input, color:#002E6E; } -.notice p.entry-content a:visited { +.notice, +.profile { +border-top-color:#97BFD1; +} + +#content .notice p.entry-content a:visited { background-color:#fcfcfc; } .notice p.entry-content .vcard a { -- 2.39.5