wok diff tazpkg-web/stuff/tazpkg-web @ rev 11959
Update linux-libre according to changes made to linux
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Thu Mar 01 17:57:00 2012 +0100 (2012-03-01) |
parents | 84af4a5de089 |
children |
line diff
1.1 --- a/tazpkg-web/stuff/tazpkg-web Tue Jan 11 14:07:34 2011 +0100 1.2 +++ b/tazpkg-web/stuff/tazpkg-web Thu Mar 01 17:57:00 2012 +0100 1.3 @@ -1,7 +1,7 @@ 1.4 #!/bin/sh 1.5 # SliTaz Packages Web interface generator: http://pkgs.slitaz.org/ 1.6 # 1.7 -# (C) 2009 SliTaz project - GNU General Public License v3. 1.8 +# (C) 2011 SliTaz project - GNU General Public License v3. 1.9 # Christophe Lincoln <pankso@slitaz.org> 1.10 # 1.11 1.12 @@ -30,33 +30,21 @@ 1.13 { 1.14 if [ "$RELEASE" == "stable" ]; then 1.15 cat << _EOT_ 1.16 - <option>stable</option> 1.17 - <option>cooking</option> 1.18 - <option>2.0</option> 1.19 - <option>1.0</option> 1.20 + <option>stable</option> 1.21 + <option>cooking</option> 1.22 + <option>2.0</option> 1.23 + <option>1.0</option> 1.24 _EOT_ 1.25 else 1.26 cat << _EOT_ 1.27 - <option>cooking</option> 1.28 - <option>stable</option> 1.29 - <option>2.0</option> 1.30 - <option>1.0</option> 1.31 + <option>cooking</option> 1.32 + <option>stable</option> 1.33 + <option>2.0</option> 1.34 + <option>1.0</option> 1.35 _EOT_ 1.36 fi 1.37 } 1.38 1.39 -content_top() 1.40 -{ 1.41 - cat >> $PAGES_DIR/$page.html << _EOF_ 1.42 - 1.43 -<!-- Content --> 1.44 -<div id="content"> 1.45 - 1.46 -<h1>Packages $RELEASE</h1> 1.47 -<h2>$h2</font></h2> 1.48 -_EOF_ 1.49 -} 1.50 - 1.51 # xHTML Header. 1.52 xhtml_header() 1.53 { 1.54 @@ -79,31 +67,33 @@ 1.55 { 1.56 cat >> $PAGES_DIR/$page.html << _EOT_ 1.57 1.58 -<div style="text-align: center; padding: 20px;"> 1.59 -<form method="post" action="http://pkgs.slitaz.org/search.cgi"> 1.60 - <select name="object"> 1.61 - <option>Package</option> 1.62 - <option>Desc</option> 1.63 - <option>Tags</option> 1.64 - <option>Receipt</option> 1.65 - <option>Depends</option> 1.66 - <option>BuildDepends</option> 1.67 - <option>File</option> 1.68 - <option>File_list</option> 1.69 - <option>FileOverlap</option> 1.70 - </select> 1.71 - <strong>:</strong> 1.72 - <input type="text" name="query" size="32" /> 1.73 - <select name="version"> 1.74 +<div class="pkgs-search"> 1.75 + <form method="post" action="http://pkgs.slitaz.org/search.cgi"> 1.76 + <p> 1.77 + <input type="text" name="query" size="32" /> 1.78 + <input type="submit" name="search" value="Search" /> 1.79 + </p> 1.80 + <select name="object"> 1.81 + <option>Package</option> 1.82 + <option>Desc</option> 1.83 + <option>Tags</option> 1.84 + <option>Receipt</option> 1.85 + <option>Depends</option> 1.86 + <option>BuildDepends</option> 1.87 + <option>File</option> 1.88 + <option>File_list</option> 1.89 + <option>FileOverlap</option> 1.90 + </select> 1.91 + <select name="version"> 1.92 `search_form_option` 1.93 - </select> 1.94 - <input type="submit" name="search" value="Search" /> 1.95 -</form> 1.96 -<p> 1.97 -$packages packages - Database generated on: $DATE 1.98 -</p> 1.99 + </select> 1.100 + </form> 1.101 + <p> 1.102 + $packages packages - Database generated on: $DATE 1.103 + </p> 1.104 </div> 1.105 _EOT_ 1.106 + sed -i s/"_RELEASE_"/"$RELEASE"/ $PAGES_DIR/$page.html 1.107 } 1.108 1.109 # Packages <h3> and infos in <pre>. Some packages use EXTRAVERSION in 1.110 @@ -171,7 +161,7 @@ 1.111 do 1.112 # Gen categories menu/links 1.113 echo '' >> $PAGES_DIR/$page.html 1.114 - echo '<p class="pkg_nav">' >> $PAGES_DIR/$page.html 1.115 + echo '<div class="infobox"><p>' >> $PAGES_DIR/$page.html 1.116 echo 'Categories' >> $PAGES_DIR/$page.html 1.117 for i in $CATEGORIES 1.118 do 1.119 @@ -179,7 +169,7 @@ 1.120 | <a href="$i.html">$i</a> 1.121 _EOF_ 1.122 done 1.123 - echo '</p>' >> $PAGES_DIR/$page.html 1.124 + echo '</p></div>' >> $PAGES_DIR/$page.html 1.125 xhtml_footer 1.126 done 1.127 } 1.128 @@ -192,7 +182,6 @@ 1.129 h2="Web interface" 1.130 RELEASE="" 1.131 xhtml_header 1.132 - content_top 1.133 cat $LIB_DIR/html/home.html >> $PAGES_DIR/$page.html 1.134 xhtml_footer 1.135 } 1.136 @@ -212,7 +201,8 @@ 1.137 h2=$page 1.138 xhtml_header 1.139 cat $LIB_DIR/html/menu.html >> $PAGES_DIR/$page.html 1.140 - content_top 1.141 + sed -i s/"_RELEASE_"/"$RELEASE"/ $PAGES_DIR/$page.html 1.142 + echo "<h2>Category: $h2</h2>" >> $PAGES_DIR/$page.html 1.143 done 1.144 status 1.145 # Scan the wok and classify packages by category. 1.146 @@ -229,7 +219,6 @@ 1.147 h2="Categories" 1.148 xhtml_header 1.149 cat $LIB_DIR/html/menu.html >> $PAGES_DIR/$page.html 1.150 - content_top 1.151 gen_index_content 1.152 xhtml_footer 1.153 home_page