Skip to content

Commit 0700e3f

Browse files
Merge pull request #568 from aquaductape/aside-sponsers-replace-png-conic-gradient-with-css
Update border highlight animation with css conic-gradient
2 parents 890799f + 977d9df commit 0700e3f

File tree

5 files changed

+26
-46
lines changed

5 files changed

+26
-46
lines changed

src/assets/images/dark-gradient.png

-7.34 KB
Binary file not shown.

src/assets/images/light-gradient.png

-9.55 KB
Binary file not shown.

src/ui/components/AsideSponsors.astro

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const goldSponsors = asideSponsors.filter(
2525
{heroSponsors.map((sponsor) => (
2626
<a
2727
class:list={[
28-
"aside-sponsors__sponsor",
28+
"aside-sponsors__sponsor border-highlight",
2929
"aside-sponsors__hero-sponsor",
3030
]}
3131
href={`https://${sponsor.sponsorEntity.login}`}
@@ -66,7 +66,7 @@ const goldSponsors = asideSponsors.filter(
6666
{goldSponsors.map((sponsor) => (
6767
<a
6868
class:list={[
69-
"aside-sponsors__sponsor",
69+
"aside-sponsors__sponsor border-highlight",
7070
["Sponsor"].includes(sponsor.sponsorEntity.name)
7171
? "aside-sponsors__sponsor--hide"
7272
: "",
@@ -224,27 +224,6 @@ const goldSponsors = asideSponsors.filter(
224224
height: 74px;
225225
}
226226

227-
html.dark .aside-sponsors__sponsor::before {
228-
background-image: url("../../assets/images/dark-gradient.png");
229-
}
230-
231-
.aside-sponsors__sponsor::before {
232-
content: "";
233-
position: absolute;
234-
top: 50%;
235-
left: 50%;
236-
width: 240px;
237-
height: 240px;
238-
background-image: url("../../assets/images/light-gradient.png");
239-
background-size: 240px 240px;
240-
background-position: center center;
241-
transform: rotate(45deg) scale(1.45);
242-
animation: spin 10s linear infinite;
243-
z-index: -1;
244-
opacity: 0;
245-
transition: opacity 0.2s;
246-
}
247-
248227
.aside-sponsors__sponsor:hover::before {
249228
opacity: 1;
250229
}

src/ui/components/GlobalStyles.astro

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,4 +1390,27 @@
13901390
height: 16px;
13911391
pointer-events: none;
13921392
}
1393+
1394+
html.dark .border-highlight::before {
1395+
--gradient-0: #EE9A01;
1396+
--gradient-1: #2E1A00;
1397+
}
1398+
.border-highlight::before {
1399+
content: "";
1400+
position: absolute;
1401+
top: 50%;
1402+
left: 50%;
1403+
width: 240px;
1404+
height: 240px;
1405+
--gradient-0: #F5A015;
1406+
--gradient-1: #FDE1B5;
1407+
background-image: conic-gradient(from 0deg at 50% 50%, var(--gradient-0) 0deg, var(--gradient-1) 45deg, var(--gradient-1) 135deg, var(--gradient-0) 180deg, var(--gradient-1) 225deg, var(--gradient-1) 315deg, var(--gradient-0) 360deg);
1408+
background-size: 240px 240px;
1409+
background-position: center center;
1410+
transform: translate(-50%, -50%) rotate(45deg) scale(1.45);
1411+
animation: spin 10s linear infinite;
1412+
z-index: -1;
1413+
opacity: 0;
1414+
transition: opacity 0.2s;
1415+
}
13931416
</style>

src/ui/components/Toasts.astro

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const toasts = [
2626
data-toast={index}
2727
data-toast-name={toast.title}
2828
style={`transform: translateY(${(toasts.length - index - 1) * 100}%) scale(${1 - (toasts.length - index - 1) * 0.06});`}
29-
class="toast"
29+
class="toast border-highlight"
3030
>
3131
<div class="toast-content">
3232
<div class="toast-icon">
@@ -104,28 +104,6 @@ const toasts = [
104104
overflow: hidden;
105105
}
106106

107-
html.dark .toast::before {
108-
background-image: url("../../assets/images/dark-gradient.png");
109-
}
110-
111-
.toast::before {
112-
content: "";
113-
position: absolute;
114-
top: 50%;
115-
left: 50%;
116-
transform: translate(-50%, -50%);
117-
width: 240px;
118-
height: 240px;
119-
background-image: url("../../assets/images/light-gradient.png");
120-
background-size: 240px 240px;
121-
background-position: center center;
122-
transform: rotate(45deg) scale(1.45);
123-
animation: spin 10s linear infinite;
124-
z-index: -1;
125-
opacity: 0;
126-
transition: opacity 0.2s;
127-
}
128-
129107
.toast-text {
130108
display: flex;
131109
flex-direction: column;

0 commit comments

Comments
 (0)