chg: [helpers:bootstrap] Slight improvements
parent
aa66b4fbf5
commit
51dd0434cd
|
@ -110,6 +110,11 @@ class BootstrapHelper extends Helper
|
|||
$bsProgressTimeline = new BoostrapProgressTimeline($options, $this);
|
||||
return $bsProgressTimeline->progressTimeline();
|
||||
}
|
||||
|
||||
public function genNode($node, $params=[], $content='')
|
||||
{
|
||||
return BootstrapGeneric::genNode($node, $params, $content);
|
||||
}
|
||||
}
|
||||
|
||||
class BootstrapGeneric
|
||||
|
@ -142,7 +147,7 @@ class BootstrapGeneric
|
|||
}
|
||||
}
|
||||
|
||||
protected static function genNode($node, $params=[], $content="")
|
||||
public static function genNode($node, $params=[], $content="")
|
||||
{
|
||||
return sprintf('<%s %s>%s</%s>', $node, BootstrapGeneric::genHTMLParams($params), $content, $node);
|
||||
}
|
||||
|
@ -238,7 +243,6 @@ class BootstrapTabs extends BootstrapGeneric
|
|||
$this->bsClasses = [
|
||||
'nav' => [],
|
||||
'nav-item' => $this->options['nav-item-class'],
|
||||
|
||||
];
|
||||
|
||||
if (!empty($this->options['justify'])) {
|
||||
|
@ -286,7 +290,9 @@ class BootstrapTabs extends BootstrapGeneric
|
|||
}
|
||||
$this->data['navs'][$activeTab]['active'] = true;
|
||||
|
||||
if (!empty($this->options['vertical-size']) && $this->options['vertical-size'] != 'auto') {
|
||||
$this->options['vertical-size'] = $this->options['vertical-size'] < 0 || $this->options['vertical-size'] > 11 ? 3 : $this->options['vertical-size'];
|
||||
}
|
||||
|
||||
$this->options['header-text-variant'] = $this->options['header-variant'] == 'light' ? 'body' : 'white';
|
||||
$this->options['header-border-variant'] = $this->options['header-variant'] == 'light' ? '' : $this->options['header-variant'];
|
||||
|
@ -333,11 +339,37 @@ class BootstrapTabs extends BootstrapGeneric
|
|||
|
||||
private function genVerticalTabs()
|
||||
{
|
||||
$html = $this->openNode('div', ['class' => array_merge(['row', ($this->options['card'] ? 'card flex-row' : '')], ["border-{$this->options['header-border-variant']}"])]);
|
||||
$html .= $this->openNode('div', ['class' => array_merge(['col-' . $this->options['vertical-size'], ($this->options['card'] ? 'card-header border-right' : '')], ["bg-{$this->options['header-variant']}", "text-{$this->options['header-text-variant']}", "border-{$this->options['header-border-variant']}"])]);
|
||||
$html = $this->openNode('div', ['class' => array_merge(
|
||||
[
|
||||
'row',
|
||||
($this->options['card'] ? 'card flex-row' : ''),
|
||||
($this->options['vertical-size'] == 'auto' ? 'flex-nowrap' : '')
|
||||
],
|
||||
[
|
||||
"border-{$this->options['header-border-variant']}"
|
||||
]
|
||||
)]);
|
||||
$html .= $this->openNode('div', ['class' => array_merge(
|
||||
[
|
||||
($this->options['vertical-size'] != 'auto' ? 'col-' . $this->options['vertical-size'] : ''),
|
||||
($this->options['card'] ? 'card-header border-right' : '')
|
||||
],
|
||||
[
|
||||
"bg-{$this->options['header-variant']}",
|
||||
"text-{$this->options['header-text-variant']}",
|
||||
"border-{$this->options['header-border-variant']}"
|
||||
])]);
|
||||
$html .= $this->genNav();
|
||||
$html .= $this->closeNode('div');
|
||||
$html .= $this->openNode('div', ['class' => array_merge(['col-' . (12 - $this->options['vertical-size']), ($this->options['card'] ? 'card-body2' : '')], ["bg-{$this->options['body-variant']}", "text-{$this->options['body-text-variant']}"])]);
|
||||
$html .= $this->openNode('div', ['class' => array_merge(
|
||||
[
|
||||
($this->options['vertical-size'] != 'auto' ? 'col-' . (12 - $this->options['vertical-size']) : ''),
|
||||
($this->options['card'] ? 'card-body2' : '')
|
||||
],
|
||||
[
|
||||
"bg-{$this->options['body-variant']}",
|
||||
"text-{$this->options['body-text-variant']}"
|
||||
])]);
|
||||
$html .= $this->genContent();
|
||||
$html .= $this->closeNode('div');
|
||||
$html .= $this->closeNode('div');
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
max-width: 25% !important;
|
||||
}
|
||||
.mh-75 {
|
||||
max-width: 75% !important;
|
||||
max-height: 75% !important;
|
||||
}
|
||||
.mh-50 {
|
||||
max-width: 50% !important;
|
||||
max-height: 50% !important;
|
||||
}
|
||||
.mh-25 {
|
||||
max-width: 25% !important;
|
||||
max-height: 25% !important;
|
||||
}
|
||||
|
||||
/* Toast */
|
||||
|
@ -108,3 +108,32 @@ div.progress-timeline .progress-line {
|
|||
div.progress-timeline .progress-line.progress-inactive {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.bd-callout {
|
||||
border: 1px solid #eee;
|
||||
border-left-color: rgb(238, 238, 238);
|
||||
border-left-width: 1px;
|
||||
border-left-width: .25rem;
|
||||
border-radius: .25rem;
|
||||
}
|
||||
.bd-callout-primary {
|
||||
border-left-color: var(--primary);
|
||||
}
|
||||
.bd-callout-info {
|
||||
border-left-color: var(--info);
|
||||
}
|
||||
.bd-callout-success {
|
||||
border-left-color: var(--success);
|
||||
}
|
||||
.bd-callout-warning {
|
||||
border-left-color: var(--warning);
|
||||
}
|
||||
.bd-callout-danger {
|
||||
border-left-color: var(--danger);
|
||||
}
|
||||
.bd-callout-dark {
|
||||
border-left-color: var(--dark);
|
||||
}
|
||||
.bd-callout-light {
|
||||
border-left-color: var(--light);
|
||||
}
|
Loading…
Reference in New Issue