website rev 678
Improve home page with last commit and pkgs + use PHP
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Nov 07 14:42:03 2010 +0100 (2010-11-07) |
parents | 4f104e052fba |
children | 031ff4450369 |
files | index.html index.php scripts/get-latest.sh slitaz.css |
line diff
1.1 --- a/index.html Sun Nov 07 14:20:27 2010 +0100 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,186 +0,0 @@ 1.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 1.5 - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1.6 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 1.7 -<head> 1.8 - <title>SliTaz GNU/Linux</title> 1.9 - <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 1.10 - <meta name="description" content="SliTaz GNU/Linux LiveCD operating system" /> 1.11 - <meta name="keywords" lang="en" content="System, libre, gnu, linux, logiciels opensource, livecd" /> 1.12 - <meta name="robots" content="index, follow, all" /> 1.13 - <meta name="revisit-after" content="3 days" /> 1.14 - <meta name="expires" content="never" /> 1.15 - <meta name="modified" content="2010-11-04 21:10:00" /> 1.16 - <meta name="author" content="Christophe Lincoln"/> 1.17 - <meta name="publisher" content="www.slitaz.org" /> 1.18 - <meta name="verify-v1" content="qieECDfB5l+EBkG8QMNuHOGfol0/MEe4U22/4iVupNw=" /> 1.19 - <link rel="shortcut icon" href="favicon.ico" /> 1.20 - <link rel="stylesheet" type="text/css" href="slitaz.css" /> 1.21 - <link rel="alternate" type="application/rss+xml" title="SliTaz Website feed" href="en/rss.xml" /> 1.22 - <link rel="alternate" type="application/atom+xml" title="SliTaz Labs feed" href="http://labs.slitaz.org/news?format=atom" /> 1.23 - <link rel="Content" href="index.html#content" /> 1.24 -</head> 1.25 -<body bgcolor="#ffffff"> 1.26 - 1.27 -<!-- Header --> 1.28 -<div id="header"> 1.29 - <a name="top"></a> 1.30 - <a href="http://www.slitaz.org/"><img id="logo" 1.31 - src="pics/website/logo.png" title="www.slitaz.org" alt="www.slitaz.org" 1.32 - style="border: 0px solid ; width: 200px; height: 74px;" /></a> 1.33 - <p id="titre">#!/GNU/Linux</p> 1.34 -</div> 1.35 - 1.36 -<!-- Navigation menu --> 1.37 -<div id="nav"> 1.38 - 1.39 -<div class="nav_box"> 1.40 -<h4>About SliTaz</h4> 1.41 -<p> 1.42 -SliTaz is an open source and free operating system providing a fully featured 1.43 -desktop or server in less than 30 Mb. SliTaz is simple to use, fast and stable. 1.44 -More information <a href="en/about/">about SliTaz...</a> 1.45 -</p> 1.46 -</div> 1.47 - 1.48 -<!-- Download --> 1.49 -<div class="nav_box"> 1.50 -<h4>Quick Download</h4> 1.51 -<ul> 1.52 - <li>Stable Core LiveCD: 1.53 - <a href="http://mirror.slitaz.org/iso/3.0/slitaz-3.0.iso">SliTaz 3.0</a></li> 1.54 - <li>Cooking Core LiveCD: 1.55 - <a href="http://mirror.slitaz.org/iso/cooking/slitaz-cooking.iso">SliTaz 20101104</a></li> 1.56 -</ul> 1.57 -</div> 1.58 - 1.59 -<!-- SliTaz network --> 1.60 -<div class="nav_box"> 1.61 -<h4>SliTaz Network</h4> 1.62 -<ul> 1.63 - <li><a href="http://forum.slitaz.org/">Community Forum</a></li> 1.64 - <li><a href="http://labs.slitaz.org/">SliTaz Laboratories</a></li> 1.65 - <li><a href="http://pkgs.slitaz.org/">Packages Database</a></li> 1.66 - <li><a href="http://pizza.slitaz.org/">Online Builder</a></li> 1.67 - <li><a href="http://boot.slitaz.org/">SliTaz Web Boot</a></li> 1.68 - <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li> 1.69 - <li><a href="http://distrowatch.com/slitaz">SliTaz on DistroWatch</a></li> 1.70 -</ul> 1.71 -</div> 1.72 - 1.73 -</div> 1.74 - 1.75 -<!-- Content top. --> 1.76 -<div id="content_top"> 1.77 -<div class="top_left"></div> 1.78 -<div class="top_right"></div> 1.79 -</div> 1.80 - 1.81 -<!-- Content --> 1.82 -<div id="content"> 1.83 -<a name="content"></a> 1.84 - 1.85 -<h1><font color="#3E1220">Home</font></h1> 1.86 -<h2><font color="#DF8F06">Boot baby... boot!</font></h2> 1.87 - 1.88 -<div class="infobox" style="font-weight: bold;"> 1.89 -<img 1.90 - src="pics/website/locale.png" 1.91 - style="vertical-align: middle; width: 20px; height: 20px;" 1.92 - alt="language" /> 1.93 -Language: 1.94 -<a href="de/index.html">Deutsch</a> - 1.95 -<a href="en/index.html">English</a> - 1.96 -<a href="es/index.html">Español</a> - 1.97 -<a href="fr/index.html">Français</a> - 1.98 -<a href="id/index.html">Indonesian</a> - 1.99 -<a href="pt/index.html">Português</a> - 1.100 -<a href="cn/index.html" title="Chinese"> 1.101 -<img 1.102 - src="cn/chinese_i18n.jpg" 1.103 - style="vertical-align: middle;" 1.104 - title="Chinese" alt="cn" /></a> 1.105 -</div> 1.106 - 1.107 -<div style="text-align: center;"> 1.108 -<img 1.109 - src="pics/website/screenpresentation.png" 1.110 - title="SliTaz Desktops" alt="slitaz-desktop" 1.111 - style="width: 380px; height: 170px; margin-top: 8px;" /> 1.112 -</div> 1.113 - 1.114 -<h2><font color="#DF8F06">News</font></h2> 1.115 - 1.116 -<div id="news"> 1.117 - 1.118 -<!-- We just keep the last 5 web site news --> 1.119 - 1.120 -<ul> 1.121 - <li><strong>4 November 2010 - New Cooking 20101104</strong></li> 1.122 - <li><strong>8 May 2010 - Summer of Documentation</strong></li> 1.123 - <li><strong>28 March 2010 - SliTaz GNU/Linux 3.0 released</strong></li> 1.124 - <li><strong>14 March 2010 - RC series and Solutionslinux 2010 (Paris)</strong></li> 1.125 - <li><strong>21 February 2010 - New Cooking 20100221</strong></li> 1.126 - <li><strong>Read the latest news : 1.127 - <a href="de/index.html#news">de</a> | 1.128 - <a href="en/index.html#news">en</a> | 1.129 - <a href="fr/index.html#news">fr</a> | 1.130 - <a href="pt/index.html#news">pt</a> | 1.131 - <a href="cn/index.html#news"><img 1.132 - src="cn/chinese_news.jpg" 1.133 - style="vertical-align: middle;" 1.134 - title="Chinese" alt="cn" /></a> 1.135 - </strong></li> 1.136 -</ul> 1.137 - 1.138 -<div class="infobox"> 1.139 -<img 1.140 - src="pics/website/news.png" 1.141 - style="vertical-align: middle; width: 20px; height: 20px;" alt="news" /> 1.142 -General activity of the project is published on 1.143 -<a href="http://labs.slitaz.org/news">SliTaz laboratories</a>. 1.144 -</div> 1.145 - 1.146 -<!-- End of news --> 1.147 -</div> 1.148 - 1.149 -<h2><font color="#DF8F06">Internationalization</font></h2> 1.150 - 1.151 -<p> 1.152 -The SliTaz web site is available in several languages and maintained by the 1.153 -<a href="i18n.html">internationalization</a> team (i18n). Help is often 1.154 -needed and you're welcome to join us if you would like to see the website 1.155 -translated into your language. 1.156 -</p> 1.157 - 1.158 -<!-- End of content with round corner --> 1.159 -</div> 1.160 -<div id="content_bottom"> 1.161 -<div class="bottom_left"></div> 1.162 -<div class="bottom_right"></div> 1.163 -</div> 1.164 - 1.165 -<!-- Start of footer and copy notice --> 1.166 -<div id="copy"> 1.167 -<p> 1.168 -Last modification: 2010-11-04 21:10:00 - 1.169 -<a href="index.html#top">Top of the page</a> 1.170 -</p> 1.171 -<p> 1.172 -Copyright © <span class="year"></span> <a href="http://www.slitaz.org/">SliTaz</a> - 1.173 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> 1.174 -</p> 1.175 -<!-- End of copy --> 1.176 -</div> 1.177 - 1.178 -<!-- Bottom and logo's --> 1.179 -<div id="bottom"> 1.180 -<p> 1.181 -<a href="http://validator.w3.org/check?uri=referer"><img 1.182 - src="pics/website/xhtml10.png" alt="Valid XHTML 1.0" 1.183 - title="Code validé XHTML 1.0" 1.184 - style="width: 80px; height: 15px;" /></a> 1.185 -</p> 1.186 -</div> 1.187 - 1.188 -</body> 1.189 -</html>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/index.php Sun Nov 07 14:42:03 2010 +0100 2.3 @@ -0,0 +1,206 @@ 2.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2.5 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 2.7 +<head> 2.8 + <title>SliTaz GNU/Linux</title> 2.9 + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 2.10 + <meta name="description" content="SliTaz GNU/Linux LiveCD operating system" /> 2.11 + <meta name="keywords" lang="en" content="System, libre, gnu, linux, logiciels opensource, livecd" /> 2.12 + <meta name="robots" content="index, follow, all" /> 2.13 + <meta name="revisit-after" content="3 days" /> 2.14 + <meta name="expires" content="never" /> 2.15 + <meta name="modified" content="2010-11-04 21:10:00" /> 2.16 + <meta name="author" content="Christophe Lincoln"/> 2.17 + <meta name="publisher" content="www.slitaz.org" /> 2.18 + <meta name="verify-v1" content="qieECDfB5l+EBkG8QMNuHOGfol0/MEe4U22/4iVupNw=" /> 2.19 + <link rel="shortcut icon" href="favicon.ico" /> 2.20 + <link rel="stylesheet" type="text/css" href="slitaz.css" /> 2.21 + <link rel="alternate" type="application/rss+xml" title="SliTaz Website feed" href="en/rss.xml" /> 2.22 + <link rel="alternate" type="application/atom+xml" title="SliTaz Labs feed" href="http://labs.slitaz.org/news?format=atom" /> 2.23 + <link rel="Content" href="index.html#content" /> 2.24 +</head> 2.25 +<body bgcolor="#ffffff"> 2.26 + 2.27 +<!-- Header --> 2.28 +<div id="header"> 2.29 + <a name="top"></a> 2.30 + <a href="http://www.slitaz.org/"><img id="logo" 2.31 + src="pics/website/logo.png" title="www.slitaz.org" alt="www.slitaz.org" 2.32 + style="border: 0px solid ; width: 200px; height: 74px;" /></a> 2.33 + <p id="titre">#!/GNU/Linux</p> 2.34 +</div> 2.35 + 2.36 +<!-- Navigation menu --> 2.37 +<div id="nav"> 2.38 + 2.39 +<div class="nav_box"> 2.40 +<h4><img 2.41 + src="pics/website/locale.png" 2.42 + style="vertical-align: middle; width: 20px; height: 20px;" 2.43 + alt="language" /> 2.44 +Language</h4> 2.45 +<div style="width: 50%; position: absolute; right: 0px;"> 2.46 +<ul> 2.47 +<li><a href="id/index.html">Indonesian</a></li> 2.48 + <li><a href="pt/index.html">Português</a></li> 2.49 + <li><a href="cn/index.html" title="Chinese"> 2.50 + <img 2.51 + src="pics/website/cn.png" 2.52 + style="vertical-align: middle;" 2.53 + title="Chinese" alt="cn" /></a></li> 2.54 +</ul> 2.55 +</div> 2.56 +<ul> 2.57 + <li><a href="en/index.html">English</a></li> 2.58 + <li><a href="de/index.html">Deutsch</a></li> 2.59 + <li><a href="fr/index.html">Français</a></li> 2.60 + <li><a href="es/index.html">Español</a> </li> 2.61 +</ul> 2.62 +</div> 2.63 + 2.64 +<div class="nav_box"> 2.65 +<h4>About SliTaz</h4> 2.66 +<p> 2.67 +SliTaz is an open source and free operating system providing a fully featured 2.68 +desktop or server in less than 30 Mb. SliTaz is simple to use, fast and stable. 2.69 +<a href="en/about/">More information...</a> 2.70 +</p> 2.71 +</div> 2.72 + 2.73 +<!-- Download --> 2.74 +<div class="nav_box"> 2.75 +<h4>Quick Download</h4> 2.76 +<ul> 2.77 + <li>Stable Core LiveCD: 2.78 + <a href="http://mirror.slitaz.org/iso/3.0/slitaz-3.0.iso">SliTaz 3.0</a></li> 2.79 + <li>Cooking Core LiveCD: 2.80 + <a href="http://mirror.slitaz.org/iso/cooking/slitaz-cooking.iso">SliTaz 20101104</a></li> 2.81 +</ul> 2.82 +</div> 2.83 + 2.84 +<!-- SliTaz network --> 2.85 +<div class="nav_box"> 2.86 +<h4>SliTaz Network</h4> 2.87 +<ul> 2.88 + <li><a href="http://forum.slitaz.org/">Community Forum</a></li> 2.89 + <li><a href="http://labs.slitaz.org/">SliTaz Laboratories</a></li> 2.90 + <li><a href="http://pkgs.slitaz.org/">Packages Database</a></li> 2.91 + <li><a href="http://pizza.slitaz.org/">Online Builder</a></li> 2.92 + <li><a href="http://boot.slitaz.org/">SliTaz Web Boot</a></li> 2.93 + <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li> 2.94 + <li><a href="http://distrowatch.com/slitaz">SliTaz on DistroWatch</a></li> 2.95 +</ul> 2.96 +</div> 2.97 + 2.98 +</div> 2.99 + 2.100 +<!-- Content top. --> 2.101 +<div id="content_top"> 2.102 +<div class="top_left"></div> 2.103 +<div class="top_right"></div> 2.104 +</div> 2.105 + 2.106 +<!-- Content --> 2.107 +<div id="content"> 2.108 +<a name="content"></a> 2.109 + 2.110 +<h1><font color="#3E1220">Home</font></h1> 2.111 +<h2><font color="#DF8F06">Boot baby... boot!</font></h2> 2.112 + 2.113 +<div style="text-align: center;"> 2.114 +<img 2.115 + src="pics/website/screenpresentation.png" 2.116 + title="SliTaz Desktops" alt="slitaz-desktop" 2.117 + style="width: 380px; height: 170px; margin-top: 8px;" /> 2.118 +</div> 2.119 + 2.120 +<div id="news"> 2.121 + 2.122 +<!-- We just keep the last 4 web site news --> 2.123 + 2.124 +<h2><font color="#DF8F06">Latest news</font></h2> 2.125 + 2.126 +<ul> 2.127 + <li><strong><a href="en/#news">4 November 2010 - New Cooking 20101104</a></strong></li> 2.128 + <li><strong>8 May 2010 - Summer of Documentation</strong></li> 2.129 + <li><strong>28 March 2010 - SliTaz GNU/Linux 3.0 released</strong></li> 2.130 + <li><strong>14 March 2010 - RC series and Solutionslinux 2010 (Paris)</strong></li> 2.131 + <li><strong>21 February 2010 - New Cooking 20100221</strong></li> 2.132 +</ul> 2.133 + 2.134 +<div class="infobox"> 2.135 +<img 2.136 + src="pics/website/news.png" 2.137 + style="vertical-align: middle; width: 20px; height: 20px;" alt="news" /> 2.138 +Read the latest news in your language: 2.139 +<strong><a href="en/index.html#news">en</a></strong> | 2.140 +<strong><a href="de/index.html#news">de</a></strong> | 2.141 +<strong><a href="es/index.html#news">es</a></strong> | 2.142 +<strong><a href="fr/index.html#news">fr</a></strong> | 2.143 +<strong><a href="id/index.html#news">id</a></strong> | 2.144 +<strong><a href="pt/index.html#news">pt</a></strong> | 2.145 +<a href="cn/index.html#news"><img 2.146 + src="pics/website/cn.png" 2.147 + style="vertical-align: middle;" 2.148 + title="Chinese" alt="cn" /></a> 2.149 +</div> 2.150 + 2.151 +<!-- We display the 5 last commit and build for cooking 2.152 + 2.153 +NOTE: Using php system() may use a lot of cpu, we have a cron to generate 2.154 + an include file each hours. Example with PHP: 2.155 + echo "<ul>\n"; 2.156 + system("hg log --repository $repo --limit 5 --no-merges \ 2.157 + --template ' <li><strong>{date|shortdate}</strong> \ 2.158 + - <a href=\"$url/rev/{rev}\">{desc}</a></li>\n'"); 2.159 + echo "<\ul>\n"; 2.160 +--> 2.161 + 2.162 +<?php 2.163 +include("/var/cache/slitaz/website/latest.html"); 2.164 +?> 2.165 + 2.166 +<!-- End of news --> 2.167 +</div> 2.168 + 2.169 +<h2><font color="#DF8F06">Internationalization</font></h2> 2.170 + 2.171 +<p> 2.172 +The SliTaz web site is available in several languages and maintained by the 2.173 +<a href="i18n.html">internationalization</a> team (i18n). Help is often 2.174 +needed and you're welcome to join us if you would like to see the website 2.175 +translated into your language. 2.176 +</p> 2.177 + 2.178 +<!-- End of content with round corner --> 2.179 +</div> 2.180 +<div id="content_bottom"> 2.181 +<div class="bottom_left"></div> 2.182 +<div class="bottom_right"></div> 2.183 +</div> 2.184 + 2.185 +<!-- Start of footer and copy notice --> 2.186 +<div id="copy"> 2.187 +<p> 2.188 +Last modification: 2010-11-04 21:10:00 - 2.189 +<a href="index.html#top">Top of the page</a> 2.190 +</p> 2.191 +<p> 2.192 +Copyright © <span class="year"></span> <a href="http://www.slitaz.org/">SliTaz</a> - 2.193 +<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> 2.194 +</p> 2.195 +<!-- End of copy --> 2.196 +</div> 2.197 + 2.198 +<!-- Bottom and logo's --> 2.199 +<div id="bottom"> 2.200 +<p> 2.201 +<a href="http://validator.w3.org/check?uri=referer"><img 2.202 + src="pics/website/xhtml10.png" alt="Valid XHTML 1.0" 2.203 + title="Code validé XHTML 1.0" 2.204 + style="width: 80px; height: 15px;" /></a> 2.205 +</p> 2.206 +</div> 2.207 + 2.208 +</body> 2.209 +</html>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/scripts/get-latest.sh Sun Nov 07 14:42:03 2010 +0100 3.3 @@ -0,0 +1,35 @@ 3.4 +#!/bin/sh 3.5 +# 3.6 +# Get latest commits and packages to display on the website main page. 3.7 +# On Tank, this script is executed by cron each hour. 3.8 +# 3.9 + 3.10 +REPO="/home/slitaz/repos/wok" 3.11 +URL="http://hg.slitaz.org/wok" 3.12 +PKGS="/home/slitaz/cooking/packages" 3.13 +OUTPUT="/var/cache/slitaz/website/latest.html" 3.14 + 3.15 +mkdir -p /var/cache/slitaz/website 3.16 + 3.17 +# Latest Hg commits 3.18 +echo -n "Getting latest commits... " 3.19 +echo '<h2><font color="#DF8F06">Latest commits</font></h2>' > $OUTPUT 3.20 +echo "<ul>" >> $OUTPUT 3.21 +hg log --repository $REPO --limit 5 --no-merges \ 3.22 + --template " <li><strong>{date|shortdate}</strong> \ 3.23 +- <a href=\"$URL/rev/{rev}\">{desc}</a></li>\n" >> $OUTPUT 2> /dev/null 3.24 +echo "</ul>" >> $OUTPUT 3.25 +echo "Done" 3.26 + 3.27 +# Latest cooked packages by the build bot. 3.28 +echo -n "Getting latest cooked packages... " 3.29 +echo '<h2><font color="#DF8F06">Latest cooked packages</font></h2>' >> $OUTPUT 3.30 +echo "<ul>" >> $OUTPUT 3.31 +cd $PKGS && ls -1t *.tazpkg | head -5 | \ 3.32 +while read file 3.33 +do 3.34 + echo -n ' <li>'$(stat -c '%y' $PKGS/$file | \ 3.35 + cut -d ' ' -f 1); echo " - $file</li>" 3.36 +done >> $OUTPUT 3.37 +echo "</ul>" >> $OUTPUT 3.38 +echo "Done"