com web/php: Slightly prettier conference page..: conferences/index.php styles/home.css
| From: | Hannes Magnusson | Date: | Fri, 22 Nov 2013 08:26:59 +0000 |
| Subject: | com web/php: Slightly prettier conference page..: conferences/index.php styles/home.css | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17191@lists.php.net to get a copy of this message | ||
Commit: e9bae7527e8de728ea6f598ff51867f2e4bec880
Author: Hannes Magnusson <bjori@mongodb.com> Fri, 22 Nov 2013 00:26:59 -0800
Parents: e3ce6e7728618ff13fb390a392418d7e37be13f5
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e9bae7527e8de728ea6f598ff51867f2e4bec880
Log:
Slightly prettier conference page...
I'm sure someone will make it perfect
Changed paths:
M conferences/index.php
M styles/home.css
Diff:
diff --git a/conferences/index.php b/conferences/index.php
index 8306f77..8e53985 100644
--- a/conferences/index.php
+++ b/conferences/index.php
@@ -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,
+ )
);
diff --git a/styles/home.css b/styles/home.css
index ece2a2f..ce47366 100644
--- a/styles/home.css
+++ b/styles/home.css
@@ -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;
+}
+