com web/php: Enhancements for news articles on homepage.: index.php styles/home.css
| From: | Levi Morrison | Date: | Fri, 22 Nov 2013 22:23:17 +0000 |
| Subject: | com web/php: Enhancements for news articles on homepage.: index.php styles/home.css | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17208@lists.php.net to get a copy of this message | ||
Commit: 6e51566e1732de7a751475c31852480808402c74
Author: Levi Morrison <levim@php.net> Fri, 22 Nov 2013 15:23:17 -0700
Parents: 34b9d62912d880a92b6bc562e24087c66a38a02b
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=6e51566e1732de7a751475c31852480808402c74
Log:
Enhancements for news articles on homepage.
Changed paths:
M index.php
M styles/home.css
Diff:
diff --git a/index.php b/index.php
index 59b6017..4d1998d 100644
--- a/index.php
+++ b/index.php
@@ -72,13 +72,15 @@ foreach($NEWS_ENTRIES as $entry) {
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="newstime">' . $date .
'</div>';
- $content .= '<div class="newscontent">';
- $content .= $entry["content"];
- $content .= '</div>';
- $content .= '</div>';
+ $content .= <<<NEWSENTRY
+<div class="newsentry">
+ <div class="newstime">$date</div>
+ <h3 class="newstitle"><a
href="{$MYSITE}{$link}">{$entry["title"]}</a></h3>
+ <div class="newscontent">
+ {$entry["content"]}
+ </div>
+</div>
+NEWSENTRY;
}
$content .= "</div>";
diff --git a/styles/home.css b/styles/home.css
index 03fcd7b..ccf0fa1 100644
--- a/styles/home.css
+++ b/styles/home.css
@@ -64,16 +64,16 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99
.newsentry {
- margin: 3em 0 4em;
+ margin: 1em 0;
position: relative;
- background-color: rgb(238, 238, 246);
- display: block;
- float: none;
+}
+.newscontent {
+ padding: 0.75em 0.625em;
border-top: solid 0.125em rgb(102, 102, 153);
border-bottom: solid 1px rgb(202, 202, 227);
+ background-color: rgb(238, 238, 246);
-moz-border-radius: 0 0 2px 2px;
border-radius: 0 0 2px 2px;
- padding: 0.75em 0.625em;
box-shadow: 2px 0 2px -2px rgb(212, 212, 232) inset, -2px 0 2px -2px rgb(212, 212, 232) inset;
}
.newsentry h3 {
@@ -82,10 +82,6 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99
line-height: 1.33;
margin: 0;
padding: 0;
- position: absolute;
- top: -2em;
- left: 0;
- right: 0;
}
.newsentry h3 .release-state {
float: right;
@@ -98,14 +94,12 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99
border:0;
}
.newsentry .newstitle a::after {
- float:right;
- content:"»";
+ content:"\20 \00bb";
color:#666;
}
.newsentry .newstime {
- float: right;
- border-bottom: 1px dotted #999;
- margin: 3px;
+ float:right;
+ margin-top:.5em;
}
.newsentry .newscontent {