:octocat: HTML: less bloat

This commit is contained in:
codemasher
2019-03-01 16:45:20 +01:00
parent 6d4bf7c744
commit 54bc9e114d
+4 -2
View File
@@ -56,10 +56,10 @@ class QRMarkup extends QROutputAbstract{
* @return string
*/
protected function html():string{
$html = '';
$html = '<div class="'.$this->options->cssClass.'">'.$this->options->eol;
foreach($this->matrix->matrix() as $row){
$html .= '<div'.($this->options->cssClass ? 'class="'.$this->options->cssClass.'"' : '').'>';
$html .= '<div>';
foreach($row as $M_TYPE){
$html .= '<span style="background: '.$this->moduleValues[$M_TYPE].';"></span>';
@@ -68,6 +68,8 @@ class QRMarkup extends QROutputAbstract{
$html .= '</div>'.$this->options->eol;
}
$html .= '</div>'.$this->options->eol;
if($this->options->cachefile){
return '<!DOCTYPE html><head><meta charset="UTF-8"></head><body>'.$this->options->eol.$html.'</body>';
}