Skip to content

Instantly share code, notes, and snippets.

@librasteve
Created December 17, 2024 12:02
Show Gist options
  • Save librasteve/e4289f5196892de5c4fe47af59e61116 to your computer and use it in GitHub Desktop.
Save librasteve/e4289f5196892de5c4fe47af59e61116 to your computer and use it in GitHub Desktop.
htmxas2.md
use Cromponent;
use Cromponent::MyLib;

my $cromponent = Cromponent.new;
my ($index, $topic);

{  #block to avoid namespace collision

    use HTML::Functional;

    $index =
        div [
            h3 [
                'Search Elves',
                span :class<htmx-indicator>, [ img :src</img/bars.svg>; '  Searching...' ]
            ];

            input :class<form-control>, :type<search>, :name<search>,
                :placeholder<Begin typing to search elvesis>,
                :hx-post</happy_tm_xmas/search>,
                :hx-trigger<keyup changed delay:500ms, search>,
                :hx-target<#search-results>,
                :hx-indicator<.htmx-indicator>;

            activetable :thead<Given Elven Elfmail>, :$topic;
        ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment