Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/sponsors.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ As well as our financial sponsors and donors, the Foundation is supported by man

{{% in-kind-grid %}}

{{< in-kind-sponsor name="Aikido" url="https://www.aikido.dev/" image="aikido.svg" description="CPAN security supported by Aikido." >}}

{{< in-kind-sponsor name="Anonymous" description="Gift of circa 100 books to generate donations at FOSDEM." >}}

{{< in-kind-sponsor name="Fastmail" url="https://www.fastmail.com/" image="FM-Logo-RGB.png" description="Providing email hosting services to the foundation at no cost." >}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/in-kind-sponsor.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{{ if .Get "image" }}<div class="sponsor-logo-container"{{ with .Get "bgcolor" }} style="background-color: {{ . }};"{{ end }}>{{ if .Get "url" }}<a href="{{ .Get "url" }}" target="_blank" rel="noopener noreferrer"><img class="nozoom" src="images/{{ .Get "image" }}" alt="{{ .Get "name" }}" title="{{ .Get "name" }}" loading="lazy" decoding="async"></a>{{ else }}<img class="nozoom" src="images/{{ .Get "image" }}" alt="{{ .Get "name" }}" title="{{ .Get "name" }}" loading="lazy" decoding="async">{{ end }}</div>{{ end }}
<div class="sponsor-info">
{{ if not (.Get "image") }}<h4>{{ if .Get "url" }}<a href="{{ .Get "url" }}" target="_blank" rel="noopener noreferrer">{{ .Get "name" }}</a>{{ else }}{{ .Get "name" }}{{ end }}</h4>{{ end }}
<p class="sponsor-description">{{ if .Get "image" }}<strong>{{ .Get "name" }}:</strong> {{ end }}{{ .Get "description" }}</p>
<p class="sponsor-description">{{ if .Get "image" }}<strong>{{ if .Get "url" }}<a href="{{ .Get "url" }}" target="_blank" rel="noopener noreferrer">{{ .Get "name" }}</a>{{ else }}{{ .Get "name" }}{{ end }}:</strong> {{ end }}{{ .Get "description" }}</p>
</div>
</div>
10 changes: 10 additions & 0 deletions static/images/aikido.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions tests/e2e/sponsors.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { test, expect } = require('@playwright/test');

test.describe('Sponsors page', () => {
test('Aikido in-kind card links its logo and name to aikido.dev', async ({ page }) => {
await page.goto('/our-sponsors.html');
const card = page.locator('.in-kind-sponsor').filter({ has: page.getByRole('img', { name: 'Aikido' }) });
const logo = card.locator('img');

await expect(logo).toHaveAttribute('alt', 'Aikido');
await expect(card.locator('.sponsor-logo-container a')).toHaveAttribute('href', 'https://www.aikido.dev/');
const nameLink = card.locator('.sponsor-description a');
await expect(nameLink).toHaveAttribute('href', 'https://www.aikido.dev/');
await expect(nameLink).toHaveText('Aikido');
// The logo is loading="lazy": it only fetches once scrolled near the viewport.
await logo.scrollIntoViewIfNeeded();
await expect.poll(() => logo.evaluate((img) => img.naturalWidth)).toBeGreaterThan(0);
});
});
Loading