shunt shields (almost) to the top

This commit is contained in:
mappu 2015-11-07 18:22:10 +13:00
parent ad76f6fb7a
commit 1194223ddd

View File

@ -208,14 +208,18 @@ class CProject {
$this->shortdesc[0] = strtolower($this->shortdesc[0]); // cosmetic lowercase
// Filter longdesc
$this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) {
return (
$prefix_html = '';
$this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) use (&$prefix_html) {
$prefix_html .= (
'<html>'.
(SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').'&nbsp;' : '').
mkshield('written in', $matches[1], 'blue').
'<br/>'.
'</html>'
);
return '';
}, $this->longdesc);
$this->longdesc = $prefix_html.$this->longdesc;
continue;
}