website rev 796
Improve main page, rm grid add pretty activity box
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Mar 30 04:30:56 2011 +0200 (2011-03-30) |
parents | 91175a1964f2 |
children | daa2e134b3c1 |
files | index.php libs/get-feed.php libs/get-latest.sh slitaz.css |
line diff
1.1 --- a/index.php Tue Mar 29 16:39:02 2011 +0100 1.2 +++ b/index.php Wed Mar 30 04:30:56 2011 +0200 1.3 @@ -137,30 +137,31 @@ 1.4 </script> 1.5 </div> 1.6 1.7 -<h2>Feed Grid</h2> 1.8 +<h2>Project Activity</h2> 1.9 <?php 1.10 require_once("libs/get-feed.php"); 1.11 ?> 1.12 -<div class="feed-grid"> 1.13 - <div class="right_box"> 1.14 - <h3>Community Network</h3> 1.15 + 1.16 +<div class="activity"> 1.17 + <p> 1.18 + <img src="images/users.png" alt="users.png" /> 1.19 + Community Activity 1.20 <?php get_rss_feed("/var/cache/slitaz/website/scn.xml"); ?> 1.21 </div> 1.22 - <div class="left_box"> 1.23 - <h3>Support Forum</h3> 1.24 - <?php #get_forum_rss_feed("/var/cache/slitaz/website/forum.xml"); 1.25 - echo '<a href="http://forum.slitaz.org/">forum.slitaz.org</a>'; ?> 1.26 - </div> 1.27 + <p class="activity_more"> 1.28 + <a href="http://scn.slitaz.org/activity/">More activity</a> 1.29 + </p> 1.30 </div> 1.31 -<div class="feed-grid"> 1.32 - <div class="right_box"> 1.33 - <h3>Latest Commits</h3> 1.34 + 1.35 +<div class="activity"> 1.36 + <p> 1.37 + <img src="images/development.png" alt="development.png" /> 1.38 + Latest Commits 1.39 <?php get_rss_feed("/var/cache/slitaz/website/wok.xml"); ?> 1.40 </div> 1.41 - <div class="left_box"> 1.42 - <h3>Bug Tracker</h3> 1.43 - <?php get_atom_feed("/var/cache/slitaz/website/bugs.xml"); ?> 1.44 - </div> 1.45 + <p class="activity_more"> 1.46 + <a href="http://hg.slitaz.org/">More commits</a> 1.47 + </p> 1.48 </div> 1.49 1.50 <h2>Spread SliTaz</h2>
2.1 --- a/libs/get-feed.php Tue Mar 29 16:39:02 2011 +0100 2.2 +++ b/libs/get-feed.php Wed Mar 30 04:30:56 2011 +0200 2.3 @@ -7,20 +7,7 @@ 2.4 // We look for last item, channel may not have a PubDate* 2.5 $up = ($x->channel->item->pubDate); 2.6 echo "<span>Updated: " . substr("$up", 5, 12) . "</span>\n"; 2.7 - echo "<ul>\n"; 2.8 - foreach($x->channel->item as $entry) { 2.9 - echo " <li><a href='$entry->link' title='$entry->title'>" . $entry->title . "</a></li>\n"; 2.10 - } 2.11 - echo "</ul>\n"; 2.12 -} 2.13 - 2.14 -// Read Forum RSS Feed 2.15 -function get_forum_rss_feed($feed_url) { 2.16 - $content = file_get_contents($feed_url); 2.17 - $x = new SimpleXmlElement($content); 2.18 - $up = ($x->channel->pubDate); 2.19 - echo "<span>Updated: " . substr("$up", 5, 6) . (date( ' Y ')) . "</span>\n"; 2.20 - echo "<ul>\n"; 2.21 + echo "</p>\n<div>\n<ul>\n"; 2.22 foreach($x->channel->item as $entry) { 2.23 echo " <li><a href='$entry->link' title='$entry->title'>" . $entry->title . "</a></li>\n"; 2.24 } 2.25 @@ -33,7 +20,7 @@ 2.26 $x = new SimpleXmlElement($content); 2.27 $up = ($x->updated); 2.28 echo "<span>Updated: " . substr("$up", 0, 10) . "</span>\n"; 2.29 - echo "<ul>\n"; 2.30 + echo "</p>\n<div>\n<ul>\n"; 2.31 foreach($x->entry as $entry) { 2.32 echo " <li><a href='$entry->id' title='$entry->title'>" . $entry->title . "</a></li>\n"; 2.33 }
3.1 --- a/libs/get-latest.sh Tue Mar 29 16:39:02 2011 +0100 3.2 +++ b/libs/get-latest.sh Wed Mar 30 04:30:56 2011 +0200 3.3 @@ -22,20 +22,20 @@ 3.4 rm *.xml 3.5 3.6 # Cache all feeds to save bandwidth (updated by cron) 3.7 +#wget -O doc.xml $DOC_FEED 3.8 +#wget -O forum.xml $FORUM_FEED 3.9 +#wget -O bugs.xml $BUGS_FEED 3.10 wget -O scn.xml $SCN_FEED 3.11 -wget -O doc.xml $DOC_FEED 3.12 -wget -O forum.xml $FORUM_FEED 3.13 -wget -O bugs.xml $BUGS_FEED 3.14 wget -O wok.xml $WOK_FEED 3.15 3.16 # Latest cooked packages by the build bot. 3.17 -echo -n "Getting latest cooked packages... " 3.18 -echo '<ul>' > $OUTPUT 3.19 -cd $PKGS && ls -1t *.tazpkg | head -8 | \ 3.20 -while read file 3.21 -do 3.22 - echo -n ' <li>'$(stat -c '%y' $PKGS/$file | \ 3.23 - cut -d ' ' -f 1); echo " - $file</li>" 3.24 -done >> $OUTPUT 3.25 -echo '</ul>' >> $OUTPUT 3.26 -echo "Done" 3.27 +#echo -n "Getting latest cooked packages... " 3.28 +#echo '<ul>' > $OUTPUT 3.29 +#cd $PKGS && ls -1t *.tazpkg | head -8 | \ 3.30 +#while read file 3.31 +#do 3.32 + #echo -n ' <li>'$(stat -c '%y' $PKGS/$file | \ 3.33 + #cut -d ' ' -f 1); echo " - $file</li>" 3.34 +#done >> $OUTPUT 3.35 +#echo '</ul>' >> $OUTPUT 3.36 +#echo "Done"
4.1 --- a/slitaz.css Tue Mar 29 16:39:02 2011 +0100 4.2 +++ b/slitaz.css Wed Mar 30 04:30:56 2011 +0200 4.3 @@ -185,15 +185,31 @@ 4.4 border: 1px solid #ddd; 4.5 } 4.6 4.7 -.feed-grid { height: 180px; overflow: hidden; text-align: left; } 4.8 -.feed-grid h3 { 4.9 - margin: 15px 0 0; font-size: 16px; 4.10 - padding: 0 22px; 4.11 - background: url(images/feed.png) no-repeat left; } 4.12 -.feed-grid span { font-size: 10px; color: #888; margin-left: 24px; } 4.13 -.feed-grid ul { color: #666; } 4.14 -.feed-grid a { color: #666; } 4.15 -.feed-grid a:hover { color: blue; } 4.16 +/* Activity Box */ 4.17 + 4.18 +.activity { 4.19 + height: 120px; 4.20 + overflow: hidden; 4.21 + margin: 0 0 20px; 4.22 + background: #eaeaea; 4.23 + padding: 5px 2px 25px; 4.24 + border: 1px solid #ddd; 4.25 +} 4.26 +.activity div { height: 75px; overflow: hidden; 4.27 + padding: 0px 10px 10px; background: #fff; margin-top: 5px; } 4.28 +.activity p { margin: 0; padding: 5px 10px; font-weight: bold; } 4.29 +.activity a { text-decoration: none; } 4.30 +.activity ul { list-style-type: none; 4.31 + margin: 4px 0; padding: 0 4px; line-height: 150%; } 4.32 +.activity span { color: #666; font-size: 11px; font-weight: normal; } 4.33 +.activity, .activity div { 4.34 + -moz-border-radius: 4px; 4.35 + -webkit-border-radius: 4px; 4.36 + border-radius: 4px; 4.37 +} 4.38 +.activity_more { text-align: right; } 4.39 +.activity_more a { font-weight: normal; color: #000; padding: 0 4px; } 4.40 +.activity_more a:hover { text-decoration: underline; } 4.41 4.42 /* Button */ 4.43