diff --git a/nur_src/v/plugins/showmorePlugin.php b/nur_src/v/plugins/showmorePlugin.php index 483a011..62f1b41 100644 --- a/nur_src/v/plugins/showmorePlugin.php +++ b/nur_src/v/plugins/showmorePlugin.php @@ -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, + ], ]); }