cookutils rev 1074

lighttpd/index.cgi: show package icon (optional)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jun 11 15:24:16 2018 +0300 (2018-06-11)
parents ecb4a935ac17
children 470782e610f9
files lighttpd/cooker.css lighttpd/index.cgi
line diff
     1.1 --- a/lighttpd/cooker.css	Sun Jun 10 13:03:30 2018 +0300
     1.2 +++ b/lighttpd/cooker.css	Mon Jun 11 15:24:16 2018 +0300
     1.3 @@ -109,7 +109,7 @@
     1.4  
     1.5  h2 {
     1.6  	margin: 0; padding: 0.2rem;
     1.7 -	font: bold 1.3rem/2rem sans-serif;
     1.8 +	font: bold 1.3rem/1.6rem sans-serif;
     1.9  	color: rgba(0,0,0,0.7);
    1.10  }
    1.11  section h2, section h3 {
    1.12 @@ -188,6 +188,18 @@
    1.13  	margin: auto;
    1.14  	padding: 0.5em 0.5em 5em;
    1.15  }
    1.16 +#hdr {
    1.17 +	margin: 0.2rem;
    1.18 +}
    1.19 +#hdr img {
    1.20 +	float: left;
    1.21 +	padding-right: 0.5rem;
    1.22 +	height: 48px;
    1.23 +	width: 48px;
    1.24 +}
    1.25 +#info {
    1.26 +	clear: both;
    1.27 +}
    1.28  #content2, div.list {
    1.29  	width: 100%; box-sizing: border-box;
    1.30  	max-width: 700px;
    1.31 @@ -382,7 +394,6 @@
    1.32  .summary th, .summary td { white-space: nowrap; width: 1rem; text-align: center; }
    1.33  .summary th:last-child, .summary td:last-child { width: unset; }
    1.34  
    1.35 -#webstat { height: 7em; }
    1.36  .webstat td { text-align: center; width: 16%; }
    1.37  .webstat td:first-child { text-align: unset; width: unset; }
    1.38  
     2.1 --- a/lighttpd/index.cgi	Sun Jun 10 13:03:30 2018 +0300
     2.2 +++ b/lighttpd/index.cgi	Mon Jun 11 15:24:16 2018 +0300
     2.3 @@ -708,6 +708,13 @@
     2.4  	local log active bpkg short_desc=''
     2.5  	log="$LOGS/$pkg.log"
     2.6  
     2.7 +	echo -n "<div id=\"hdr\"><a href=\"$base/${requested_pkg:-$pkg}\">"
     2.8 +	if [ -e $wok/${requested_pkg:-$pkg}/.icon.png ]; then
     2.9 +		echo -n "<img src=\"$base/${requested_pkg:-$pkg}/browse/.icon.png\"/>"
    2.10 +	else
    2.11 +		echo -n "<img src=\"/tazpkg.png\"/>"
    2.12 +	fi
    2.13 +	echo -n "</a>"
    2.14  	echo -n "<h2><a href=\"$base/${requested_pkg:-$pkg}\">${requested_pkg:-$pkg}</a>"
    2.15  	# Get short description for existing packages
    2.16  	[ -f $PKGS/packages.info ] &&
    2.17 @@ -715,7 +722,7 @@
    2.18  	# If package does not exist (not created yet or broken), get short description
    2.19  	# (but only for "main" package) from receipt
    2.20  	[ -n "$short_desc" ] || short_desc="$(. $wok/$pkg/receipt; echo "$SHORT_DESC")"
    2.21 -	echo ": $short_desc</h2>"
    2.22 +	echo "<br/>$short_desc</h2></div>"
    2.23  	echo '<div id="info">'
    2.24  	echo "<a class='button icon receipt$(active receipt stuff)' href='$base/$pkg/receipt'>receipt &amp; stuff</a>"
    2.25