diff options
Diffstat (limited to 'common/custom/views/default')
-rwxr-xr-x | common/custom/views/default/footer.tpl.php | 3 | ||||
-rw-r--r-- | common/custom/views/default/head.tpl.php | 3 | ||||
-rwxr-xr-x | common/custom/views/default/index.tpl.php | 73 | ||||
-rwxr-xr-x | common/custom/views/default/sidebar.tpl.php | 34 | ||||
-rw-r--r-- | common/custom/views/default/top.tpl.php | 3 |
5 files changed, 116 insertions, 0 deletions
diff --git a/common/custom/views/default/footer.tpl.php b/common/custom/views/default/footer.tpl.php new file mode 100755 index 0000000..bfc0210 --- /dev/null +++ b/common/custom/views/default/footer.tpl.php @@ -0,0 +1,3 @@ + <div id="footer"> + <p><? echo str_replace('%s', 'href="http://moonmoon.org"', _g('Powered by <a %s>moonmoon</a>'))?> | <a href="./admin/"><?=_g('Administration')?></a></p> + </div> diff --git a/common/custom/views/default/head.tpl.php b/common/custom/views/default/head.tpl.php new file mode 100644 index 0000000..5773aa6 --- /dev/null +++ b/common/custom/views/default/head.tpl.php @@ -0,0 +1,3 @@ + <link rel="stylesheet" media="screen" type="text/css" href="custom/style/default.css" title="Default" /> + + <link rel="alternate" type="application/atom+xml" title="ATOM" href="atom.php" /> diff --git a/common/custom/views/default/index.tpl.php b/common/custom/views/default/index.tpl.php new file mode 100755 index 0000000..1bf037a --- /dev/null +++ b/common/custom/views/default/index.tpl.php @@ -0,0 +1,73 @@ +<?php +$limit = $PlanetConfig->getMaxDisplay(); +$count = 0; + +header('Content-type: text/html; charset=UTF-8'); +?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$conf['locale']?>" lang="<?=$conf['locale']?>"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Script-Type" content="text/javascript" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + + <title><?php echo $PlanetConfig->getName(); ?></title> + <?php include(dirname(__FILE__).'/head.tpl.php'); ?> +</head> + +<body> + <script type="text/javascript"> + document.body.className += 'js'; + </script> + <div id="page"> + <?php include(dirname(__FILE__).'/top.tpl.php'); ?> + + <div id="content"> + <?php if (0 == count($items)) : ?> + <div class="article"> + <h2 class="article-title"> + <?=_g('No article', 'note de trad')?> + </h2> + <p class="article-content"><?=_g('No news, good news.')?></p> + </div> + <?php else : ?> + <?php foreach ($items as $item): ?> + <?php + $arParsedUrl = parse_url($item->get_feed()->getWebsite()); + $host = 'from-' . preg_replace('/[^a-zA-Z0-9]/i', '-', $arParsedUrl['host']); + ?> + <div class="article <?php echo $host; ?>"> + <h2 class="article-title"> + <a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a> + </h2> + <p class="article-info"> + + <?php echo ($item->get_author()? $item->get_author()->get_name() : 'Anonymous'); ?>, + <?php + $ago = time() - $item->get_date('U'); + //echo '<span title="'.Duration::toString($ago).' ago" class="date">'.date('d/m/Y', $item->get_date('U')).'</span>'; + echo '<span id="post'.$item->get_date('U').'" class="date">'.$item->get_date('d/m/Y').'</span>'; + ?> + + | + + <?=_g('Source:')?> <?php + $feed = $item->get_feed(); + echo '<a href="'.$feed->getWebsite().'" class="source">'.$feed->getName().'</a>'; + ?> + </p> + <div class="article-content"> + <?php echo $item->get_content(); ?> + </div> + </div> + <?php if (++$count == $limit) { break; } ?> + <?php endforeach; ?> + <?php endif; ?> + </div> + + <?php include_once(dirname(__FILE__).'/sidebar.tpl.php'); ?> + + <?php include(dirname(__FILE__).'/footer.tpl.php'); ?> + </div> +</body> +</html> diff --git a/common/custom/views/default/sidebar.tpl.php b/common/custom/views/default/sidebar.tpl.php new file mode 100755 index 0000000..830f3c6 --- /dev/null +++ b/common/custom/views/default/sidebar.tpl.php @@ -0,0 +1,34 @@ +<?php +$all_people = &$Planet->getPeople(); +usort($all_people, array('PlanetFeed', 'compare')); +?> +<div id="sidebar" class="aside"> + <div id="sidebar-people" class="section"> + <h2><?php echo _g('People') . ' (' . count($all_people) . ')'?></h2> + <ul> + <?php foreach ($all_people as $person) : ?> + <li> + <a href="<?php echo htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8'); ?>" title="<?=_g('Feed')?>"><img src="postload.php?url=<?php echo urlencode(htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8')); ?>" alt="" height="12" width="12" /></a> + <a href="<?php echo $person->getWebsite(); ?>" title="<?=_g('Website')?>"><?php echo htmlspecialchars($person->getName(), ENT_QUOTES, 'UTF-8'); ?></a> + </li> + <?php endforeach; ?> + </ul> + <p> + <img src="custom/img/opml.png" alt="<?=_g('Feed')?>" height="12" width="12" /> <a href="custom/people.opml"><?=_g('All feeds in OPML format')?></a> + </p> + </div> + + <div class="section"> + <h2><?=_g('Syndicate')?></h2> + <ul> + <li><img src="custom/img/feed.png" alt="<?=_g('Feed')?>" height="12" width="12" /> <a href="atom.php"><?=_g('Feed (ATOM)')?></a></li> + </ul> + </div> + + <div class="section"> + <h2><?=_g('Archives')?></h2> + <ul> + <li><a href="?type=archive"><?=_g('See all headlines')?></a></li> + </ul> + </div> +</div> diff --git a/common/custom/views/default/top.tpl.php b/common/custom/views/default/top.tpl.php new file mode 100644 index 0000000..dd6206f --- /dev/null +++ b/common/custom/views/default/top.tpl.php @@ -0,0 +1,3 @@ + <div id="header"> + <h1 id="top"><a href="<?php echo $PlanetConfig->getUrl() ?>"><?php echo $PlanetConfig->getName(); ?></a></h1> + </div>
\ No newline at end of file |