Skip to content

Commit 4fbad91

Browse files
author
Andres Vargas
committed
adding styles
1 parent 0907bcf commit 4fbad91

File tree

6 files changed

+6812
-1
lines changed

6 files changed

+6812
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<style>
2+
[wire:loading] {
3+
display: none;
4+
}
5+
[wire:offline] {
6+
display: none;
7+
}
8+
[wire:dirty]:not(textarea):not(input):not(select) {
9+
display: none;
10+
}
11+
</style>

livewire/templates/livewire_scripts.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
{% endcomment %}
88
window.livewire_token = '{{ csrf_token }}';
99

10+
/* Make Alpine wait until Livewire is finished rendering to do its thing. */
11+
window.deferLoadingAlpine = function (callback) {
12+
window.addEventListener('livewire:load', function () {
13+
callback();
14+
});
15+
};
16+
17+
1018
document.addEventListener("DOMContentLoaded", function() {
1119
window.livewire.start();
1220
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<style>
2+
[wire:loading] {
3+
display: none;
4+
}
5+
[wire:offline] {
6+
display: none;
7+
}
8+
[wire:dirty]:not(textarea):not(input):not(select) {
9+
display: none;
10+
}
11+
</style>

livewire/templatetags/livewire_tags.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
register = template.Library()
66

7+
@register.inclusion_tag("livewire_styles.html", takes_context=True)
8+
def livewire_styles(context):
9+
return context
10+
711

812
@register.inclusion_tag("livewire_scripts.html", takes_context=True)
913
def livewire_scripts(context):

0 commit comments

Comments
 (0)