Skip to content
Open
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
13 changes: 13 additions & 0 deletions apps/ui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"addon": "Add-on"
},
"comparisonTable": {
"feature": "Feature",
"included": "Included",
"notIncluded": "Not included"
},
Expand Down Expand Up @@ -90,6 +91,13 @@
"sections": {
"faq": {
"title": "Frequently Asked Questions"
},
"meetTheTeam": {
"allTeams": "All teams",
"filterByTeam": "Filter by team"
},
"testimonies": {
"watchVideo": "Watch video"
}
},
"caseStudies": {
Expand Down Expand Up @@ -250,6 +258,11 @@
"disclaimerTitle": "Disclaimer",
"disclaimer": "The data on this page is regularly updated, however don't hesitate to [contact us](mailto:marketing@strapi.io) if you notice a mistake."
},
"media": {
"embed": {
"fallbackTitle": "Interactive demo"
}
},
"newsletter": {
"title": "Join our Newsletter",
"description": "Get all the latest news and events.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Data } from "@repo/strapi-types"
import { useTranslations } from "next-intl"

import { Container } from "@/components/elementary/Container"

Expand All @@ -7,6 +8,8 @@ export function StrapiEmbed({
}: {
readonly component: Data.Component<"media.embed">
}) {
const t = useTranslations("media.embed")

if (!component.url) {
return null
}
Expand All @@ -26,7 +29,7 @@ export function StrapiEmbed({
>
<iframe
src={component.url}
title={component.title || undefined}
title={component.title?.trim() || t("fallbackTitle")}
className="absolute inset-0 size-full overflow-hidden border-0"
allow="clipboard-read; clipboard-write"
allowFullScreen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ export function StrapiPlanComparisonTable({
<table className="w-full table-fixed border-collapse">
<thead>
<tr>
<th className="w-64 px-4 py-2 text-left" />
<th className="w-64 px-4 py-2 text-left">
<span className="sr-only">
{t("plans.comparisonTable.feature")}
</span>
</th>
{plans.map((plan) => (
<th
key={plan.id}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client"

import type { Data } from "@repo/strapi-types"
import { useTranslations } from "next-intl"
import { useMemo, useState } from "react"

import { Container } from "@/components/elementary/Container"
Expand Down Expand Up @@ -35,6 +36,7 @@ export function StrapiMeetTheTeam({
}: {
readonly component: Data.Component<"sections.meet-the-team">
}) {
const t = useTranslations("sections.meetTheTeam")
const [selectedDepartment, setSelectedDepartment] = useState(ALL_TEAMS)
const [selectedMember, setSelectedMember] =
useState<Data.Component<"elements.team-member-item"> | null>(null)
Expand Down Expand Up @@ -83,11 +85,14 @@ export function StrapiMeetTheTeam({
value={selectedDepartment}
onValueChange={setSelectedDepartment}
>
<SelectTrigger className="w-auto min-w-40">
<SelectValue placeholder="All teams" />
<SelectTrigger
className="w-auto min-w-40"
aria-label={t("filterByTeam")}
>
<SelectValue placeholder={t("allTeams")} />
</SelectTrigger>
<SelectContent>
<SelectItem value={ALL_TEAMS}>All teams</SelectItem>
<SelectItem value={ALL_TEAMS}>{t("allTeams")}</SelectItem>
{departments.map((dept) => (
<SelectItem key={dept} value={dept}>
{dept}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
import { PlayIcon } from "@phosphor-icons/react/ssr"
import type { Data } from "@repo/strapi-types"
import { useTranslations } from "next-intl"

import { StrapiBasicImage } from "@/components/page-builder/components/utilities/StrapiBasicImage"
import type { StrapiImageMedia } from "@/types/api"

function testimonyLinkLabel(
image: Data.Component<"utilities.basic-image"> | null | undefined,
fallback: string
) {
const media = (image?.media ?? null) as StrapiImageMedia | null
const label =
image?.alt?.trim() ||
media?.alternativeText?.trim() ||
media?.caption?.trim()

return label || fallback
}

export function TestimonyCard({
item,
}: {
readonly item: Data.Component<"elements.testimony-item">
}) {
const t = useTranslations("sections.testimonies")
const content = (
<div className="bg-strapi-neutral-200 relative aspect-video w-full overflow-hidden rounded-lg">
<StrapiBasicImage
Expand All @@ -29,6 +45,7 @@ export function TestimonyCard({
href={item.videoUrl}
target="_blank"
rel="noopener noreferrer"
aria-label={testimonyLinkLabel(item.image, t("watchVideo"))}
className="animate-spring-sm block no-underline hover:opacity-90"
>
{content}
Expand Down
Loading