config flag "shields_prefix" to add a "build:success" shield to everything

This commit is contained in:
mappu 2015-11-07 18:20:17 +13:00
parent f39a05ba59
commit ad76f6fb7a
2 changed files with 10 additions and 2 deletions

View File

@ -209,7 +209,12 @@ class CProject {
// Filter longdesc
$this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) {
return '<html>'.mkshield('written in', $matches[1], 'blue').'</html>';
return (
'<html>'.
(SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').'&nbsp;' : '').
mkshield('written in', $matches[1], 'blue').
'</html>'
);
}, $this->longdesc);
continue;
@ -539,7 +544,8 @@ function main($args) {
define('INDEX_THUMB_W', intval($config['codesite']['index_thumb_w']));
define('INDEX_THUMB_H', intval($config['codesite']['index_thumb_h']));
define('SHOW_BLURBS', !(isset($config['codesite']['blurbs']) && $config['codesite']['blurbs'] === 'off') );
define('ARTICLE_HEADER', (isset($config['codesite']['article_header']) ? $config['codesite']['article_header'] : 'ABOUT') );
define('ARTICLE_HEADER', (isset($config['codesite']['article_header']) ? $config['codesite']['article_header'] : 'ABOUT') );
define('SHIELDS_PREFIX', isset($config['codesite']['shields_prefix']));
// Perform build tasks

View File

@ -5,6 +5,8 @@ page_thumb_h=60
index_thumb_w=90
index_thumb_h=32
shields_prefix=true
; n.b. Recommend a multiple of the JPEG iDCT block size for index_thumb_h
[redirect]