Last active
December 27, 2023 08:10
-
-
Save RobinDev/ea24869b9a9e571bda95370330cda2ab to your computer and use it in GitHub Desktop.
Revisions
-
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public function display( string $tooltipextraClass = '', ?string $extraAttributes = '', ): void { ?> <button -
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,8 @@ public function display( string $tooltipextraClass = '', ?string $extraAttributes = '', ): void { ?> <button class="focus:outline-none inline-block <?= $extraClass ?>" -
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,8 @@ use League\Plates\Template\Template; use League\Plates\Template\TemplateClassInterface; use App\Plates\AbstractTemplate; use App\Plates\TemplateExtension; use function Symfony\Component\String\u; -
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public function display( ?string $extraAttributes = '', ): void { ?> <button class="focus:outline-none inline-block <?= $extraClass ?>" x-tooltip="{ @@ -36,6 +37,7 @@ class="focus:outline-none inline-block <?= $extraClass ?>" <span class="rounded-full border-gray-300 border text-gray-300 inline-block ml-2 hover:bg-white w-[22px] text-sm text-center">?</span> <?php } ?> </button> <?php } -
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public function display( ?string $extraAttributes = '', ): void { ?> <button class="focus:outline-none inline-block <?= $extraClass ?>" x-tooltip="{ content: '', -
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 15 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,21 +21,21 @@ public function display( ): void { ?> <button class="focus:outline-none inline-block <?= $extraClass ?>" x-tooltip="{ content: '', allowHTML: true, interactive: true, theme: 'light', appendTo: document.body }" x-tooltip.raw="<?= u('<span class="max-h-[50vh] overflow-y-auto block '.$tooltipextraClass.'">'.$tooltipText.'</span>')->replace('"', '"') ?>" <?= $extraAttributes ?>> <?= $text ?> <?php if ('' === $text) { ?> <span class="rounded-full border-gray-300 border text-gray-300 inline-block ml-2 hover:bg-white w-[22px] text-sm text-center">?</span> <?php } ?> </button> <?php } -
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,6 @@ public function display( ?string $extraAttributes = '', ): void { ?> <button class="focus:outline-none inline-block <?= $extraClass ?>" x-tooltip="{ -
RobinDev revised this gist
Dec 27, 2023 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,20 +7,20 @@ use PiedWeb\SeoStatus\Plates\AbstractTemplate; use PiedWeb\SeoStatus\Plates\TemplateExtension; use function Symfony\Component\String\u; class TooltipTpl extends AbstractTemplate implements TemplateClassInterface { public function display( Template $t, string|int|float $text = '', string $tooltipText = '', string $extraClass = 'text-sky-600 focus:text-gray-400', string $tooltipextraClass = '', ?string $extraAttributes = '', ): void { ?> <?php $extraClass = match ($extraClass) { 'dotted' => 'border-gray-400 border-b border-dotted', default => $extraClass } ?> <button class="focus:outline-none inline-block <?= $extraClass ?>" x-tooltip="{ @@ -30,7 +30,7 @@ class="focus:outline-none inline-block <?= $extraClass ?>" theme: 'light', appendTo: document.body }" x-tooltip.raw="<?= u('<span class="max-h-[50vh] overflow-y-auto block '.$tooltipextraClass.'">'.$tooltipText.'</span>')->replace('"', '"') ?>" <?= $extraAttributes ?>> <?= $text ?> <?php if ('' === $text) { ?> -
RobinDev created this gist
Dec 23, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ <?php namespace App\Template\Partial; // src/Template/Partial/TooltipTpl.php use League\Plates\Template\Template; use League\Plates\Template\TemplateClassInterface; use PiedWeb\SeoStatus\Plates\AbstractTemplate; use PiedWeb\SeoStatus\Plates\TemplateExtension; class TooltipTpl extends AbstractTemplate implements TemplateClassInterface { public function display( Template $t, TemplateExtension $ext, string|int|float $text = '', string $tooltipText = '', string $extraClass = 'text-sky-600 focus:text-gray-400', string $tooltipextraClass = '', ?string $extraAttributes = '', ): void { ?> <?php $tooltipContent = '<span class="max-h-[50vh] overflow-y-auto block '.$tooltipextraClass.'">'.$tooltipText.'</span>' ?> <?php $extraClass = match ($extraClass) { 'dotted' => 'border-gray-400 border-b border-dotted', default => $extraClass } ?> <button class="focus:outline-none inline-block <?= $extraClass ?>" x-tooltip="{ content: '', allowHTML: true, interactive: true, theme: 'light', appendTo: document.body }" x-tooltip.raw="<?= $ext->u($tooltipContent)->replace('"', '"') ?>" <?= $extraAttributes ?>> <?= $text ?> <?php if ('' === $text) { ?> <span class="rounded-full border-gray-300 border text-gray-300 inline-block ml-2 hover:bg-white w-[22px] text-sm text-center">?</span> <?php } ?> </button> <?php } /** * Autogenerated constructor. */ public function __construct(public string|int|float $text = '', public string $tooltipText = '', public string $extraClass = 'text-sky-600 focus:text-gray-400', public string $tooltipextraClass = '', public ?string $extraAttributes = '') { } }