1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Slightly prettier conference page..

I'm sure someone will make it perfect
This commit is contained in:
Hannes Magnusson
2013-11-22 00:26:59 -08:00
parent e3ce6e7728
commit e9bae7527e
2 changed files with 47 additions and 15 deletions

View File

@@ -6,25 +6,51 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-events.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-news.inc';
$layout_workaround = <<< EOT
<div id="conferencesSidebar">
<div id="contact">
<p>
Are you planning a PHP related conference and want it listed here?
<a href="mailto:php-webmaster@lists.php.net">Let us know.</a>
</p>
</div>
$RSIDEBAR_DATA
</div>
EOT;
site_header("PHP Conferences around the world", array(
'headtags' => '<link rel="alternate" type="application/atom+xml" title="PHP: Conference announcements" href="' . $MYSITE . 'feed.atom" />',
'current' => 'community',
'css' => array('home.css'),
));
unset($RSIDEBAR_DATA);
$content = "<div class='home-content'>";
$frontpage = array();
foreach($NEWS_ENTRIES as $entry) {
foreach($entry["category"] as $category) {
if ($category["term"] == "cfp") {
$frontpage[] = $entry;
break;
}
if ($category["term"] == "conferences") {
$frontpage[] = $entry;
break;
}
}
}
$panels = "";
foreach($frontpage as $entry) {
$link = substr($entry["id"], 15); // Strip http://php.net/
$date = date_format(date_create($entry["updated"]), 'Y-m-d');
$content .= '<div class="newsentry">';
$content .= '<h3 class="newstitle"><a href="'. $MYSITE.$link .'">' . $entry["title"] . '</a></h3>';
$content .= '<div class="newsimage">';
$content .= sprintf('<a href="%s"><img src="/images/news/%s"></a>', $entry["newsImage"]["link"], $entry["newsImage"]["content"]);
$content .= '</div>';
$content .= '<div class="newscontent">';
$content .= $entry["content"];
$content .= '</div>';
$content .= '</div>';
site_header("PHP Conferences around the world", array("layout_workaround" => $layout_workaround, 'headtags' => '<link rel="alternate" type="application/atom+xml" title="PHP: Conference announcements" href="' . $MYSITE . 'feed.atom" />'));
$panels .= sprintf('<p class="panel"><a href="%s">%s</a></p>', $entry["newsImage"]["link"], $entry["title"]);
}
$content .= "</div>";
print_news($NEWS_ENTRIES, array("conferences", "cfp"), 10);
echo $content;
site_footer(
array("atom" => "/feed.atom") // Add a link to the feed
array(
"atom" => "/feed.atom",
"elephpants" => true,
"sidebar" => $panels,
)
);

View File

@@ -112,4 +112,10 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99
padding: 5px;
margin-bottom: 20px;
}
.newsentry .newsimage a {
float: right;
border: 0;
padding: 10px;
}