slitaz-forge rev 231

pkgs: separate HTML header/footer and custom CSS
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 05 18:43:53 2012 +0200 (2012-04-05)
parents fc752f65180f
children 79fd762fe745
files pkgs/lib/footer.html pkgs/lib/header.html pkgs/pkgs.css pkgs/search.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pkgs/lib/footer.html	Thu Apr 05 18:43:53 2012 +0200
     1.3 @@ -0,0 +1,8 @@
     1.4 +<!-- End of content -->
     1.5 +</div>
     1.6 +
     1.7 +<!-- Footer -->
     1.8 +<div id="footer">SliTaz Packages</div>
     1.9 +
    1.10 +</body>
    1.11 +</html>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/pkgs/lib/header.html	Thu Apr 05 18:43:53 2012 +0200
     2.3 @@ -0,0 +1,29 @@
     2.4 +<!DOCTYPE html>
     2.5 +<html xmlns="http://www.w3.org/1999/xhtml">
     2.6 +<head>
     2.7 +	<title>SliTaz Packages - Search %SEARCH%</title>
     2.8 +	<meta charset="utf-8" />
     2.9 +	<meta name="description" content="slitaz packages search" />
    2.10 +	<meta name="keywords" lang="en" content="SliTaz, Tazpkg" />
    2.11 +	<meta name="robots" content="index, follow, all" />
    2.12 +	<meta name="expires" content="never" />
    2.13 +	<link rel="shortcut icon" href="style/favicon.ico" />
    2.14 +	<link rel="stylesheet"  type="text/css" href="style/slitaz.css" />
    2.15 +	<link rel="stylesheet"  type="text/css" href="pkgs.css" />
    2.16 +</head>
    2.17 +<body>
    2.18 +
    2.19 +<div id="header">
    2.20 +	<div id="logo"></div>
    2.21 +	<div id="network">
    2.22 +		<a href="http://www.slitaz.org/">Home</a>
    2.23 +		<a href="http://scn.slitaz.org/">Community</a>
    2.24 +		<a href="http://doc.slitaz.org/">Doc</a>
    2.25 +		<a href="http://forum.slitaz.org/">Forum</a>
    2.26 +		<a href="http://slitaz.pro/">Pro</a>
    2.27 +		<a href="http://shop.slitaz.org/">Shop</a>
    2.28 +		<a href="http://bugs.slitaz.org/">Bugs</a>
    2.29 +		<a href="http://hg.slitaz.org/">Hg</a>
    2.30 +	</div>
    2.31 +	<h1><a href="./">SliTaz Packages</a></h1>
    2.32 +</div>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/pkgs/pkgs.css	Thu Apr 05 18:43:53 2012 +0200
     3.3 @@ -0,0 +1,21 @@
     3.4 +
     3.5 +#header {
     3.6 +	border-bottom: 8px solid #d66018;
     3.7 +}
     3.8 +
     3.9 +input[type=text] {
    3.10 +	/*width: inherit;*/
    3.11 +	width: 40%;
    3.12 +}
    3.13 +
    3.14 +#content {
    3.15 +	margin: 6px 40px 0px 0px;
    3.16 +}
    3.17 +
    3.18 +#copy {
    3.19 +	text-align: center;
    3.20 +}
    3.21 +
    3.22 +#bottom {
    3.23 +	text-align: center;
    3.24 +}
     4.1 --- a/pkgs/search.sh	Thu Apr 05 18:29:07 2012 +0200
     4.2 +++ b/pkgs/search.sh	Thu Apr 05 18:43:53 2012 +0200
     4.3 @@ -13,7 +13,7 @@
     4.4  SEARCH=$query
     4.5  SLITAZ_VERSION=$version
     4.6  OBJECT=$object
     4.7 -DATE=`date +%Y-%m-%d\ %H:%M:%S`
     4.8 +DATE=$(date +%Y-%m-%d\ %H:%M:%S)
     4.9  VERSION=cooking
    4.10  if [ "$REQUEST_METHOD" = "GET" ]; then
    4.11  	SEARCH=""
    4.12 @@ -230,108 +230,20 @@
    4.13  }
    4.14  
    4.15  # xHTML Header.
    4.16 -xhtml_header()
    4.17 -{
    4.18 -	cat << _EOF_
    4.19 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    4.20 -	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    4.21 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$LANG" lang="$LANG">
    4.22 -<head>
    4.23 -	<title>SliTaz Packages - Search $SEARCH</title>
    4.24 -	<meta http-equiv="content-type" content="text/html; charset=$charset" />
    4.25 -	<meta name="description" content="Au sujet de SliTaz GNU/Linux mini système d'exploitation" />
    4.26 -	<meta name="keywords" lang="fr" content="Système, libre, gnu, linux, opensource, livecd" />
    4.27 -	<meta name="robots" content="index, follow, all" />
    4.28 -	<meta name="revisit-after" content="7 days" />
    4.29 -	<meta name="expires" content="never" />
    4.30 -	<meta name="modified" content="$DATE" />
    4.31 -	<meta name="author" content="ash, awk, grep, sed and cat"/>
    4.32 -	<meta name="publisher" content="www.slitaz.org" />
    4.33 -	<link rel="shortcut icon" href="style/favicon.ico" />
    4.34 -	<link rel="stylesheet"  type="text/css" href="style/slitaz.css" />
    4.35 -	<style type="text/css">
    4.36 -
    4.37 -input[type=text] {
    4.38 -#	width: inherit;
    4.39 -	width: 40%;
    4.40 -}
    4.41 -
    4.42 -#content {
    4.43 -	margin: 6px 40px 0px 0px;
    4.44 -}
    4.45 -
    4.46 -#copy {
    4.47 -	text-align: center;
    4.48 -}
    4.49 -
    4.50 -#bottom {
    4.51 -	text-align: center;
    4.52 -}
    4.53 -
    4.54 -	</style>
    4.55 -</head>
    4.56 -<body>
    4.57 -
    4.58 -<!-- Header -->
    4.59 -<div id="header">
    4.60 -	<a name="top"></a>
    4.61 -	<div id="logo"></div>
    4.62 -	<div id="network">
    4.63 -		<a href="http://www.slitaz.org/">
    4.64 -		<img src="style/home.png" alt="[ home ]" /></a>
    4.65 -		<a href="http://scn.slitaz.org/">Community</a>
    4.66 -		<a href="http://doc.slitaz.org/" title="SliTaz Community Documentation">Doc</a>
    4.67 -		<a href="http://forum.slitaz.org/" title="Slitaz Forum">Forum</a>
    4.68 -		<a href="http://bugs.slitaz.org/" title="Bug Tracking System">Bugs</a>
    4.69 -		<a href="http://hg.slitaz.org/" title="SliTaz repositories">Hg</a>
    4.70 -		<a href="http://cook.slitaz.org/" title="SliTaz build bot">BB</a>
    4.71 -	</div>
    4.72 -	<h1><a href="http://pkgs.slitaz.org/">SliTaz Packages</a></h1>
    4.73 -</div>
    4.74 -_EOF_
    4.75 +xhtml_header() {
    4.76 +	cat lib/header.html | sed s'/%SEARCH%/$SEARCH/'
    4.77  }
    4.78  
    4.79  # xHTML Footer.
    4.80 -xhtml_footer()
    4.81 -{
    4.82 +xhtml_footer() {
    4.83  	cat << _EOT_
    4.84 +
    4.85  <center>
    4.86  <i>$(ls $WOK/ | wc -l) packages and $(unlzma -c $PACKAGES_REPOSITORY/files.list.lzma | wc -l) files in $SLITAZ_VERSION database</i>
    4.87  </center>
    4.88  
    4.89 -<!-- End of content -->
    4.90 -</div>
    4.91 -<div id="content_bottom">
    4.92 -<div class="bottom_left"></div>
    4.93 -<div class="bottom_right"></div>
    4.94 -</div>
    4.95 -
    4.96 -<!-- Start of footer and copy notice -->
    4.97 -<div id="copy">
    4.98 -<p>
    4.99 -Dernière modification : $DATE -
   4.100 -<a href="#top">Top of the page</a>
   4.101 -</p>
   4.102 -<p>
   4.103 -Copyright &copy; $(date +%Y) <a href="http://www.slitaz.org/">SliTaz</a> -
   4.104 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   4.105 -</p>
   4.106 -<!-- End of copy -->
   4.107 -</div>
   4.108 -
   4.109 -<!-- Bottom and logo's -->
   4.110 -<div id="bottom">
   4.111 -<p>
   4.112 -<a href="http://validator.w3.org/check?uri=referer"><img
   4.113 -	src="style/xhtml10.png" alt="Valid XHTML 1.0"
   4.114 -	title="Code validé XHTML 1.0"
   4.115 -	style="width: 80px; height: 15px;" /></a>
   4.116 -</p>
   4.117 -</div>
   4.118 -
   4.119 -</body>
   4.120 -</html>
   4.121  _EOT_
   4.122 +	cat lib/footer.html
   4.123  }
   4.124  
   4.125  installed_size()