Skip to content

Commit bd5790d

Browse files
committed
📘 doc(landing): using css selector for sponsor element
1 parent 3b5e5d7 commit bd5790d

File tree

2 files changed

+32
-20
lines changed

2 files changed

+32
-20
lines changed

components/fern/beyond.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
:style="{ left: `${left}%` }"
99
>
1010
<p
11-
class="absolute pl-2 text-xs font-semibold font-mono text-sky-500"
12-
style="top: 3.625rem"
11+
class="absolute top-14 pl-2 text-sm font-semibold font-mono text-sky-500"
1312
:style="{ left: left > 80 ? '-4rem' : '0' }"
1413
>
1514
{{ (left / 4).toFixed(2) }}ms

components/fern/sponsor.vue

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@
55
>
66
Made possible by you
77
</h2>
8-
<p class="text-lg md:text-xl !leading-[2rem] sm:text-center w-full max-w-2xl mx-auto dark:text-gray-400 dark:font-medium">
8+
<p
9+
class="text-lg md:text-xl !leading-[2rem] sm:text-center w-full max-w-2xl mx-auto dark:text-gray-400 dark:font-medium"
10+
>
911
Elysia is
1012
<span class="text-gray-700 dark:text-gray-200 font-medium"
1113
>not own by an organization</span
1214
>
1315
but is driven by the community.
14-
<br>
16+
<br />
1517
Elysia development is only possible thanks to your support
1618
</p>
1719
<div class="flex sm:justify-center my-8">
1820
<a
19-
id="become-sponsor"
21+
id="become-sponsor"
2022
class="inline-flex items-center text-white font-semibold bg-gradient-to-br from-rose-400 to-pink-400 rounded-full px-6 py-3 box-shadow shadow-pink-400/40 shadow-lg transition-transform transform hover:scale-110 focus;scale-110"
2123
href="https://github.com/sponsors/saltyaom"
2224
target="_blank"
@@ -41,39 +43,34 @@
4143
</svg>
4244
</a>
4345
</div>
44-
<p class="sm:text-center text-gradient from-pink-400 to-fuchsia-400 font-semibold text-base">Thanks you for making Elysia possible</p>
46+
<p
47+
class="sm:text-center text-gradient from-pink-400 to-fuchsia-400 font-semibold text-base"
48+
>
49+
Thanks you for making Elysia possible
50+
</p>
4551
<ul id="sponsors-fern" v-if="sponsors.length > 0" class="my-4">
4652
<li v-for="sponsor in sponsors" :key="sponsor.sponsorEntity.login">
4753
<a
4854
:href="`https://github.com/${sponsor.sponsorEntity.login}`"
4955
target="_blank"
50-
class="flex flex-col justify-center items-center text-center hover:bg-pink-100 focus:bg-pink-100 dark:hover:bg-pink-500/30 dark:focus:bg-pink-500/30 px-0.5 py-4 rounded-xl transition-colors text-gray-500 hover:text-pink-500 dark:text-gray-400 dark:hover:text-pink-400"
56+
class="sponsor"
5157
>
52-
<div
53-
class="w-16 h-16 bg-gray-100 overflow-hidden rounded-full mb-3"
54-
>
58+
<div>
5559
<img
5660
v-if="sponsor.sponsorEntity.avatarUrl"
5761
:src="sponsor.sponsorEntity.avatarUrl"
5862
alt="Sponsor avatar"
59-
class="w-16 h-16 rounded-full object-cover object-center"
6063
loading="lazy"
6164
/>
6265
</div>
63-
<p className="text-xs sponsor-name">
66+
<p>
6467
{{
6568
sponsor.sponsorEntity.name ??
6669
sponsor.sponsorEntity.login ??
6770
'[Private]'
6871
}}
6972
</p>
70-
<!-- <p
71-
v-if="sponsor.tier.monthlyPriceInDollars"
72-
class="text-3xl text-gray-400 bg-clip-text text-transparent bg-gradient-to-tl font-medium from-fuchsia-500 to-blue-500 mt-3 mb-1"
73-
>
74-
${{ sponsor.tier.monthlyPriceInDollars }}
75-
</p> -->
76-
<p className="text-xs my-0">
73+
<p>
7774
{{
7875
dayjs()
7976
.from(dayjs(sponsor.createdAt))
@@ -130,10 +127,26 @@ const sponsors: Sponsor[] = data
130127
<style>
131128
#sponsors-fern {
132129
@apply grid gap-0.5 grid-cols-3;
130+
131+
& > li > .sponsor {
132+
@apply flex flex-col justify-center items-center text-xs text-center hover:bg-pink-500/10 focus:bg-pink-500/10 dark:hover:bg-pink-500/25 dark:focus:bg-pink-500/25 px-0.5 py-4 rounded-xl transition-colors text-gray-500 hover:text-pink-500 dark:text-gray-400 dark:hover:text-pink-400;
133+
134+
& > div {
135+
@apply w-16 h-16 bg-gray-100 overflow-hidden rounded-full mb-3;
136+
137+
& > img {
138+
@apply w-16 h-16 rounded-full object-cover object-center;
139+
}
140+
141+
& > p {
142+
@apply my-0;
143+
}
144+
}
145+
}
133146
}
134147
135148
#become-sponsor {
136-
transition: transform .35s cubic-bezier(0.68, -0.6, 0.32, 1.6);
149+
transition: transform 0.35s cubic-bezier(0.68, -0.6, 0.32, 1.6);
137150
}
138151
139152
@screen sm {

0 commit comments

Comments
 (0)