showmore peut être configuré pour afficher

This commit is contained in:
Jephté Clain 2025-06-26 10:33:30 +04:00
parent d65d5fa0b7
commit bb4f202adc

View File

@ -49,6 +49,13 @@ class showmorePlugin extends BasePlugin {
protected ?string $onShow;
protected bool $initialShow = false;
function show(bool $show=true): self {
$this->initialShow = $show;
return $this;
}
function startc(): array {
return v::sdiv(["class" => $this->containerClass]);
}
@ -56,7 +63,10 @@ class showmorePlugin extends BasePlugin {
function invite($vs=null): array {
$vs ??= $this->inviteContent;
return v::a([
"class" => $this->inviteClass,
"class" => [
$this->inviteClass,
"hidden" => $this->initialShow,
],
"href" => "#",
$vs,
]);
@ -64,7 +74,10 @@ class showmorePlugin extends BasePlugin {
function startp(): array {
return v::sdiv([
"class" => [$this->panelClass, "hidden"],
"class" => [
$this->panelClass,
"hidden" => !$this->initialShow,
],
]);
}