fix style displaying in html mode
This commit is contained in:
parent
7f6fdfaf36
commit
a614f24061
|
@ -86,11 +86,11 @@ class Formatter
|
||||||
if (!$this->embedStyle) {
|
if (!$this->embedStyle) {
|
||||||
$this->embedStyle = true;
|
$this->embedStyle = true;
|
||||||
$style .= '<style type="text/css">'
|
$style .= '<style type="text/css">'
|
||||||
. '.meta-tech-of-line { white-space:pre !important; background-color:black !important; color:white !important; font-weight:bold !important; font-family:monospace !important; padding:10px !important; margin-top:0 !important }'
|
. '.meta-tech-of-line { font-size:13px !important; background-color:black !important; color:white !important; white-space:pre !important; font-weight:bold !important; font-family:\'monospace\' !important; padding:10px !important; margin-top:0 !important }'
|
||||||
. '.meta-tech-of-tag1 { color:#FB4E4E !important; }'
|
. '.meta-tech-of-tag1 { color:#FB4E4E !important; }'
|
||||||
. '.meta-tech-of-tag2 { color:#20FF93 !important; }'
|
. '.meta-tech-of-tag2 { color:#20FF93 !important; }'
|
||||||
. '.meta-tech-of-tag3 { color:#FFDC58 !important; }'
|
. '.meta-tech-of-tag3 { color:#FFDC58 !important; }'
|
||||||
. '.meta-tech-of-tag4 { color:#44A2D6 !important; }'
|
. '.meta-tech-of-tag4 { color:#44A2D6 !important; }'
|
||||||
. '</style>';
|
. '</style>';
|
||||||
}
|
}
|
||||||
return $style;
|
return $style;
|
||||||
|
@ -128,7 +128,7 @@ class Formatter
|
||||||
{
|
{
|
||||||
$content = $value . ($newline ? self::LF : '');
|
$content = $value . ($newline ? self::LF : '');
|
||||||
if ($this->type == self::TYPE_HTML) {
|
if ($this->type == self::TYPE_HTML) {
|
||||||
$content = $this->embedStyleIfNeeded() . '<div class"meta-tech-ofline">'.$content.'</div>';
|
$content = $this->embedStyleIfNeeded() . '<div class="meta-tech-of-line">'.$content.'</div>';
|
||||||
}
|
}
|
||||||
echo $content;
|
echo $content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Client
|
||||||
if (!is_array($config)) {
|
if (!is_array($config)) {
|
||||||
throw new \Exception('bad rest config');
|
throw new \Exception('bad rest config');
|
||||||
}
|
}
|
||||||
$typeFormatter = $this->config['html_output'] ? Formatter::TYPE_HTML : Formatter::TYPE_CLI;
|
$typeFormatter = $config['html_output'] ? Formatter::TYPE_HTML : Formatter::TYPE_CLI;
|
||||||
$this->formatter = new Formatter($typeFormatter);
|
$this->formatter = new Formatter($typeFormatter);
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->authenticator = $authenticator;
|
$this->authenticator = $authenticator;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user