Added new frontend.

This commit is contained in:
didier committed 2024-11-04 18:50:34 -05:00
1 parent 8005b38b67
commit 9ada7cc1a8
30 files changed
+6620 -1

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
htmx.defineExtension('alpine-morph', {
isInlineSwap: function (swapStyle) {
return swapStyle === 'morph';
},
handleSwap: function (swapStyle, target, fragment) {
if (swapStyle === 'morph') {
if (fragment.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
Alpine.morph(target, fragment.firstElementChild);
return [target];
} else {
Alpine.morph(target, fragment.outerHTML);
return [target];
}
}
}
});