Commit: 66322fa6e38549e0d508d6ef0d52160190d26d5b Author: Levi Morrison <[email protected]> Fri, 3 Jan 2014 10:33:31 -0700 Parents: 815774f318e4bb5284e903d1751b5ea87c16de3b Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=66322fa6e38549e0d508d6ef0d52160190d26d5b Log: Updated markup for news items on homepage to use newer HTML 5 elements; at the same time this fixes #66391. Bugs: https://bugs.php.net/66391 Changed paths: M index.php M styles/home.css M styles/theme-base.css M styles/theme-medium.css Diff: diff --git a/index.php b/index.php index 413028a..d07dd36 100644 --- a/index.php +++ b/index.php @@ -65,15 +65,21 @@ foreach($NEWS_ENTRIES as $entry) { foreach($frontpage as $entry) { $link = substr($entry["id"], 15); // Strip http://php.net/ $id = parse_url($entry["id"], PHP_URL_FRAGMENT); - $date = date_format(date_create($entry["updated"]), 'Y-m-d'); + $date = date_create($entry['updated']); + $date_human = date_format($date, 'Y-m-d'); + $date_w3c = date_format($date, DATE_W3C); $content .= <<<NEWSENTRY -<div class="newsentry"> - <div class="newstime">$date</div> - <h3 class="newstitle title"><a href="{$MYSITE}{$link}" id="{$id}">{$entry["title"]}</a></h3> +<article class="newsentry"> + <header class="title"> + <time datetime="$date_w3c">$date_human</time> + <h2 class="newstitle"> + <a href="{$MYSITE}{$link}" id="{$id}">{$entry["title"]}</a> + </h2> + </header> <div class="newscontent"> {$entry["content"]} </div> -</div> +</article> NEWSENTRY; } $content .= '<p class="archive"><a href="/archive/">Older News Entries</a></p>'; diff --git a/styles/home.css b/styles/home.css index 33e852d..8292eae 100644 --- a/styles/home.css +++ b/styles/home.css @@ -70,10 +70,6 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 content:"\20 \00bb"; color:#666; } -.home .newsentry .newstime { - margin-top:8px; - margin-right:12px; -} p.archive { text-align: right; diff --git a/styles/theme-base.css b/styles/theme-base.css index a52a749..d3a245f 100755 --- a/styles/theme-base.css +++ b/styles/theme-base.css @@ -1903,18 +1903,21 @@ aside.tips div.inner { /* }}} */ /* {{{ News */ +.newsentry header h2 { + margin:0; +} .newsentry { margin: 0 0 1.5em; position: relative; } -.newsentry h3 { +.newsentry h2 { font-weight:normal; } -.newsentry h3 .release-state { +.newsentry h2 .release-state { float: right; opacity: 0.8; } -.newsentry .newstime { +.newsentry header time { float:right; } diff --git a/styles/theme-medium.css b/styles/theme-medium.css index 59463b4..c37669f 100755 --- a/styles/theme-medium.css +++ b/styles/theme-medium.css @@ -29,23 +29,13 @@ abbr { border-color: #999; } -h1, h1 a, h1 a:visited, h1 a:link { +h1 { color: #336; } -h1 a:hover, -h1 a:focus { - color: #000; -} - -h2, h2 a, h2 a:visited, h2 a:link { +h2 { color: #262626; } -h2 a:hover, -h2 a:focus { - color: #000; -} - h1, h2, h3, h4, h5, h6 { font-weight:bolder; color:#336 -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
