slitaz-pizza rev 14

Add Gravatar support to flavor status page
author Christophe Lincoln <pankso@slitaz.org>
date Mon Mar 26 13:05:04 2012 +0200 (2012-03-26)
parents 3d50b39eb83d
children 41980f21c33e
files Makefile web/lib/libpizza web/pizza.cgi web/style.css
line diff
     1.1 --- a/Makefile	Mon Mar 26 10:30:48 2012 +0200
     1.2 +++ b/Makefile	Mon Mar 26 13:05:04 2012 +0200
     1.3 @@ -54,3 +54,5 @@
     1.4  
     1.5  clean:
     1.6  	rm -rf po/*~
     1.7 +	rm -rf po/mo
     1.8 +	
     2.1 --- a/web/lib/libpizza	Mon Mar 26 10:30:48 2012 +0200
     2.2 +++ b/web/lib/libpizza	Mon Mar 26 13:05:04 2012 +0200
     2.3 @@ -59,3 +59,14 @@
     2.4  </script>
     2.5  EOT
     2.6  }
     2.7 +
     2.8 +# Get and display Gravatar image: get_gravatar email size
     2.9 +# Link to profile: <a href="http://www.gravatar.com/$md5">...</a>
    2.10 +get_gravatar() {
    2.11 +	email=$1
    2.12 +	size=$2
    2.13 +	[ "$size" ] || size=48
    2.14 +	url="http://www.gravatar.com/avatar"
    2.15 +	md5=$(echo -n $email | md5sum | cut -d " " -f 1)
    2.16 +	echo "<img src='$url/$md5?d=identicon&s=$size' alt='[ Gravatar ]' />"
    2.17 +}
     3.1 --- a/web/pizza.cgi	Mon Mar 26 10:30:48 2012 +0200
     3.2 +++ b/web/pizza.cgi	Mon Mar 26 13:05:04 2012 +0200
     3.3 @@ -257,9 +257,9 @@
     3.4  		[ "$ROOTFS_SIZE" ] || ROOTFS_SIZE="N/A"
     3.5  		cat << EOT
     3.6  <h2>$(gettext "Status for:") $FLAVOR</h2>
     3.7 -<p>
     3.8 -	$(gettext "Flavor description:") $SHORT_DESC
     3.9 -</p>
    3.10 +<div>
    3.11 +	$(get_gravatar $MAINTAINER) $(gettext "Flavor description:") $SHORT_DESC
    3.12 +</div>
    3.13  <pre>
    3.14  Uniq ID     : $id
    3.15  Flavor      : $FLAVOR
     4.1 --- a/web/style.css	Mon Mar 26 10:30:48 2012 +0200
     4.2 +++ b/web/style.css	Mon Mar 26 13:05:04 2012 +0200
     4.3 @@ -161,7 +161,7 @@
     4.4  
     4.5  /* Round corner */
     4.6  
     4.7 -pre, table, input, textarea, select, .note, .box, #notify {
     4.8 +img, pre, table, input, textarea, select, .note, .box, #notify {
     4.9  	-moz-border-radius: 4px;
    4.10  	-webkit-border-radius: 4px;
    4.11  	border-radius: 4px;