better headers
Added H1 headers to all pages. Added H2 headers to sections of pages, where appropriate. Moved a lot of TODOs around. Made the public stream the default if no action is specified. darcs-hash:20080519141219-84dde-f9917a8351596060faa7ff5d231417773764a8fd.gz
This commit is contained in:
parent
c87951f895
commit
749178f343
@ -43,6 +43,7 @@ class AllAction extends ShowstreamAction {
|
|||||||
$notice->find();
|
$notice->find();
|
||||||
|
|
||||||
common_element_start('div', 'notices');
|
common_element_start('div', 'notices');
|
||||||
|
common_element('h2', 'notices', _t('Notices'));
|
||||||
|
|
||||||
while ($notice->fetch()) {
|
while ($notice->fetch()) {
|
||||||
$this->show_notice($notice);
|
$this->show_notice($notice);
|
||||||
|
@ -53,6 +53,7 @@ class NewnoticeAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show_form() {
|
function show_form() {
|
||||||
|
common_show_header(_t('New notice'));
|
||||||
common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
|
common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
|
||||||
'action' => common_local_url('newnotice')));
|
'action' => common_local_url('newnotice')));
|
||||||
common_element('span', 'nickname', $profile->nickname);
|
common_element('span', 'nickname', $profile->nickname);
|
||||||
@ -61,5 +62,6 @@ class NewnoticeAction extends Action {
|
|||||||
'id' => 'content'));
|
'id' => 'content'));
|
||||||
common_element('input', array('type' => 'submit', 'value' => 'Send'));
|
common_element('input', array('type' => 'submit', 'value' => 'Send'));
|
||||||
common_element_end('form');
|
common_element_end('form');
|
||||||
|
common_show_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -36,7 +36,7 @@ class ShownoticeAction extends Action {
|
|||||||
|
|
||||||
# Looks like we're good; show the header
|
# Looks like we're good; show the header
|
||||||
|
|
||||||
common_show_header($profile->nickname);
|
common_show_header($profile->nickname." status on ".$notice->created);
|
||||||
|
|
||||||
$this->show_notice($notice);
|
$this->show_notice($notice);
|
||||||
|
|
||||||
|
@ -92,6 +92,9 @@ class ShowstreamAction extends StreamAction {
|
|||||||
|
|
||||||
function show_profile($profile) {
|
function show_profile($profile) {
|
||||||
common_element_start('div', 'profile');
|
common_element_start('div', 'profile');
|
||||||
|
|
||||||
|
common_element('h2', 'nickname', $profile->nickname);
|
||||||
|
|
||||||
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
||||||
if ($avatar) {
|
if ($avatar) {
|
||||||
common_element('img', array('src' => $avatar->url,
|
common_element('img', array('src' => $avatar->url,
|
||||||
@ -100,7 +103,6 @@ class ShowstreamAction extends StreamAction {
|
|||||||
'height' => AVATAR_PROFILE_SIZE,
|
'height' => AVATAR_PROFILE_SIZE,
|
||||||
'title' => $profile->nickname));
|
'title' => $profile->nickname));
|
||||||
}
|
}
|
||||||
common_element('span', 'nickname', $profile->nickname);
|
|
||||||
if ($profile->fullname) {
|
if ($profile->fullname) {
|
||||||
if ($profile->homepage) {
|
if ($profile->homepage) {
|
||||||
common_element('a', array('href' => $profile->homepage,
|
common_element('a', array('href' => $profile->homepage,
|
||||||
@ -136,7 +138,7 @@ class ShowstreamAction extends StreamAction {
|
|||||||
'name' => 'unsubscribeto',
|
'name' => 'unsubscribeto',
|
||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
'value' => $profile->nickname));
|
'value' => $profile->nickname));
|
||||||
common_element('input', array('type' => 'submit'), _t('unsubscribe'));
|
common_element('input', array('type' => 'submit'), _t('Unsubscribe'));
|
||||||
common_element_end('form');
|
common_element_end('form');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,6 +149,8 @@ class ShowstreamAction extends StreamAction {
|
|||||||
|
|
||||||
common_element_start('div', 'subscriptions');
|
common_element_start('div', 'subscriptions');
|
||||||
|
|
||||||
|
common_element('h2', 'subscriptions', _t('Subscriptions'));
|
||||||
|
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
|
|
||||||
if ($subs) {
|
if ($subs) {
|
||||||
@ -212,6 +216,9 @@ class ShowstreamAction extends StreamAction {
|
|||||||
$notice_count = 0;
|
$notice_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
common_element_start('div', 'statistics');
|
||||||
|
common_element('h2', 'statistics', _t('Statistics'));
|
||||||
|
|
||||||
# Other stats...?
|
# Other stats...?
|
||||||
common_element_start('dl', 'statistics');
|
common_element_start('dl', 'statistics');
|
||||||
common_element('dt', _t('Subscriptions'));
|
common_element('dt', _t('Subscriptions'));
|
||||||
@ -221,6 +228,8 @@ class ShowstreamAction extends StreamAction {
|
|||||||
common_element('dt', _t('Notices'));
|
common_element('dt', _t('Notices'));
|
||||||
common_element('dd', $notice_count);
|
common_element('dd', $notice_count);
|
||||||
common_element_end('dl');
|
common_element_end('dl');
|
||||||
|
|
||||||
|
common_element_end('div');
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_notices($profile) {
|
function show_notices($profile) {
|
||||||
@ -237,7 +246,8 @@ class ShowstreamAction extends StreamAction {
|
|||||||
$notice->find();
|
$notice->find();
|
||||||
|
|
||||||
common_element_start('div', 'notices');
|
common_element_start('div', 'notices');
|
||||||
|
common_element('h2', 'notices', _t('Notices'));
|
||||||
|
|
||||||
while ($notice->fetch()) {
|
while ($notice->fetch()) {
|
||||||
$this->show_notice($notice);
|
$this->show_notice($notice);
|
||||||
}
|
}
|
||||||
@ -246,18 +256,23 @@ class ShowstreamAction extends StreamAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show_last_notice($profile) {
|
function show_last_notice($profile) {
|
||||||
|
|
||||||
|
common_element_start('div', 'lastnotice');
|
||||||
|
common_element('h2', 'lastnotice', _t('Currently'));
|
||||||
|
|
||||||
$notice = DB_DataObject::factory('notice');
|
$notice = DB_DataObject::factory('notice');
|
||||||
$notice->profile_id = $profile->id;
|
$notice->profile_id = $profile->id;
|
||||||
$notice->orderBy('created DESC');
|
$notice->orderBy('created DESC');
|
||||||
$notice->limit(0, 1);
|
$notice->limit(0, 1);
|
||||||
$notice->find();
|
|
||||||
|
if ($notice->find(true)) {
|
||||||
while ($notice->fetch()) {
|
|
||||||
# FIXME: URL, image, video, audio
|
# FIXME: URL, image, video, audio
|
||||||
common_element('span', array('class' => 'content'),
|
common_element('span', array('class' => 'content'),
|
||||||
$notice->content);
|
$notice->content);
|
||||||
common_element('span', array('class' => 'date'),
|
common_element('span', array('class' => 'date'),
|
||||||
common_date_string($notice->created));
|
common_date_string($notice->created));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
common_element_end('div');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
26
doc/TODO
26
doc/TODO
@ -25,8 +25,11 @@
|
|||||||
+ common_redirect()
|
+ common_redirect()
|
||||||
+ configuration system ($config)
|
+ configuration system ($config)
|
||||||
+ release 0.1
|
+ release 0.1
|
||||||
|
- design from Open Source Web Designs
|
||||||
|
+ add H1 to each page
|
||||||
|
+ add H2 for each page section
|
||||||
- doc action
|
- doc action
|
||||||
- default to public stream
|
+ default to public stream
|
||||||
- default avatar
|
- default avatar
|
||||||
- default HTML type
|
- default HTML type
|
||||||
- set Content-Type
|
- set Content-Type
|
||||||
@ -44,23 +47,17 @@
|
|||||||
- FOAF dump for user
|
- FOAF dump for user
|
||||||
- license on showstream
|
- license on showstream
|
||||||
- license on shownotice
|
- license on shownotice
|
||||||
- design from Open Source Web Designs
|
|
||||||
- TOS checkbox on register
|
- TOS checkbox on register
|
||||||
- pretty URLs
|
- pretty URLs
|
||||||
- XML sitemap generation
|
|
||||||
- site logo
|
- site logo
|
||||||
|
- instructions
|
||||||
|
- release 0.2
|
||||||
|
- set Last-Modified
|
||||||
|
- XML sitemap generation
|
||||||
- theme per site
|
- theme per site
|
||||||
- theme per profile
|
- theme per profile
|
||||||
- email confirmation for registration
|
- email confirmation for registration
|
||||||
- change cookie handling for anon users to be more cache-friendly
|
- change cookie handling for anon users to be more cache-friendly
|
||||||
- release 0.2
|
|
||||||
- content negotiation for interface language
|
|
||||||
- content negotiation for content type
|
|
||||||
- content negotiation for encoding
|
|
||||||
- content negotiation for charset
|
|
||||||
- If-Modified-Since support
|
|
||||||
- Vary
|
|
||||||
- delete a notice
|
|
||||||
- gettext
|
- gettext
|
||||||
- subscribe remote
|
- subscribe remote
|
||||||
- add subscriber remote
|
- add subscriber remote
|
||||||
@ -74,6 +71,13 @@
|
|||||||
- RDFa for subscriber pages
|
- RDFa for subscriber pages
|
||||||
- RDFa for subscribed pages
|
- RDFa for subscribed pages
|
||||||
- plugins and hooks
|
- plugins and hooks
|
||||||
|
- content negotiation for interface language
|
||||||
|
- content negotiation for content type
|
||||||
|
- content negotiation for encoding
|
||||||
|
- content negotiation for charset
|
||||||
|
- If-Modified-Since support
|
||||||
|
- Vary
|
||||||
|
- delete a notice
|
||||||
- release 0.3
|
- release 0.3
|
||||||
- @ messages
|
- @ messages
|
||||||
- # tags
|
- # tags
|
||||||
|
@ -23,6 +23,11 @@ define('LACONICA', true);
|
|||||||
require_once(INSTALLDIR . "/lib/common.php");
|
require_once(INSTALLDIR . "/lib/common.php");
|
||||||
|
|
||||||
$action = $_REQUEST['action'];
|
$action = $_REQUEST['action'];
|
||||||
|
|
||||||
|
if (!$action) {
|
||||||
|
common_redirect(common_local_url('public'));
|
||||||
|
}
|
||||||
|
|
||||||
$actionfile = INSTALLDIR."/actions/$action.php";
|
$actionfile = INSTALLDIR."/actions/$action.php";
|
||||||
|
|
||||||
if (file_exists($actionfile)) {
|
if (file_exists($actionfile)) {
|
||||||
|
@ -114,6 +114,7 @@ function common_show_header($pagetitle) {
|
|||||||
$pagetitle . " - " . $config['site']['name']);
|
$pagetitle . " - " . $config['site']['name']);
|
||||||
common_element_end('head');
|
common_element_end('head');
|
||||||
common_element_start('body');
|
common_element_start('body');
|
||||||
|
common_element('h1', 'title', $pagetitle);
|
||||||
common_head_menu();
|
common_head_menu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user