Commit:    918d1a81257c839792495380d503181b425fd7f1
Author:    Hannes Magnusson <[email protected]>         Fri, 22 Nov 2013 
00:26:59 -0800
Parents:   13e0c38c367c1f878b1b7609fbfb9f26a7207798
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=918d1a81257c839792495380d503181b425fd7f1

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:[email protected]";>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;
+}
+


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to