Skip to content

Commit d922143

Browse files
ADDED: new sponsor
1 parent 2121f65 commit d922143

File tree

9 files changed

+157
-2
lines changed

9 files changed

+157
-2
lines changed

public/svg/edb_logo_dark.svg

Lines changed: 3 additions & 0 deletions
Loading

public/svg/edb_logo_light.svg

Lines changed: 3 additions & 0 deletions
Loading

public/svg/edb_logo_small.svg

Lines changed: 18 additions & 0 deletions
Loading

src/components/LandingPage/LandingPage.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const runtimes: string[] = [
2424
"Browser",
2525
];
2626
const databases: string[] = [
27+
"EdgeDB",
2728
"PlanetScale",
2829
"Neon",
2930
"Vercel Postgres",

src/components/LandingPage/SponsorsLine/SponsorsLine.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@
358358
height: 66px;
359359
}
360360

361+
#git-link {
362+
height: fit-content;
363+
}
364+
361365
.card_image img {
362366
width: 100%;
363367
height: 100%;

src/components/LandingPage/Supporting/Databases.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ const Databases: {
136136
},
137137
sponsorUrl: "https://driz.link/tembo",
138138
},
139+
EdgeDB: {
140+
imageSrc: {
141+
lightThemeSrc: "/public/svg/edb_logo_small.svg",
142+
darkThemeSrc: "/public/svg/edb_logo_small.svg",
143+
},
144+
lightStyle: {
145+
width: 26,
146+
},
147+
darkStyle: {
148+
width: 26,
149+
},
150+
sponsorUrl: "https://driz.link/edgedb",
151+
},
139152
};
140153

141154
export default Databases;

src/components/layout/AsideSponsors.astro

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,61 @@ const getStyleString = (style: CSSProperties) => {
88
}, "");
99
};
1010
11+
const heroSponsors = s.filter(({tier}) => tier.name === '$2500 a month');
12+
13+
const goldSponsors = s.filter(({tier}) => tier.name === '$1000 a month');
14+
1115
const slicedSponsors = [];
1216
13-
for (let i = 0; i < s.length - 1; i += 2) {
14-
let items = s.slice(i, i + 2);
17+
for (let i = 0; i < goldSponsors.length - 1; i += 2) {
18+
let items = goldSponsors.slice(i, i + 2);
1519
slicedSponsors.push(items);
1620
}
1721
---
1822

1923
<div class="aside-sponsors__wrap">
24+
{
25+
heroSponsors.map((sponsor) => (
26+
<div class="aside-sponsors__row">
27+
<a
28+
class:list={["aside-sponsors__sponsor", "aside-sponsors__hero-sponsor" ]}
29+
href={`https://${sponsor.sponsorEntity.login}`}
30+
target="_blank"
31+
rel={sponsor.followLink ? "" : "nofollow"}
32+
>
33+
<div
34+
class="aside-sponsors__sponsor-image"
35+
id="aside-sponsors-img-wrapper"
36+
>
37+
<img
38+
class="aside-sponsors__light-img"
39+
loading="lazy"
40+
src={
41+
"data:image/svg+xml;base64," +
42+
btoa(sponsor.sponsorEntity.avatarUrl)
43+
}
44+
style={getStyleString(sponsor.lightStyle || {})}
45+
/>
46+
<img
47+
class="aside-sponsors__dark-img"
48+
loading="lazy"
49+
src={
50+
"data:image/svg+xml;base64," +
51+
btoa(sponsor.sponsorEntity.avatarUrl)
52+
}
53+
alt={sponsor.sponsorEntity.name || sponsor.sponsorEntity.login}
54+
style={getStyleString(sponsor.darkStyle || {})}
55+
/>
56+
</div>
57+
{!!sponsor.popover && (
58+
<div class="popover">
59+
{sponsor.popover}
60+
</div>
61+
)}
62+
</a>
63+
</div>
64+
))
65+
}
2066
{
2167
slicedSponsors.map((slice) => (
2268
<div class="aside-sponsors__row">
@@ -336,6 +382,15 @@ for (let i = 0; i < s.length - 1; i += 2) {
336382
filter: none !important;
337383
}
338384

385+
.aside-sponsors__hero-sponsor .aside-sponsors__sponsor-image {
386+
transition: filter 0.2s;
387+
display: flex;
388+
align-items: center;
389+
justify-content: center;
390+
height: unset;
391+
width: unset;
392+
}
393+
339394
.aside-sponsors__sponsor-image {
340395
transition: filter 0.2s;
341396
display: flex;

src/data/asideS.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,36 @@ export const sponsorsData: ISponsor[] = [
211211
'url("/images/tembo.png") 0% 0% / contain no-repeat content-box',
212212
},
213213
},
214+
{
215+
tier: {
216+
name: "$2500 a month",
217+
isOneTime: false,
218+
},
219+
sponsorEntity: {
220+
__typename: "Organization",
221+
login: "driz.link/edgedb",
222+
name: "EdgeDB",
223+
avatarUrl:
224+
'<svg width="1200" height="1200" viewBox="0 0 1200 1200" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>',
225+
},
226+
createdAt: "2024-06-07T13:32:16Z",
227+
isActive: true,
228+
imageType: ImageType.SVG,
229+
darkStyle: {
230+
width: "72px",
231+
filter: "grayscale(1) brightness(2) opacity(0.3)",
232+
background:
233+
'url("/svg/edb_logo_light.svg") 0% 0% / contain no-repeat content-box',
234+
"background-position": "center",
235+
},
236+
lightStyle: {
237+
width: "72px",
238+
filter: "grayscale(1) opacity(0.6)",
239+
background:
240+
'url("/svg/edb_logo_dark.svg") 0% 0% / contain no-repeat content-box',
241+
"background-position": "center",
242+
},
243+
},
214244
{
215245
tier: {
216246
name: "$1000 a month",

src/data/s.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,34 @@ export const sponsorsData: ISponsor[] = [
278278
padding: "11px",
279279
},
280280
},
281+
{
282+
tier: {
283+
name: "$2500 a month",
284+
isOneTime: false,
285+
},
286+
sponsorEntity: {
287+
__typename: "Organization",
288+
login: "driz.link/edgedb",
289+
name: "EdgeDB",
290+
avatarUrl:
291+
'<svg width="1200" height="1200" viewBox="0 0 1200 1200" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>',
292+
},
293+
createdAt: "2024-06-07T13:32:16Z",
294+
isActive: true,
295+
imageType: ImageType.SVG,
296+
darkStyle: {
297+
padding: "6px",
298+
background:
299+
'url("/svg/edb_logo_light.svg") 0% 0% / contain no-repeat content-box',
300+
"background-position": "center",
301+
},
302+
lightStyle: {
303+
padding: "6px",
304+
background:
305+
'url("/svg/edb_logo_dark.svg") 0% 0% / contain no-repeat content-box',
306+
"background-position": "center",
307+
},
308+
},
281309
{
282310
tier: {
283311
name: "$250 a month",

0 commit comments

Comments
 (0)