Skip to content

Commit 522d322

Browse files
committed
Added loading placeholer for theme updater
1 parent e81a394 commit 522d322

File tree

2 files changed

+118
-101
lines changed

2 files changed

+118
-101
lines changed

resources/views/studio/theme-updater.blade.php

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,6 @@
11
@if(auth()->user()->role == 'admin')
22
@if(env('ENABLE_THEME_UPDATER') == 'true')
3-
<style>
4-
details {
5-
width: 65%;
6-
margin-left: 15px;
73

8-
{
9-
{
10-
-- max-width: calc(100% - 20rem);
11-
--
12-
}
13-
}
14-
15-
position: relative;
16-
border: 1px solid #78909C;
17-
border-radius: 6px;
18-
background-color: #ECEFF1;
19-
color: #263238;
20-
transition: background-color .15s;
21-
22-
> :last-child {
23-
margin-bottom: 1rem;
24-
}
25-
26-
&::before {
27-
width: 100%;
28-
height: 100%;
29-
content: '';
30-
position: absolute;
31-
top: 0;
32-
left: 0;
33-
border-radius: inherit;
34-
opacity: .15;
35-
box-shadow: 0 .25em .5em #263238;
36-
pointer-events: none;
37-
transition: opacity .2s;
38-
z-index: -1;
39-
}
40-
41-
&[open] {
42-
background-color: #FFF;
43-
44-
&::before {
45-
opacity: .6;
46-
}
47-
}
48-
}
49-
50-
summary {
51-
padding: 0.375rem 0.75rem;
52-
width: 100%;
53-
display: block;
54-
position: relative;
55-
font-size: 1.33em;
56-
font-weight: bold;
57-
cursor: pointer;
58-
59-
&::before,
60-
&::after {
61-
width: .75em;
62-
height: 2px;
63-
position: absolute;
64-
top: 50%;
65-
right: 0;
66-
content: '';
67-
background-color: currentColor;
68-
text-align: right;
69-
transform: translateY(-50%);
70-
transition: transform .2s ease-in-out;
71-
}
72-
73-
&::after {
74-
transform: translateY(-50%) rotate(90deg);
75-
76-
[open] & {
77-
transform: translateY(-50%) rotate(180deg);
78-
}
79-
}
80-
81-
&::-webkit-details-marker {
82-
display: none;
83-
}
84-
}
85-
86-
table,
87-
th,
88-
td {
89-
border: 1px solid black;
90-
}
91-
92-
.updatespin {
93-
animation: upspin 1s linear infinite;
94-
display: inline-block;
95-
}
96-
97-
@keyframes upspin {
98-
100% {
99-
transform: rotate(360deg)
100-
}
101-
}
102-
103-
</style>
1044
<br><br><br>
1055
<details>
1066
<summary><i class="bi bi-caret-down-fill"></i> Theme updater </summary>

resources/views/studio/theme.blade.php

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,124 @@
8787

8888
@if(auth()->user()->role == 'admin')
8989
@if(env('ENABLE_THEME_UPDATER') == 'true')
90-
<div id="ajax-container" style="height: 123px;"></div>
90+
91+
<style>
92+
details {
93+
width: 65%;
94+
margin-left: 15px;
95+
96+
{
97+
{
98+
-- max-width: calc(100% - 20rem);
99+
--
100+
}
101+
}
102+
103+
position: relative;
104+
border: 1px solid #78909C;
105+
border-radius: 6px;
106+
background-color: #ECEFF1;
107+
color: #263238;
108+
transition: background-color .15s;
109+
110+
> :last-child {
111+
margin-bottom: 1rem;
112+
}
113+
114+
&::before {
115+
width: 100%;
116+
height: 100%;
117+
content: '';
118+
position: absolute;
119+
top: 0;
120+
left: 0;
121+
border-radius: inherit;
122+
opacity: .15;
123+
box-shadow: 0 .25em .5em #263238;
124+
pointer-events: none;
125+
transition: opacity .2s;
126+
z-index: -1;
127+
}
128+
129+
&[open] {
130+
background-color: #FFF;
131+
132+
&::before {
133+
opacity: .6;
134+
}
135+
}
136+
}
137+
138+
summary {
139+
padding: 0.375rem 0.75rem;
140+
width: 100%;
141+
display: block;
142+
position: relative;
143+
font-size: 1.33em;
144+
font-weight: bold;
145+
cursor: pointer;
146+
147+
&::before,
148+
&::after {
149+
width: .75em;
150+
height: 2px;
151+
position: absolute;
152+
top: 50%;
153+
right: 0;
154+
content: '';
155+
background-color: currentColor;
156+
text-align: right;
157+
transform: translateY(-50%);
158+
transition: transform .2s ease-in-out;
159+
}
160+
161+
&::after {
162+
transform: translateY(-50%) rotate(90deg);
163+
164+
[open] & {
165+
transform: translateY(-50%) rotate(180deg);
166+
}
167+
}
168+
169+
&::-webkit-details-marker {
170+
display: none;
171+
}
172+
}
173+
174+
table,
175+
th,
176+
td {
177+
border: 1px solid black;
178+
}
179+
180+
.updatespin {
181+
display: inline-flex;
182+
align-items: center;
183+
justify-content: center;
184+
animation: upspin 1s linear infinite;
185+
height: 20px;
186+
width: 20px;
187+
}
188+
189+
190+
191+
@keyframes upspin {
192+
100% {
193+
transform: rotate(360deg)
194+
}
195+
}
196+
197+
</style>
198+
199+
<div id="ajax-container">
200+
201+
<br><br><br>
202+
<details>
203+
<summary><span id="updateicon" class="updatespin"><i class="bi bi-nut-fill"></i></span> Theme updater </summary>
204+
</div>
205+
</details>
206+
207+
</div>
91208
<div id="my-lazy-element"></div>
92209
@endif
93210
@endif

0 commit comments

Comments
 (0)