website rev 747

mainpage: Use RSS for Hg commit
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jan 23 23:17:48 2011 +0100 (2011-01-23)
parents 6fa4ffc7415d
children 3775ba2ff56a
files index.php libs/get-latest.sh slitaz.css
line diff
     1.1 --- a/index.php	Sun Jan 23 23:01:40 2011 +0100
     1.2 +++ b/index.php	Sun Jan 23 23:17:48 2011 +0100
     1.3 @@ -183,12 +183,16 @@
     1.4  		<?php get_atom_feed("/var/cache/slitaz/website/bugs.xml"); ?>
     1.5  	</div>
     1.6  </div>
     1.7 -
     1.8 -<!-- We display the 5 last commit and build for cooking -->
     1.9 -
    1.10 -<?php
    1.11 -include("/var/cache/slitaz/website/latest.html");
    1.12 -?>
    1.13 +<div class="feed-grid">
    1.14 +	<div class="right_box">
    1.15 +		<h3><img src="pics/website/feed.png" alt=".png" />Latest cooked packages</h3>
    1.16 +		<?php include("/var/cache/slitaz/website/latest.html"); ?>
    1.17 +	</div>
    1.18 +	<div class="left_box">
    1.19 +		<h3><img src="pics/website/feed.png" alt=".png" />Latest commits</h3>
    1.20 +		<?php get_atom_feed("/var/cache/slitaz/website/wok.xml"); ?>
    1.21 +	</div>
    1.22 +</div>
    1.23  
    1.24  <h2>Spread SliTaz</h2>
    1.25  <p>
     2.1 --- a/libs/get-latest.sh	Sun Jan 23 23:01:40 2011 +0100
     2.2 +++ b/libs/get-latest.sh	Sun Jan 23 23:17:48 2011 +0100
     2.3 @@ -15,6 +15,7 @@
     2.4  DOC_FEED='http://doc.slitaz.org/feed.php'
     2.5  FORUM_FEED='http://forum.slitaz.org/discussions/feed.rss'
     2.6  BUGS_FEED='http://labs.slitaz.org/issues.atom?query_id='
     2.7 +WOK_FEED='http://hg.slitaz.org/wok/rss-log'
     2.8  
     2.9  # Clean cache
    2.10  mkdir -p $CACHE && cd $CACHE
    2.11 @@ -24,31 +25,17 @@
    2.12  wget -O scn.xml $SCN_FEED
    2.13  wget -O doc.xml $DOC_FEED
    2.14  wget -O forum.xml $FORUM_FEED 
    2.15 -wget -O bugs.xml $BUGS_FEED 
    2.16 -
    2.17 -# Latest Hg commits
    2.18 -echo -n "Getting latest commits... "
    2.19 -echo '<div class="feed-grid"><div class="right_box">' > $OUTPUT
    2.20 -echo '<h3><img src="pics/website/feed.png" alt=".png" />Latest commits</h3>' >> $OUTPUT
    2.21 -echo '<ul>' >> $OUTPUT
    2.22 -hg log --repository $REPO --limit 5 --no-merges \
    2.23 -	--template "	<li><strong>{date|shortdate}</strong> \
    2.24 -- <a href=\"$URL/rev/{rev}\">{desc}</a></li>\n" >> $OUTPUT 2> /dev/null
    2.25 -echo '</ul>' >> $OUTPUT
    2.26 -echo '</div>' >> $OUTPUT
    2.27 -echo "Done"
    2.28 +wget -O bugs.xml $BUGS_FEED
    2.29 +wget -O wok.xml $WOK_FEED
    2.30  
    2.31  # Latest cooked packages by the build bot.
    2.32  echo -n "Getting latest cooked packages... "
    2.33 -echo '<div class="left_box">' >> $OUTPUT
    2.34 -echo '<h3><img src="pics/website/feed.png" alt=".png" />Latest cooked packages</h3>' >> $OUTPUT
    2.35  echo '<ul>' >> $OUTPUT
    2.36 -cd $PKGS && ls -1t *.tazpkg | head -5 | \
    2.37 +cd $PKGS && ls -1t *.tazpkg | head -8 | \
    2.38  while read file
    2.39  do
    2.40 -	echo -n '	<li><strong>'$(stat -c '%y' $PKGS/$file | \
    2.41 -	cut -d ' ' -f 1); echo "</strong> - $file</li>"
    2.42 +	echo -n '	<li>'$(stat -c '%y' $PKGS/$file | \
    2.43 +	cut -d ' ' -f 1); echo " - $file</li>"
    2.44  done >> $OUTPUT
    2.45  echo '</ul>' >> $OUTPUT
    2.46 -echo '</div></div>' >> $OUTPUT
    2.47  echo "Done"
     3.1 --- a/slitaz.css	Sun Jan 23 23:01:40 2011 +0100
     3.2 +++ b/slitaz.css	Sun Jan 23 23:17:48 2011 +0100
     3.3 @@ -234,8 +234,8 @@
     3.4  #block_top:hover, #block_nav:hover, #footer:hover { 
     3.5  	background-color: #f8f8f8;
     3.6  }
     3.7 -.right_box { width: 50%; float: right; }
     3.8 -.left_box { width: 50%; float: left; }
     3.9 +.right_box { width: 48%; float: right; }
    3.10 +.left_box { width: 48%; float: left; }
    3.11  
    3.12  /* Button */
    3.13  .button { margin-left: 20px; }