cookutils diff lighttpd/index.cgi @ 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 1641fc593494
line diff
     1.1 --- a/lighttpd/index.cgi	Sun Jun 10 13:03:30 2018 +0300
     1.2 +++ b/lighttpd/index.cgi	Mon Jun 11 15:24:16 2018 +0300
     1.3 @@ -708,6 +708,13 @@
     1.4  	local log active bpkg short_desc=''
     1.5  	log="$LOGS/$pkg.log"
     1.6  
     1.7 +	echo -n "<div id=\"hdr\"><a href=\"$base/${requested_pkg:-$pkg}\">"
     1.8 +	if [ -e $wok/${requested_pkg:-$pkg}/.icon.png ]; then
     1.9 +		echo -n "<img src=\"$base/${requested_pkg:-$pkg}/browse/.icon.png\"/>"
    1.10 +	else
    1.11 +		echo -n "<img src=\"/tazpkg.png\"/>"
    1.12 +	fi
    1.13 +	echo -n "</a>"
    1.14  	echo -n "<h2><a href=\"$base/${requested_pkg:-$pkg}\">${requested_pkg:-$pkg}</a>"
    1.15  	# Get short description for existing packages
    1.16  	[ -f $PKGS/packages.info ] &&
    1.17 @@ -715,7 +722,7 @@
    1.18  	# If package does not exist (not created yet or broken), get short description
    1.19  	# (but only for "main" package) from receipt
    1.20  	[ -n "$short_desc" ] || short_desc="$(. $wok/$pkg/receipt; echo "$SHORT_DESC")"
    1.21 -	echo ": $short_desc</h2>"
    1.22 +	echo "<br/>$short_desc</h2></div>"
    1.23  	echo '<div id="info">'
    1.24  	echo "<a class='button icon receipt$(active receipt stuff)' href='$base/$pkg/receipt'>receipt &amp; stuff</a>"
    1.25