forked from SymfonyCasts/symfony-ux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframebusy-conditional-loading.diff
34 lines (32 loc) · 1.08 KB
/
framebusy-conditional-loading.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/assets/styles/app.css b/assets/styles/app.css
index 4808859..bc83f84 100644
--- a/assets/styles/app.css
+++ b/assets/styles/app.css
@@ -16,7 +16,12 @@ body.turbo-loading {
opacity: .2;
}
*/
-
+turbo-frame[busy] .frame-loading-hide, turbo-frame .frame-loading-show {
+ display: none;
+}
+turbo-frame[busy] .frame-loading-show {
+ display: inline-block;
+}
a, a:hover {
color: #000;
}
diff --git a/templates/cart/_featuredSidebar.html.twig b/templates/cart/_featuredSidebar.html.twig
index 5bf1009..113df23 100644
--- a/templates/cart/_featuredSidebar.html.twig
+++ b/templates/cart/_featuredSidebar.html.twig
@@ -22,9 +22,11 @@
<a
data-turbo-frame="cart-sidebar"
+ class="frame-loading-hide"
href="{{ path('_app_cart_product_featured', {
description: true,
}) }}">(read more)</a>
+ <span class="frame-loading-show fas fa-spinner fa-spin"></span>
{% endif %}
{{ include('product/_cart_add_controls.html.twig') }}