cookutils rev 253
cooker.cgi: let use a custom header.html if exist and have an empty div for a logo
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 29 03:34:50 2011 +0200 (2011-05-29) |
parents | 4f97a0834221 |
children | 87dfc250bba0 |
files | README data/header.html web/cooker.cgi |
line diff
1.1 --- a/README Sun May 29 03:15:40 2011 +0200 1.2 +++ b/README Sun May 29 03:34:50 2011 +0200 1.3 @@ -29,7 +29,8 @@ 1.4 Cook does not: 1.5 1.6 * Depend on Hg but can use it to manage a wok 1.7 - * Do complex work like compiling the whole system from source 1.8 + * Do complex work like compiling the whole system from source in 1.9 + one command, but can rebuild the full system step by step. 1.10 * Check build deps for you, use: BUILD_DEPENDS 1.11 If all deps are also build deps do: BUILD_DEPENDS="$DEPENDS" 1.12 * The work of a Build Bot, unix philosophy: one tool for one task 1.13 @@ -86,6 +87,11 @@ 1.14 * installed* : Lists used to compare installed packages before and after 1.15 a package is cooked so we can remove them 1.16 1.17 +The Cooker we interface can by highly customized through the CSS style and via 1.18 +an optionnal header.html file that must be in the same directory than the CGI 1.19 +script, like for style.css and a custom favicon. Yoou can find a header.html 1.20 +example in the data/ directory or in /usr/share/cook if cookutils are installed. 1.21 + 1.22 1.23 Toolchain 1.24 --------------------------------------------------------------------------------
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/data/header.html Sun May 29 03:34:50 2011 +0200 2.3 @@ -0,0 +1,17 @@ 2.4 +<!DOCTYPE html> 2.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 2.6 +<head> 2.7 + <title>SliTaz Cooker</title> 2.8 + <meta charset="utf-8" /> 2.9 + <link rel="shortcut icon" href="favicon.ico" /> 2.10 + <link rel="stylesheet" type="text/css" href="style.css" /> 2.11 +</head> 2.12 +<body> 2.13 + 2.14 +<div id="header"> 2.15 + <div id="logo"></div> 2.16 + <h1><a href="cooker.cgi">SliTaz Cooker</a></h1> 2.17 +</div> 2.18 + 2.19 +<!-- Content --> 2.20 +<div id="content">
3.1 --- a/web/cooker.cgi Sun May 29 03:15:40 2011 +0200 3.2 +++ b/web/cooker.cgi Sun May 29 03:34:50 2011 +0200 3.3 @@ -68,8 +68,11 @@ 3.4 done 3.5 } 3.6 3.7 -# xHTML header 3.8 -cat << EOT 3.9 +# xHTML header. Pages can be customized with a separated html.header file. 3.10 +if [ -f "header.html" ]; then 3.11 + cat header.html 3.12 +else 3.13 + cat << EOT 3.14 <!DOCTYPE html> 3.15 <html xmlns="http://www.w3.org/1999/xhtml"> 3.16 <head> 3.17 @@ -81,12 +84,14 @@ 3.18 <body> 3.19 3.20 <div id="header"> 3.21 + <div id="logo"></div> 3.22 <h1><a href="cooker.cgi">SliTaz Cooker</a></h1> 3.23 </div> 3.24 3.25 <!-- Content --> 3.26 <div id="content"> 3.27 EOT 3.28 +fi 3.29 3.30 # 3.31 # Load requested page