Add string subtitle to panels

This commit is contained in:
Stephen Abello
2021-02-26 10:25:28 +01:00
parent 25c840e036
commit a505902ed5
3 changed files with 31 additions and 2 deletions

View File

@@ -98,8 +98,7 @@ $ibo-panel-colors: (
}
.ibo-panel--title-title-subtitle {
@extend %ibo-font-ral-nor-250;
color: $ibo-panel--subtitle--color;
@extend .ibo-panel--subtitle;
a.summary {
@extend %ibo-font-ral-nor-250;
@@ -109,6 +108,11 @@ $ibo-panel-colors: (
}
}
.ibo-panel--subtitle {
@extend %ibo-font-ral-nor-250;
color: $ibo-panel--subtitle--color;
}
.ibo-panel--body {
position: relative;
padding: $ibo-panel--body--padding-top $ibo-panel--body--padding-x $ibo-panel--body--padding-bottom $ibo-panel--body--padding-x;

View File

@@ -89,6 +89,8 @@ class Panel extends UIContentBlock
protected $sTitle;
/** @var string $sColor */
protected $sColor;
/** @var string $sSubTitle */
protected $sSubTitle;
/**
* Panel constructor.
@@ -148,6 +150,26 @@ class Panel extends UIContentBlock
return $this;
}
/**
* @return string
*/
public function GetSubTitle()
{
return $this->sSubTitle;
}
/**
* @param string $sSubTitle
*
* @return $this
*/
public function SetSubTitle(string $sSubTitle)
{
$this->sSubTitle = $sSubTitle;
return $this;
}
//----------------------
// Specific content area
//----------------------

View File

@@ -7,6 +7,9 @@
<div class="ibo-panel--header-left">
{% block iboPanelHeaderLeft %}
<div class="ibo-panel--title">{% block iboPanelTitle %}{{ oUIBlock.GetTitle()|raw }}{% endblock %}</div>
{% if oUIBlock.GetSubTitle() is not null %}
<div class="ibo-panel--subtitle">{% block iboPanelSubTitle %}{{ oUIBlock.GetSubTitle()|raw }}{% endblock %}</div>
{% endif %}
{% endblock %}
</div>
<div class="ibo-panel--header-right">