[英]How to remove logo image?
I'm trying to remove a logo image from the bottom of my page. 我正在尝试从页面底部删除徽标图像。 The logo is generated by the following function:
徽标由以下功能生成:
function addLogoContentBlock($content, $styles) {
if(empty($content['blocks'])) return $content;
$content['blocks'][] = array(
'type' => 'container',
'orientation' => 'horizontal',
'styles' => array(
'block' => array(
'backgroundColor' => (!empty($styles['body']['backgroundColor'])) ?
$styles['body']['backgroundColor'] :
'transparent'
)
),
'blocks' => array(
array(
'type' => 'container',
'orientation' => 'vertical',
'styles' => array(
),
'blocks' => array(
array(
'type' => 'image',
'link' => 'http://www.example.com',
'src' => Env::$assets_url . '/img/logo.png',
'fullWidth' => false,
'alt' => 'logo',
'width' => '108px',
'height' => '65px',
'styles' => array(
'block' => array(
'textAlign' => 'center'
)
)
)
)
)
)
);
return $content;
}
How can I remove the logo? 如何删除徽标? I tried setting
$content['blocks']
to null but that didn't work. 我尝试将
$content['blocks']
为null,但这没有用。
You could remove this line 您可以删除此行
'src' => Env::$assets_url . '/img/logo.png',
from your code. 从您的代码。
you can use css to hide this image 您可以使用CSS隐藏此图片
img[alt='logo']{
display: none;
}
you can capture it by alt attribute 您可以通过alt属性捕获它
array(
'type' => 'image',
'link' => 'http://www.example.com',
'src' => Env::$assets_url . '/img/logo.png',
'fullWidth' => false,
'alt' => 'logo',
'width' => '108px',
'height' => '65px',
'styles' => array(
'block' => array(
'textAlign' => 'center',
'display' => 'none' // add this string
)
)
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.