progmaweb
The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.
Clonegit clone https://git.progmasoft.com/progmaweb
Give the sites a warm, editorial look and add news.progmasoft.com
- Commit
c99ecf77320dffa84e01f9553c48baaa9346bedc- Author
- Leitwolf11 ·
- Parents
44a130f5e4f9
Changes
apps/web/app/globals.css | 221 +++++++-- apps/web/app/layout.tsx | 10 + apps/web/app/news/[slug]/page.tsx | 137 ++++++ apps/web/app/news/layout.tsx | 12 + apps/web/app/news/news.css | 178 ++++++++ apps/web/app/news/page.tsx | 100 +++++ apps/web/app/page.tsx | 317 +++++++++---- apps/web/app/robots.ts | 3 +- apps/web/app/site.css | 645 +++++++++++++++++++++++---- apps/web/app/sitemap.ts | 16 + apps/web/components/SiteHeader.tsx | 2 +- apps/web/components/site/FeatureCarousel.tsx | 136 ++++++ apps/web/components/site/Flow.tsx | 202 +++++++++ apps/web/components/site/Reveal.tsx | 45 ++ apps/web/components/site/showcase.ts | 11 + apps/web/e2e/pages.ts | 2 + apps/web/lib/brand-colours.ts | 29 ++ apps/web/lib/home-messages.ts | 419 ++++++++++------- apps/web/lib/news.ts | 267 +++++++++++ apps/web/proxy.ts | 7 + apps/web/tests/localization.test.mjs | 7 +- apps/web/tests/news.test.mjs | 78 ++++ apps/web/tests/sites.test.mjs | 13 +- ops/nginx/progmaweb.conf | 46 ++ 24 files changed, 2513 insertions(+), 390 deletions(-) diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index d23ac67..1ee672a 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -2,29 +2,29 @@ /* SPDX-License-Identifier: AGPL-3.0-or-later */ :root { - --blue-700: #004e8c; - --blue-600: #0066b8; - --blue-500: #0078d4; - --blue-100: #dff0ff; + --blue-700: #13505f; + --blue-600: #1d6a80; + --blue-500: #2a7f96; + --blue-100: #dbe8e8; --violet-600: #6750a4; --green-600: #16825d; - --ink-950: #121417; - --ink-800: #2a2f35; - --ink-650: #4c545d; - --ink-500: #68717c; - --line: #d9dee4; - --line-strong: #b9c1ca; - --surface: #ffffff; - --surface-muted: #f5f7f9; - --surface-blue: #f1f8ff; - --header-surface: rgb(255 255 255 / 94%); - --hero-background: #fff; - --account-background: #f5f7f9; + --ink-950: #141413; + --ink-800: #2b2a27; + --ink-650: #5e5d59; + --ink-500: #6d6b64; + --line: #dcd8cc; + --line-strong: #c2bdb0; + --surface: #f0eee6; + --surface-muted: #e8e6dc; + --surface-blue: #e4e9e4; + --header-surface: rgb(240 238 230 / 86%); + --hero-background: #f0eee6; + --account-background: #e8e6dc; --danger: #b42318; - --shadow-sm: 0 2px 8px rgb(18 20 23 / 8%); - --shadow-md: 0 16px 44px rgb(18 20 23 / 12%); - --radius-sm: 4px; - --radius-md: 8px; + --shadow-sm: 0 2px 8px rgb(20 20 19 / 6%); + --shadow-md: 0 16px 44px rgb(20 20 19 / 10%); + --radius-sm: 8px; + --radius-md: 12px; --radius-lg: 16px; --shell: 1180px; color-scheme: light; @@ -33,24 +33,24 @@ /* Light is deliberately the product default. Dark mode is an explicit, persistent preference so operating-system changes do not surprise users. */ :root[data-theme="dark"] { - --blue-700: #86c8ff; - --blue-600: #5db5f7; - --blue-500: #369fe8; - --blue-100: #14314a; + --blue-700: #a5d4de; + --blue-600: #7fb8c4; + --blue-500: #5fa3b2; + --blue-100: #1d3338; --violet-600: #a88eff; --green-600: #5bd5aa; - --ink-950: #f4f6f8; - --ink-800: #dfe4e9; - --ink-650: #bac3cc; - --ink-500: #98a4af; - --line: #343c45; - --line-strong: #53606d; - --surface: #101317; - --surface-muted: #171c22; - --surface-blue: #10283a; - --header-surface: rgb(16 19 23 / 94%); - --hero-background: #101317; - --account-background: #131a22; + --ink-950: #f0eee6; + --ink-800: #dedbd2; + --ink-650: #b0aea5; + --ink-500: #8f8d86; + --line: #34332f; + --line-strong: #4a4843; + --surface: #1a1a18; + --surface-muted: #262624; + --surface-blue: #1f2a2b; + --header-surface: rgb(26 26 24 / 86%); + --hero-background: #1a1a18; + --account-background: #222220; --danger: #ff8f86; --shadow-sm: 0 2px 8px rgb(0 0 0 / 28%); --shadow-md: 0 16px 44px rgb(0 0 0 / 42%); @@ -1556,3 +1556,152 @@ a { .theme-switching *::after { transition: none !important; } + +/* The Progmasoft look (2026-11-27): warm paper, a serif for page titles, dark + buttons with rounded corners, a quiet header that stays at the top, and a + dark footer. These rules follow the older ones so that they win. */ + +h1 { + font-family: var(--font-serif), Georgia, "Times New Roman", serif; + font-weight: 500; + letter-spacing: -0.02em; + overflow-wrap: break-word; + hyphens: auto; +} + +.button { + border-color: var(--ink-950); + border-radius: 8px; + background: var(--ink-950); + color: var(--surface); + font-weight: 500; +} + +.button:hover { + border-color: var(--ink-950); + background: color-mix(in srgb, var(--ink-950) 82%, var(--surface)); + color: var(--surface); + box-shadow: none; +} + +.button-small { + color: var(--surface) !important; +} + +.button-secondary { + border-color: var(--line-strong); + background: transparent; + color: var(--ink-950); +} + +.button-secondary:hover { + border-color: var(--ink-950); + background: transparent; + color: var(--ink-950); +} + +input, +select, +textarea { + border-radius: 8px; +} + +.site-header { + position: sticky; + top: 0; + border-bottom: 1px solid transparent; + background: color-mix(in srgb, var(--surface) 86%, transparent); + transition: border-color 200ms ease; +} + +.site-header:hover, +.site-header:focus-within { + border-bottom-color: var(--line); +} + +.primary-nav > a { + color: var(--ink-950); + font-size: 15px; + font-weight: 400; +} + +.primary-nav > a:hover { + color: var(--ink-650); +} + +.site-header .button-small { + min-height: 38px; + border: 0; + border-radius: 8px; + padding-inline: 16px; + background: var(--ink-950); + color: var(--surface); + font-weight: 500; + box-shadow: none; +} + +.site-header .button-small:hover { + background: color-mix(in srgb, var(--ink-950) 82%, var(--surface)); +} + +.preference-controls button, +.preference-controls select { + border-color: var(--line); + border-radius: 8px; + background: transparent; + color: var(--ink-950); + font-weight: 500; +} + +.preference-controls button:hover, +.preference-controls select:hover { + border-color: var(--ink-950); + background: transparent; +} + +.menu-toggle { + border-color: var(--line); + background: transparent; + color: var(--ink-950); +} + +@media (max-width: 980px) { + .header-menu .primary-nav { + border-bottom-color: var(--line); + background: var(--surface); + box-shadow: 0 24px 40px rgb(20 20 19 / 10%); + } +} + +.site-footer { + border-top: 1px solid rgb(240 238 230 / 12%); + background: #141413; + color: #b0aea5; +} + +.footer-grid { + padding-block: 56px 64px; +} + +.footer-grid strong { + color: #f0eee6; + font-weight: 500; +} + +.footer-grid a, +.footer-bottom a { + color: #b0aea5; + font-size: 15px; + transition: color 200ms ease; +} + +.footer-grid a:hover, +.footer-bottom a:hover { + color: #f0eee6; + text-decoration: none; +} + +.footer-bottom { + border-top-color: rgb(240 238 230 / 12%); + color: #8a8880; +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index d5af22e..4e2f478 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -2,6 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later import type { Metadata } from "next"; +import { Source_Serif_4 } from "next/font/google"; import { headers } from "next/headers"; import type { ReactNode } from "react"; import { nonceHeader } from "@/lib/content-security-policy"; @@ -9,6 +10,14 @@ import { getLocale } from "@/lib/locale.server"; import { themeBootstrap } from "@/lib/theme"; import "./globals.css"; +/** The serif of the headlines, served from this site. */ +const serif = Source_Serif_4({ + subsets: ["latin", "latin-ext", "cyrillic"], + weight: ["400", "500"], + display: "swap", + variable: "--font-serif", +}); + export const metadata: Metadata = { // The apex host is the only public organization canonical. The www host is a // transport-level redirect and account pages opt out of indexing below. @@ -35,6 +44,7 @@ export default async function RootLayout({ return ( <html lang={locale} + className={serif.variable} // data-theme belongs to the bootstrap script (lib/theme.ts) and the theme // control only. // Rendered here, React would set it back to light whenever the server diff --git a/apps/web/app/news/[slug]/page.tsx b/apps/web/app/news/[slug]/page.tsx new file mode 100644 index 0000000..bee024e --- /dev/null +++ b/apps/web/app/news/[slug]/page.tsx @@ -0,0 +1,137 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { Footer } from "@/components/Footer"; +import { JsonLd } from "@/components/JsonLd"; +import { formatDay } from "@/components/ProductCatalog"; +import { SiteHeader } from "@/components/SiteHeader"; +import { Flow } from "@/components/site/Flow"; +import { accentColours, accentFields } from "@/lib/brand-colours"; +import { getLocale } from "@/lib/locale.server"; +import { + articleUrl, + findArticle, + newsMessages, + releaseNotes, +} from "@/lib/news"; +import { products } from "@/lib/products"; + +interface ArticlePageProps { + params: Promise<{ slug: string }>; +} + +export async function generateMetadata({ + params, +}: ArticlePageProps): Promise<Metadata> { + const article = findArticle((await params).slug); + if (!article) { + return {}; + } + const text = article.text[await getLocale()]; + return { + title: text.title, + description: text.summary, + alternates: { canonical: articleUrl(article) }, + openGraph: { + type: "article", + title: text.title, + description: text.summary, + url: articleUrl(article), + publishedTime: article.date, + }, + }; +} + +/** One article: its product and date, the headline, the summary, the text and where to go next. */ +export default async function ArticlePage({ params }: ArticlePageProps) { + const article = findArticle((await params).slug); + if (!article) { + notFound(); + } + const locale = await getLocale(); + const news = newsMessages[locale]; + const text = article.text[locale]; + const product = products[article.product]; + const notes = releaseNotes(article); + return ( + <div className="pm-page pm-home pm-news-site"> + <JsonLd + data={[ + { + "@context": "https://schema.org", + "@type": "NewsArticle", + headline: text.title, + description: text.summary, + datePublished: article.date, + inLanguage: locale, + url: articleUrl(article), + publisher: { + "@type": "Organization", + name: "Progmasoft", + url: "https://progmasoft.com/", + }, + about: { + "@type": "SoftwareApplication", + name: product.name, + url: `https://product.progmasoft.com/${article.product}`, + }, + }, + ]} + /> + <SiteHeader locale={locale} /> + <main> + <article className="pm-article"> + <header className="pm-shell pm-article-head"> + <p className="pm-news-meta"> + <span + className="pm-chip" + style={{ background: accentColours[product.accent] }} + aria-hidden="true" + /> + <a href={`https://product.progmasoft.com/${article.product}`}> + {product.name} + </a> + <time dateTime={article.date}> + {formatDay(locale, article.date)} + </time> + </p> + <h1 className="pm-serif">{text.title}</h1> + <p className="pm-article-summary">{text.summary}</p> + </header> + <div className="pm-shell"> + <Flow + colours={accentFields[product.accent]} + seed={7.1} + speed={0.5} + className="pm-article-field" + /> + </div> + <div className="pm-shell pm-article-body"> + {text.body.map((paragraph) => ( + <p key={paragraph.slice(0, 32)}>{paragraph}</p> + ))} + <p className="pm-pills pm-article-links"> + {notes ? ( + <a className="pm-pill pm-pill-dark" href={notes}> + {news.notes} ↗ + </a> + ) : null} + <a + className="pm-pill pm-pill-outline" + href={`https://product.progmasoft.com/${article.product}`} + > + {news.product.replace("{name}", product.name)} + </a> + </p> + <p className="pm-article-back"> + <a href="https://news.progmasoft.com/">← {news.back}</a> + </p> + </div> + </article> + </main> + <Footer locale={locale} /> + </div> + ); +} diff --git a/apps/web/app/news/layout.tsx b/apps/web/app/news/layout.tsx new file mode 100644 index 0000000..dbae5fa --- /dev/null +++ b/apps/web/app/news/layout.tsx @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { ReactNode } from "react"; +import "../site.css"; +import "./news.css"; + +export default function NewsLayout({ + children, +}: Readonly<{ children: ReactNode }>) { + return children; +} diff --git a/apps/web/app/news/news.css b/apps/web/app/news/news.css new file mode 100644 index 0000000..876528c --- /dev/null +++ b/apps/web/app/news/news.css @@ -0,0 +1,178 @@ +/* SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +/* news.progmasoft.com: the language of the home page, with a large lead + article, cards for the rest, and articles set in a narrow column. */ + +.pm-news-head { + padding-block: clamp(56px, 8vw, 104px) clamp(32px, 4vw, 48px); +} + +.pm-news-head h1 { + margin: 0; + font-size: clamp(48px, 7vw, 88px); + font-weight: 400; + letter-spacing: -0.025em; + line-height: 1; +} + +.pm-news-head p { + margin: 16px 0 0; + color: var(--home-soft); + font-size: clamp(18px, 1.8vw, 22px); +} + +.pm-news-lead { + position: relative; + display: grid; + min-height: clamp(360px, 44vw, 520px); + overflow: hidden; + border-radius: 16px; + color: #fff; + align-items: end; + text-decoration: none; +} + +.pm-news-lead:hover { + text-decoration: none; +} + +.pm-news-lead-field { + position: absolute; + inset: 0; +} + +.pm-news-lead::after { + position: absolute; + inset: 0; + background: linear-gradient(to top, rgb(10 14 20 / 55%), transparent 65%); + content: ""; +} + +.pm-news-lead-copy { + position: relative; + z-index: 1; + display: grid; + gap: 12px; + max-width: 760px; + padding: clamp(28px, 4vw, 48px); +} + +.pm-news-lead-copy time { + font-size: 15px; + opacity: 0.85; +} + +.pm-news-lead-copy strong { + font-size: clamp(32px, 4.4vw, 56px); + font-weight: 400; + letter-spacing: -0.02em; + line-height: 1.05; +} + +.pm-news-lead-copy span { + max-width: 620px; + font-size: 18px; + line-height: 1.45; +} + +.pm-news-list { + padding-block: 24px clamp(72px, 9vw, 120px); +} + +.pm-news-list ul { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 16px; + margin: 0; + padding: 0; + list-style: none; +} + +.pm-news-list a { + display: grid; + gap: 14px; + height: 100%; + padding: 28px; + border-radius: 16px; + background: var(--home-card); + color: inherit; + text-decoration: none; + transition: transform 300ms var(--ease); +} + +.pm-news-list a:hover { + transform: translateY(-3px); +} + +.pm-news-list strong { + font-size: clamp(24px, 2.4vw, 32px); + font-weight: 400; + letter-spacing: -0.015em; + line-height: 1.15; +} + +/* One article */ + +.pm-article-head { + max-width: 860px; + padding-block: clamp(56px, 8vw, 104px) clamp(32px, 4vw, 48px); +} + +.pm-article-head .pm-news-meta a { + display: inline-flex; + min-height: 24px; + align-items: center; + color: inherit; +} + +.pm-article-head h1 { + margin: 20px 0 0; + font-size: clamp(40px, 5.6vw, 72px); + font-weight: 400; + letter-spacing: -0.025em; + line-height: 1.04; +} + +.pm-article-summary { + margin: 24px 0 0; + color: var(--home-soft); + font-size: clamp(19px, 2vw, 24px); + line-height: 1.45; +} + +.pm-article-field { + height: clamp(200px, 26vw, 340px); + overflow: hidden; + border-radius: 16px; +} + +.pm-article-body { + max-width: 720px; + padding-block: clamp(40px, 5vw, 64px) clamp(72px, 9vw, 120px); +} + +.pm-article-body p:not(.pm-pills, .pm-article-back) { + margin: 0 0 1.2em; + font-size: 19px; + line-height: 1.7; +} + +.pm-article-links { + justify-content: flex-start; + margin-top: 40px; +} + +.pm-article-back { + margin: 48px 0 0; +} + +.pm-article-back a { + color: var(--home-soft); +} + +@media (max-width: 760px) { + .pm-news-list ul { + grid-template-columns: 1fr; + } +} diff --git a/apps/web/app/news/page.tsx b/apps/web/app/news/page.tsx new file mode 100644 index 0000000..6b62801 --- /dev/null +++ b/apps/web/app/news/page.tsx @@ -0,0 +1,100 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { Metadata } from "next"; +import { Footer } from "@/components/Footer"; +import { formatDay } from "@/components/ProductCatalog"; +import { SiteHeader } from "@/components/SiteHeader"; +import { Flow } from "@/components/site/Flow"; +import { Reveal } from "@/components/site/Reveal"; +import { accentColours, accentFields } from "@/lib/brand-colours"; +import { getLocale } from "@/lib/locale.server"; +import { articles, articleUrl, newsMessages } from "@/lib/news"; +import { products } from "@/lib/products"; + +export async function generateMetadata(): Promise<Metadata> { + const news = newsMessages[await getLocale()]; + return { + title: news.title, + description: news.description, + alternates: { canonical: "https://news.progmasoft.com/" }, + }; +} + +/** + * news.progmasoft.com: the newest article large, over a field in the colour + * of its product, then every other article as a card. + */ +export default async function NewsPage() { + const locale = await getLocale(); + const news = newsMessages[locale]; + const [first, ...rest] = articles; + return ( + <div className="pm-page pm-home pm-news-site"> + <SiteHeader locale={locale} /> + <Reveal /> + <main> + <section className="pm-shell pm-news-head"> + <h1 className="pm-serif">{news.title}</h1> + <p>{news.description}</p> + </section> + + {first ? ( + <section className="pm-shell"> + <a className="pm-news-lead" href={articleUrl(first)}> + <Flow + colours={accentFields[products[first.product].accent]} + seed={4.2} + speed={0.6} + className="pm-news-lead-field" + /> + <span className="pm-news-lead-copy"> + <time dateTime={first.date}> + {formatDay(locale, first.date)} + </time> + <strong className="pm-serif">{first.text[locale].title}</strong> + <span>{first.text[locale].summary}</span> + </span> + </a> + </section> + ) : null} + + <section className="pm-shell pm-news-list" aria-label={news.latest}> + <ul> + {rest.map((article, index) => ( + <li + key={article.slug} + data-reveal + style={{ "--i": index } as React.CSSProperties} + > + <a href={articleUrl(article)}> + <span className="pm-news-meta"> + <span + className="pm-chip" + style={{ + background: + accentColours[products[article.product].accent], + }} + aria-hidden="true" + /> + <span>{products[article.product].name}</span> + <time dateTime={article.date}> + {formatDay(locale, article.date)} + </time> + </span> + <strong className="pm-serif"> + {article.text[locale].title} + </strong> + <span className="pm-news-text"> + {article.text[locale].summary} + </span> + </a> + </li> + ))} + </ul> + </section> + </main> + <Footer locale={locale} /> + </div> + ); +} diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 4deca33..012665d 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -1,16 +1,25 @@ // SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> // SPDX-License-Identifier: AGPL-3.0-or-later +import type { CSSProperties } from "react"; import type { Metadata } from "next"; import { Footer } from "@/components/Footer"; import { JsonLd } from "@/components/JsonLd"; import { formatDay } from "@/components/ProductCatalog"; import { SiteHeader } from "@/components/SiteHeader"; +import { + FeatureCarousel, + type FeatureItem, +} from "@/components/site/FeatureCarousel"; +import { Flow, type FlowColours } from "@/components/site/Flow"; +import { Reveal } from "@/components/site/Reveal"; +import { accentColours, accentFields } from "@/lib/brand-colours"; import { getHomeMessages } from "@/lib/home-messages"; import { getLocale } from "@/lib/locale.server"; import { getMessages } from "@/lib/localization"; +import { articles, articleUrl, releaseNotes } from "@/lib/news"; import { policyUrls } from "@/lib/policies"; -import { getCatalogMessages, products, releases } from "@/lib/products"; +import { products, productSlugs } from "@/lib/products"; import { organizationData, websiteData } from "@/lib/structured-data"; import "./site.css"; @@ -24,120 +33,240 @@ export async function generateMetadata(): Promise<Metadata> { }; } -const discovery = - "https://credentials.progmasoft.com/.well-known/openid-configuration"; +type Field = FlowColours; + +/** One field per principle, each from one colour of the mark. */ +const principleFields: Field[] = [ + ["#1f2733", "#3b4658", "#8b98ad", "#e8e4da"], + ["#0f3440", "#1e7188", "#7fb8c4", "#efe9dc"], + ["#2a1d63", "#7655fa", "#c2b4ff", "#f1ece2"], + ["#5a2a12", "#dc7644", "#f2c39c", "#f6efe3"], +]; + +/** Where each product lands as the page scrolls; the sequence repeats. */ +const placements = [ + "left", + "right", + "centre", + "far-right", + "left-low", + "right-high", +]; + +const step = (index: number) => ({ "--i": index }) as CSSProperties; +const fill = (text: string, values: Record<string, string>) => + text.replace(/\{(\w+)\}/g, (_, key: string) => values[key] ?? ""); /** - * progmasoft.com: the areas Progmasoft works in, the newest releases of the - * catalog, and where developers and everyone else go next. Plain text and - * rules, no decoration: the page says what is there. + * progmasoft.com: a statement of what Progmasoft is, every product in turn over + * a moving field, the news, what it makes, how it works and how to reach it. */ export default async function Homepage() { const locale = await getLocale(); const home = getHomeMessages(locale); - const catalog = getCatalogMessages(locale); - const recent = releases().slice(0, 5); + const news = articles.slice(0, 3); + const made = [ + ...productSlugs.filter((slug) => products[slug].status === "released"), + ...productSlugs.filter((slug) => products[slug].status !== "released"), + ]; + const feature: FeatureItem[] = made.map((slug) => { + const product = products[slug]; + const release = product.latestRelease; + return { + slug, + name: product.name, + line: home.lines[slug], + colours: accentFields[product.accent], + more: { + label: home.feature.readMore, + href: `https://product.progmasoft.com/${slug}`, + }, + action: release + ? { + label: fill(home.feature.get, { name: product.name }), + href: release.url, + } + : { label: home.feature.follow, href: product.source }, + }; + }); + const contactLinks = [ + "mailto:support@progmasoft.com", + policyUrls.security, + "https://github.com/Progmasoft", + ]; + return ( - <div className="pm-page"> + <div className="pm-page pm-home"> <JsonLd data={[organizationData(), websiteData(locale)]} /> <SiteHeader locale={locale} /> + <Reveal /> <main> - <section className="pm-intro"> - <div className="pm-shell"> - <h1>{home.hero.title}</h1> - <p className="pm-lede">{home.hero.description}</p> - <p className="pm-actions"> - <a className="button" href="https://product.progmasoft.com/"> - {home.hero.catalog} - </a> - <a className="pm-link" href="https://github.com/Progmasoft"> - {home.hero.source} - </a> - </p> - </div> + <section className="pm-shell pm-opening"> + <h1 className="pm-statement-text"> + <strong>{home.statement.lead}</strong> {home.statement.rest} + </h1> </section> - <section className="pm-section" id="technology"> - <div className="pm-shell pm-split"> - <h2>{home.areas.title}</h2> - <dl className="pm-areas"> - {home.areas.items.map(([title, description]) => ( - <div key={title}> - <dt>{title}</dt> - <dd>{description}</dd> - </div> - ))} - </dl> - </div> + <section className="pm-shell pm-feature-wrap"> + <FeatureCarousel + items={feature} + label={home.feature.label} + pause={home.feature.pause} + play={home.feature.play} + /> </section> - <section className="pm-section" id="releases"> - <div className="pm-shell pm-split"> - <h2>{home.releases.title}</h2> - <div> - <ul className="pm-releases"> - {recent.map(({ slug, release }) => ( - <li key={slug}> - <time dateTime={release.date}> - {formatDay(locale, release.date)} + <section + className="pm-shell pm-news" + id="news" + aria-labelledby="pm-news-title" + > + <div className="pm-row-head"> + <h2 id="pm-news-title" className="pm-section-title"> + {home.news.title} + </h2> + <a className="pm-text-link" href="https://news.progmasoft.com/"> + {home.news.all} → + </a> + </div> + <ul className="pm-news-cards"> + {news.map((article, index) => { + const text = article.text[locale]; + const notes = releaseNotes(article); + return ( + <li + key={article.slug} + className="pm-news-card" + data-reveal + style={step(index)} + > + <p className="pm-news-meta"> + <span + className="pm-chip" + style={{ + background: + accentColours[products[article.product].accent], + }} + aria-hidden="true" + /> + <span>{home.news.category}</span> + <time dateTime={article.date}> + {formatDay(locale, article.date)} </time> - <a href={`https://product.progmasoft.com/${slug}`}> - {products[slug].name} {release.version} - </a> - <span>{catalog.products[slug].tagline}</span> - </li> - ))} - </ul> - <a - className="pm-link" - href="https://product.progmasoft.com/releases" + </p> + <h3> + <a href={articleUrl(article)}>{text.title}</a> + </h3> + <p className="pm-news-text">{text.summary}</p> + <dl className="pm-news-rows"> + <div> + <dt>{home.news.product}</dt> + <dd> + <a + href={`https://product.progmasoft.com/${article.product}`} + > + {products[article.product].name} → + </a> + </dd> + </div> + {notes ? ( + <div> + <dt>{home.news.notes}</dt> + <dd> + <a href={notes}>GitHub ↗</a> + </dd> + </div> + ) : null} + </dl> + <a className="pm-news-button" href={articleUrl(article)}> + {home.news.read} → + </a> + </li> + ); + })} + </ul> + </section> + + <section + className="pm-shell pm-made" + id="products" + aria-labelledby="pm-made-title" + > + <h2 id="pm-made-title" className="pm-section-title" data-reveal> + {home.showcase.title} + </h2> + <ol className="pm-scatter"> + {made.map((slug, index) => ( + <li + key={slug} + className={`pm-scatter-item pm-scatter-${placements[index % placements.length]}`} + data-reveal + style={ + { + "--colour": accentColours[products[slug].accent], + } as CSSProperties + } > - {home.releases.all} - </a> - </div> - </div> + <h3 className="pm-scatter-name pm-serif"> + {products[slug].name} + </h3> + <p className="pm-scatter-line">{home.lines[slug]}</p> + <p className="pm-more"> + <a href={`https://product.progmasoft.com/${slug}`}> + {home.showcase.learnMore} → + </a> + </p> + </li> + ))} + </ol> </section> - <section className="pm-section" id="developers"> - <div className="pm-shell pm-split"> - <h2>{home.developers.title}</h2> - <div> - <p className="pm-text">{home.developers.description}</p> - <p className="pm-discovery"> - <span>{home.developers.discovery}</span> - <code dir="ltr">{discovery}</code> - </p> - <p className="pm-actions"> - <a className="button" href="https://console.progmasoft.com/"> - {home.developers.console} - </a> - <a className="pm-link" href="https://account.progmasoft.com/"> - {home.developers.account} - </a> - </p> - </div> - </div> + <section className="pm-shell pm-learn" aria-labelledby="pm-learn-title"> + <h2 id="pm-learn-title" className="pm-section-title" data-reveal> + {home.principles.title} + </h2> + <ul className="pm-learn-cards"> + {home.principles.items.map(([title, text], index) => ( + <li key={title} data-reveal style={step(index)}> + <Flow + colours={ + principleFields[index % principleFields.length] ?? + accentFields.slate + } + seed={index * 3.7 + 1} + speed={0.35} + className="pm-learn-art" + /> + <h3>{title}</h3> + <p>{text}</p> + </li> + ))} + </ul> </section> - <section className="pm-section" id="contact"> - <div className="pm-shell pm-split"> - <h2>{home.contact.title}</h2> - <dl className="pm-contact"> - <div> - <dt>{home.contact.support}</dt> - <dd> - <a href="mailto:support@progmasoft.com"> - support@progmasoft.com + <section + className="pm-contact" + id="developers" + aria-labelledby="pm-contact-title" + > + <div className="pm-shell"> + <h2 id="pm-contact-title" className="pm-section-title" data-reveal> + {home.contact.title} + </h2> + <ul className="pm-contact-cards"> + {home.contact.items.map(([title, text, action], index) => ( + <li key={title} data-reveal style={step(index)}> + <h3>{title}</h3> + <p>{text}</p> + <a + className="pm-pill pm-pill-outline" + href={contactLinks[index]} + > + {action} ↗ </a> - </dd> - </div> - <div> - <dt>{home.contact.security}</dt> - <dd> - <a href={policyUrls.security}>{policyUrls.security}</a> - </dd> - </div> - </dl> + </li> + ))} + </ul> </div> </section> </main> diff --git a/apps/web/app/robots.ts b/apps/web/app/robots.ts index 085340b..e376c68 100644 --- a/apps/web/app/robots.ts +++ b/apps/web/app/robots.ts @@ -23,7 +23,8 @@ export default async function robots(): Promise<MetadataRoute.Robots> { canonicalHost === "product.progmasoft.com" || canonicalHost === "license.progmasoft.com" || canonicalHost === "agencelandmcp.progmasoft.com" || - canonicalHost === "git.progmasoft.com" + canonicalHost === "git.progmasoft.com" || + canonicalHost === "news.progmasoft.com" ? `https://${canonicalHost}/sitemap.xml` : "https://progmasoft.com/sitemap.xml"; return { diff --git a/apps/web/app/site.css b/apps/web/app/site.css index e975671..5654b1e 100644 --- a/apps/web/app/site.css +++ b/apps/web/app/site.css @@ -65,111 +65,580 @@ border-radius: var(--radius-sm); } -/* The home page: an introduction, then sections whose heading stands beside - their content, each above a rule. */ +/* The home page: a warm paper page with a serif for headlines, a moving + field behind the feature and the principles, cards with ruled rows, and + sections that rise into view. Reduced motion shows everything at rest. */ -.pm-intro { - border-bottom: 1px solid var(--line); - padding-block: 88px 80px; +.pm-home { + --home-paper: var(--surface); + --home-card: var(--surface-muted); + --home-ink: var(--ink-950); + --home-soft: var(--ink-650); + --home-rule: var(--line); + --ease: cubic-bezier(0.2, 0.7, 0.2, 1); + background: var(--home-paper); +} + +.pm-home main { + overflow-x: clip; + background: var(--home-paper); + color: var(--home-ink); +} + +.pm-serif, +.pm-statement-text { + font-family: var(--font-serif), Georgia, "Times New Roman", serif; } -.pm-intro h1 { - max-width: 880px; +.pm-section-title { margin: 0; - font-size: clamp(34px, 4.6vw, 58px); - font-weight: 700; - letter-spacing: -0.03em; - line-height: 1.08; + font-size: clamp(28px, 3vw, 40px); + font-weight: 600; + letter-spacing: -0.02em; +} + +.pm-row-head { + display: flex; + flex-wrap: wrap; + align-items: baseline; + justify-content: space-between; + gap: 16px; +} + +.pm-text-link, +.pm-more a { + color: inherit; + font-weight: 500; + text-decoration: none; + border-bottom: 1px solid currentcolor; +} + +.pm-more { + margin: 20px 0 0; + font-size: 17px; +} + +/* Opening: one editorial paragraph */ + +.pm-opening { + padding-block: clamp(64px, 9vw, 120px) clamp(40px, 5vw, 64px); +} + +.pm-statement-text { + max-width: 1040px; + margin: 0; + font-size: clamp(30px, 3.6vw, 48px); + font-weight: 400; + letter-spacing: -0.015em; + line-height: 1.22; + animation: pm-fade 1100ms var(--ease) both; +} + +.pm-statement-text strong { + font-weight: 500; } -.pm-split { +/* Feature: the latest release over a moving field */ + +.pm-feature { + position: relative; display: grid; - grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr); - gap: 48px; - align-items: start; + min-height: clamp(420px, 52vw, 640px); + overflow: hidden; + border-radius: 16px; + background: #1e5f78; + color: #fff; + place-items: center; + animation: pm-fade 1100ms var(--ease) 200ms both; } -.pm-split > h2 { +.pm-flow { + position: relative; +} + +.pm-flow canvas { + display: block; + width: 100%; + height: 100%; +} + +.pm-feature-field { + position: absolute; + inset: 0; +} + +.pm-feature-bar { + position: absolute; + right: 20px; + bottom: 20px; + left: 24px; + display: flex; + align-items: center; + justify-content: space-between; + gap: 16px; +} + +.pm-feature-names { + display: flex; + flex-wrap: wrap; + gap: 4px 18px; margin: 0; - font-size: 22px; - font-weight: 650; - letter-spacing: -0.01em; - line-height: 1.3; + padding: 0; + list-style: none; } -.pm-areas, -.pm-contact { +.pm-feature-names button { + position: relative; + min-height: 32px; + padding: 0; + border: 0; + background: none; + color: rgb(255 255 255 / 70%); + font: inherit; + font-size: 14px; + cursor: pointer; + text-shadow: 0 1px 12px rgb(0 0 0 / 30%); +} + +.pm-feature-names button[aria-current="true"] { + color: #fff; +} + +.pm-feature-names button[aria-current="true"]::after, +.pm-feature-timer { + position: absolute; + right: 0; + bottom: 2px; + left: 0; + height: 2px; + content: ""; +} + +.pm-feature-names button[aria-current="true"]::after { + background: rgb(255 255 255 / 35%); +} + +.pm-feature-timer { + z-index: 1; + background: #fff; + transform-origin: left; + animation: pm-timer 7000ms linear both; +} + +.pm-flow-toggle { + flex: none; display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 36px 48px; + width: 40px; + height: 40px; + place-items: center; + border: 1px solid rgb(255 255 255 / 45%); + border-radius: 50%; + background: rgb(0 0 0 / 18%); + color: #fff; + font-size: 12px; + cursor: pointer; + backdrop-filter: blur(6px); +} + +.pm-feature::after { + position: absolute; + inset: 0; + background: radial-gradient( + ellipse 55% 50% at 50% 45%, + rgb(10 14 20 / 38%), + transparent 75% + ); + content: ""; + pointer-events: none; +} + +.pm-feature-copy, +.pm-feature-bar { + z-index: 1; +} + +.pm-feature-copy { + position: relative; + animation: pm-fade 800ms var(--ease) both; + max-width: 640px; + padding: 48px 24px 96px; + text-align: center; + text-shadow: 0 1px 24px rgb(0 0 0 / 25%); +} + +.pm-feature-copy h2 { margin: 0; + font-size: clamp(44px, 6vw, 80px); + font-weight: 400; + letter-spacing: -0.02em; + line-height: 1.02; } -.pm-areas dt, -.pm-contact dt { - border-top: 1px solid var(--ink-950); - padding-top: 14px; +.pm-feature-copy p:not(.pm-pills) { + margin: 20px auto 0; + max-width: 420px; + font-size: 18px; + line-height: 1.45; +} + +.pm-pills { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 12px; + margin: 28px 0 0; +} + +.pm-pill { + display: inline-flex; + min-height: 40px; + align-items: center; + padding: 0 18px; + border-radius: 8px; + font-size: 15px; + font-weight: 500; + text-decoration: none; + text-shadow: none; + transition: transform 200ms var(--ease); +} + +.pm-pill:hover { + transform: translateY(-1px); +} + +.pm-pill-light { + background: #fff; + color: #141413; +} + +.pm-pill-dark { + background: #141413; + color: #fff; +} + +.pm-pill-outline { + border: 1px solid currentcolor; + border-radius: 999px; + color: inherit; +} + +/* News: cards with ruled rows */ + +.pm-news { + padding-block: clamp(56px, 7vw, 96px); +} + +.pm-news-cards { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 16px; + margin: 32px 0 0; + padding: 0; + list-style: none; +} + +.pm-news-card { + display: flex; + flex-direction: column; + padding: 28px 28px 24px; + border-radius: 16px; + background: var(--home-card); +} + +.pm-news-meta { + display: flex; + align-items: center; + gap: 14px; + margin: 0; + color: var(--home-soft); + font-size: 14px; +} + +.pm-chip { + width: 30px; + height: 14px; + border-radius: 999px; +} + +.pm-news-card h3 { + margin: 18px 0 0; + font-size: 22px; + font-weight: 600; + letter-spacing: -0.01em; + line-height: 1.2; +} + +.pm-news-text { + margin: 12px 0 0; + color: var(--home-soft); font-size: 16px; - font-weight: 650; + line-height: 1.5; } -.pm-areas dd, -.pm-contact dd { - margin: 8px 0 0; - color: var(--ink-650); +.pm-news-rows { + margin: auto 0 0; + padding-top: 32px; +} + +.pm-news-rows div { + display: flex; + justify-content: space-between; + gap: 12px; + padding-block: 12px; + border-top: 1px solid var(--home-rule); font-size: 15px; - line-height: 1.6; } -.pm-releases { - margin: 0 0 24px; +.pm-news-rows dt { + font-weight: 500; +} + +.pm-news-rows dd { + margin: 0; +} + +.pm-news-rows a { + color: var(--home-soft); + text-decoration: none; +} + +.pm-news-rows a:hover { + color: var(--home-ink); +} + +.pm-news-button { + display: block; + margin-top: 8px; + padding: 10px; + border: 1px solid var(--home-rule); + border-radius: 8px; + background: rgb(255 255 255 / 30%); + color: inherit; + font-size: 16px; + text-align: center; + text-decoration: none; + transition: background 200ms var(--ease); +} + +.pm-news-button:hover { + background: rgb(255 255 255 / 60%); +} + +:root[data-theme="dark"] .pm-news-button { + background: rgb(255 255 255 / 4%); +} + +/* What we make: one after another, from alternating sides */ + +.pm-made { + padding-block: clamp(56px, 7vw, 96px) clamp(80px, 10vw, 140px); +} + +.pm-scatter { + display: grid; + gap: clamp(64px, 10vw, 140px); + margin: clamp(48px, 7vw, 96px) 0 0; padding: 0; - border-top: 1px solid var(--ink-950); list-style: none; } -.pm-releases li { +.pm-scatter-item { + position: relative; + width: fit-content; + max-width: 100%; + padding-left: 28px; +} + +.pm-scatter-item::before { + position: absolute; + inset: 8px auto 8px 0; + width: 4px; + border-radius: 2px; + background: var(--colour); + content: ""; +} + +.pm-scatter-left { + justify-self: start; +} +.pm-scatter-right { + justify-self: end; + margin-top: 40px; +} +.pm-scatter-centre { + justify-self: start; + margin-left: 22%; +} +.pm-scatter-far-right { + justify-self: end; +} +.pm-scatter-left-low { + justify-self: start; + margin-left: 8%; + margin-top: 56px; +} +.pm-scatter-right-high { + justify-self: end; + margin-right: 14%; + margin-top: -24px; +} + +.pm-scatter-name { + margin: 0; + font-size: clamp(56px, 9vw, 124px); + font-weight: 400; + letter-spacing: -0.03em; + line-height: 0.98; +} + +.pm-scatter-line { + max-width: 520px; + margin: 18px 0 0; + color: var(--home-soft); + font-size: clamp(19px, 2vw, 24px); + line-height: 1.35; +} + +.pm-motion .pm-scatter-item[data-reveal] { + transform: translateX(-120px); + transition-duration: 1100ms; +} + +.pm-motion .pm-scatter-right[data-reveal], +.pm-motion .pm-scatter-far-right[data-reveal], +.pm-motion .pm-scatter-right-high[data-reveal] { + transform: translateX(120px); +} + +.pm-motion .pm-scatter-item[data-reveal].is-shown { + transform: none; +} + +.pm-motion .pm-scatter-item::before { + transform: scaleY(0); + transform-origin: top; + transition: transform 900ms var(--ease) 300ms; +} + +.pm-motion .pm-scatter-item.is-shown::before { + transform: none; +} + +/* How we work: cards of moving colour, like plates of art */ + +.pm-learn { + padding-block: clamp(56px, 7vw, 96px); + border-top: 1px solid var(--home-rule); +} + +.pm-learn-cards { display: grid; - grid-template-columns: 9rem minmax(0, 0.7fr) minmax(0, 1fr); - gap: 24px; - border-bottom: 1px solid var(--line); - padding-block: 14px; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 20px; + margin: 32px 0 0; + padding: 0; + list-style: none; +} + +.pm-learn-art { + aspect-ratio: 4 / 5; + overflow: hidden; + border-radius: 12px; + background: var(--home-card); +} + +.pm-learn-cards h3 { + margin: 18px 0 0; + font-size: 19px; + font-weight: 600; +} + +.pm-learn-cards p { + margin: 8px 0 0; + color: var(--home-soft); font-size: 15px; + line-height: 1.5; } -.pm-releases time, -.pm-releases span { - color: var(--ink-650); +/* Get in touch: dark, with outlined cards */ + +.pm-contact { + padding-block: clamp(72px, 9vw, 120px); + background: #141413; + color: #f0eee6; } -.pm-releases a { - font-weight: 650; +.pm-contact-cards { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 16px; + margin: 32px 0 0; + padding: 0; + list-style: none; } -.pm-text { - max-width: 680px; +.pm-contact-cards li { + display: flex; + flex-direction: column; + align-items: flex-start; + min-height: 240px; + padding: 28px; + border: 1px solid rgb(240 238 230 / 22%); + border-radius: 16px; + transition: border-color 200ms var(--ease); +} + +.pm-contact-cards li:hover { + border-color: rgb(240 238 230 / 55%); +} + +.pm-contact-cards h3 { margin: 0; - color: var(--ink-650); + font-size: 24px; + font-weight: 600; +} + +.pm-contact-cards p { + margin: 12px 0 24px; + color: #b0aea5; font-size: 16px; - line-height: 1.65; + line-height: 1.5; } -.pm-discovery { - display: grid; - gap: 6px; - margin: 24px 0 0; - border-left: 2px solid var(--line-strong); - padding-left: 16px; - font-size: 14px; +.pm-contact-cards .pm-pill { + margin-top: auto; } -.pm-discovery span { - color: var(--ink-650); +/* Rising into view, only when the script runs and motion is welcome */ + +.pm-motion [data-reveal] { + opacity: 0; + transform: translateY(32px); + transition: + opacity 900ms var(--ease), + transform 900ms var(--ease); + transition-delay: calc(var(--i, 0) * 120ms); +} + +.pm-motion [data-reveal].is-shown { + opacity: 1; + transform: none; +} + +@keyframes pm-timer { + from { + transform: scaleX(0); + } + to { + transform: scaleX(1); + } } -.pm-discovery code { - overflow-wrap: anywhere; - font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; +@keyframes pm-fade { + from { + opacity: 0; + transform: translateY(16px); + } } /* Sections */ @@ -357,33 +826,55 @@ } @media (max-width: 960px) { - .pm-detail, - .pm-split { + .pm-detail { grid-template-columns: 1fr; } - .pm-split { - gap: 24px; - } - .pm-section { padding-block: 56px; } - .pm-intro { - padding-block: 56px; + .pm-news-cards, + .pm-contact-cards { + grid-template-columns: 1fr; + } + + .pm-learn-cards { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .pm-scatter-item { + justify-self: stretch !important; + margin: 0 !important; } } -@media (max-width: 640px) { - .pm-areas, - .pm-contact { - grid-template-columns: 1fr; +@media (max-width: 520px) { + .pm-feature-names { + flex-wrap: nowrap; + min-width: 0; + overflow-x: auto; + scrollbar-width: none; } - .pm-releases li { + .pm-feature-names button { + white-space: nowrap; + } + + .pm-learn-cards { grid-template-columns: 1fr; - gap: 2px; + } + + .pm-learn-art { + aspect-ratio: 16 / 9; + } +} + +@media (prefers-reduced-motion: reduce) { + .pm-statement-text, + .pm-feature, + .pm-feature-copy { + animation: none; } } diff --git a/apps/web/app/sitemap.ts b/apps/web/app/sitemap.ts index da5cc25..2b363fa 100644 --- a/apps/web/app/sitemap.ts +++ b/apps/web/app/sitemap.ts @@ -4,6 +4,7 @@ import type { MetadataRoute } from "next"; import { headers } from "next/headers"; import { licensePages } from "@/lib/license-messages"; +import { articleUrl, articles } from "@/lib/news"; import { productSlugs } from "@/lib/products"; export default async function sitemap(): Promise<MetadataRoute.Sitemap> { @@ -15,6 +16,21 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> { ) .split(":", 1)[0] ?.toLowerCase(); + if (host === "news.progmasoft.com") { + return [ + { + url: "https://news.progmasoft.com/", + changeFrequency: "weekly", + priority: 1, + }, + ...articles.map((article) => ({ + url: articleUrl(article), + lastModified: article.date, + changeFrequency: "yearly" as const, + priority: 0.8, + })), + ]; + } if (host === "git.progmasoft.com") { return [{ url: "https://git.progmasoft.com/" }]; } diff --git a/apps/web/components/SiteHeader.tsx b/apps/web/components/SiteHeader.tsx index bf46ade..36b3b89 100644 --- a/apps/web/components/SiteHeader.tsx +++ b/apps/web/components/SiteHeader.tsx @@ -53,7 +53,7 @@ export function SiteHeader({ </> ) : ( <> - <a href="https://progmasoft.com/#technology">{site.technology}</a> + <a href="https://news.progmasoft.com/">{site.technology}</a> <a href="https://product.progmasoft.com/">{site.products}</a> <a href="https://console.progmasoft.com/">{site.developers}</a> <a href="https://github.com/Progmasoft">GitHub</a> diff --git a/apps/web/components/site/FeatureCarousel.tsx b/apps/web/components/site/FeatureCarousel.tsx new file mode 100644 index 0000000..a6c7f16 --- /dev/null +++ b/apps/web/components/site/FeatureCarousel.tsx @@ -0,0 +1,136 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +"use client"; + +import { useEffect, useState, useSyncExternalStore } from "react"; +import { Flow, type FlowColours } from "./Flow"; + +/** One product of the feature, its words already chosen for the language. */ +export interface FeatureItem { + slug: string; + name: string; + line: string; + colours: FlowColours; + more: { label: string; href: string }; + action: { label: string; href: string }; +} + +interface FeatureCarouselProps { + items: FeatureItem[]; + label: string; + pause: string; + play: string; +} + +const interval = 7000; +const stillQuery = "(prefers-reduced-motion: reduce)"; + +function subscribeMotion(onChange: () => void) { + const query = window.matchMedia(stillQuery); + query.addEventListener("change", onChange); + return () => query.removeEventListener("change", onChange); +} + +function prefersStill() { + return window.matchMedia(stillQuery).matches; +} + +/** + * The large card under the opening: every product in turn over a moving + * field in its own colours. It moves on every few seconds; the names at the + * bottom choose one, and the button stops both the turning and the field. + */ +export function FeatureCarousel({ + items, + label, + pause, + play, +}: FeatureCarouselProps) { + const [current, setCurrent] = useState(0); + const [paused, setPaused] = useState(false); + const still = useSyncExternalStore( + subscribeMotion, + prefersStill, + () => false, + ); + const turning = !paused && !still; + + useEffect(() => { + if (!turning) { + return; + } + + const timer = window.setTimeout( + () => setCurrent((index) => (index + 1) % items.length), + interval, + ); + return () => window.clearTimeout(timer); + }, [current, turning, items.length]); + + const item = items[current]; + if (!item) { + return null; + } + + return ( + <div + className="pm-feature" + aria-roledescription="carousel" + aria-label={label} + > + <Flow + colours={item.colours} + seed={2.4} + speed={0.9} + paused={paused} + className="pm-feature-field" + /> + <div + className="pm-feature-copy" + key={item.slug} + aria-live={turning ? "off" : "polite"} + > + <h2 className="pm-serif">{item.name}</h2> + <p>{item.line}</p> + <p className="pm-pills"> + <a className="pm-pill pm-pill-light" href={item.more.href}> + {item.more.label} + </a> + <a className="pm-pill pm-pill-dark" href={item.action.href}> + {item.action.label} + </a> + </p> + </div> + <div className="pm-feature-bar"> + <ul className="pm-feature-names"> + {items.map((entry, index) => ( + <li key={entry.slug}> + <button + type="button" + aria-current={index === current ? "true" : undefined} + onClick={() => { + setCurrent(index); + setPaused(true); + }} + > + {entry.name} + {index === current && turning ? ( + <span className="pm-feature-timer" aria-hidden="true" /> + ) : null} + </button> + </li> + ))} + </ul> + <button + type="button" + className="pm-flow-toggle" + aria-label={paused ? play : pause} + onClick={() => setPaused(!paused)} + > + {paused ? "▶" : "❚❚"} + </button> + </div> + </div> + ); +} diff --git a/apps/web/components/site/Flow.tsx b/apps/web/components/site/Flow.tsx new file mode 100644 index 0000000..27fe90c --- /dev/null +++ b/apps/web/components/site/Flow.tsx @@ -0,0 +1,202 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +"use client"; + +import { useEffect, useRef } from "react"; + +export type FlowColours = [string, string, string, string]; + +interface FlowProps { + /** Four colours, from the deepest to the lightest, as #rrggbb. */ + colours: FlowColours; + /** Shifts the pattern so that two fields never look the same. */ + seed?: number; + /** How fast the field moves; 0 keeps it still. */ + speed?: number; + /** Stops the motion while true. */ + paused?: boolean; + className?: string; +} + +const vertex = `attribute vec2 p;void main(){gl_Position=vec4(p,0.,1.);}`; + +/* + * Layered value noise, warped by itself, mapped onto four colours: a slow + * field like sand under water. + */ +const fragment = `precision mediump float; +uniform vec2 r;uniform float t;uniform float s; +uniform vec3 c0;uniform vec3 c1;uniform vec3 c2;uniform vec3 c3; +float h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);} +float n(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.-2.*f); +return mix(mix(h(i),h(i+vec2(1,0)),f.x),mix(h(i+vec2(0,1)),h(i+vec2(1,1)),f.x),f.y);} +float b(vec2 p){float v=0.,a=.5;for(int i=0;i<5;i++){v+=a*n(p);p=p*2.03+vec2(1.7,9.2);a*=.5;}return v;} +void main(){vec2 u=gl_FragCoord.xy/r.y;vec2 p=u*1.6+s; +vec2 q=vec2(b(p+vec2(0.,t*.05)),b(p+vec2(5.2,1.3)-t*.04)); +vec2 w=vec2(b(p+3.*q+vec2(1.7,9.2)+t*.03),b(p+3.*q+vec2(8.3,2.8))); +float v=b(p+2.5*w); +float band=smoothstep(.25,.75,gl_FragCoord.y/r.y+.25*(v-.5)); +vec3 col=mix(c0,c1,smoothstep(.2,.6,v)); +col=mix(col,c2,smoothstep(.45,.85,length(w)*.9)); +col=mix(col,c3,band*.55); +col+=(h(gl_FragCoord.xy+t)-.5)*.035; +gl_FragColor=vec4(col,1.);}`; + +function rgb(hex: string): number[] { + const value = Number.parseInt(hex.slice(1), 16); + return [ + ((value >> 16) & 255) / 255, + ((value >> 8) & 255) / 255, + (value & 255) / 255, + ]; +} + +/** + * A field of slowly moving colour drawn by the browser, in place of a + * photograph or a video. New colours blend in over a second. It stops when it + * leaves the screen or is paused, and for those who ask for less motion it + * draws still frames. Without WebGL the element keeps its CSS background. + */ +export function Flow({ + colours, + seed = 0, + speed = 1, + paused = false, + className, +}: FlowProps) { + const canvas = useRef<HTMLCanvasElement>(null); + const target = useRef(colours.map(rgb)); + const pausedRef = useRef(paused); + const redraw = useRef<() => void>(() => undefined); + + useEffect(() => { + target.current = colours.map(rgb); + redraw.current(); + }, [colours]); + + useEffect(() => { + pausedRef.current = paused; + }, [paused]); + + useEffect(() => { + const element = canvas.current; + const gl = element?.getContext("webgl", { + antialias: false, + premultipliedAlpha: false, + }); + if (!element || !gl) { + return; + } + + const shader = (type: number, source: string) => { + const s = gl.createShader(type); + if (!s) return null; + gl.shaderSource(s, source); + gl.compileShader(s); + return gl.getShaderParameter(s, gl.COMPILE_STATUS) ? s : null; + }; + const vs = shader(gl.VERTEX_SHADER, vertex); + const fs = shader(gl.FRAGMENT_SHADER, fragment); + const program = gl.createProgram(); + if (!vs || !fs || !program) return; + gl.attachShader(program, vs); + gl.attachShader(program, fs); + gl.linkProgram(program); + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) return; + gl.useProgram(program); + + gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer()); + gl.bufferData( + gl.ARRAY_BUFFER, + new Float32Array([-1, -1, 3, -1, -1, 3]), + gl.STATIC_DRAW, + ); + const position = gl.getAttribLocation(program, "p"); + gl.enableVertexAttribArray(position); + gl.vertexAttribPointer(position, 2, gl.FLOAT, false, 0, 0); + + const slots = [0, 1, 2, 3].map((index) => + gl.getUniformLocation(program, `c${index}`), + ); + gl.uniform1f(gl.getUniformLocation(program, "s"), seed); + const size = gl.getUniformLocation(program, "r"); + const time = gl.getUniformLocation(program, "t"); + + const still = + window.matchMedia("(prefers-reduced-motion: reduce)").matches || + speed === 0; + const current = target.current.map((colour) => [...colour]); + let visible = true; + let frame = 0; + let clock = seed * 10; + let last = performance.now(); + + const resize = () => { + const scale = Math.min(window.devicePixelRatio || 1, 1.5) * 0.6; + element.width = Math.max(1, Math.round(element.clientWidth * scale)); + element.height = Math.max(1, Math.round(element.clientHeight * scale)); + gl.viewport(0, 0, element.width, element.height); + gl.uniform2f(size, element.width, element.height); + }; + const draw = () => { + current.forEach((colour, index) => + gl.uniform3fv(slots[index] ?? null, colour), + ); + gl.uniform1f(time, clock); + gl.drawArrays(gl.TRIANGLES, 0, 3); + }; + const blend = (amount: number) => { + current.forEach((colour, index) => { + const goal = target.current[index] ?? colour; + for (let channel = 0; channel < 3; channel += 1) { + const now = colour[channel] ?? 0; + colour[channel] = now + ((goal[channel] ?? 0) - now) * amount; + } + }); + }; + const tick = (now: number) => { + const seconds = Math.min((now - last) / 1000, 0.1); + last = now; + if (visible) { + if (!pausedRef.current) clock += seconds * speed; + blend(Math.min(1, seconds * 2.4)); + draw(); + } + frame = requestAnimationFrame(tick); + }; + + resize(); + draw(); + element.dataset.ready = "true"; + redraw.current = () => { + if (still) { + blend(1); + draw(); + } + }; + const resizer = new ResizeObserver(() => { + resize(); + draw(); + }); + resizer.observe(element); + const watcher = new IntersectionObserver(([entry]) => { + visible = entry?.isIntersecting ?? true; + }); + watcher.observe(element); + if (!still) frame = requestAnimationFrame(tick); + + return () => { + cancelAnimationFrame(frame); + resizer.disconnect(); + watcher.disconnect(); + redraw.current = () => undefined; + }; + }, [seed, speed]); + + return ( + <div className={className ? `pm-flow ${className}` : "pm-flow"}> + <canvas ref={canvas} aria-hidden="true" /> + </div> + ); +} diff --git a/apps/web/components/site/Reveal.tsx b/apps/web/components/site/Reveal.tsx new file mode 100644 index 0000000..6971d59 --- /dev/null +++ b/apps/web/components/site/Reveal.tsx @@ -0,0 +1,45 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +"use client"; + +import { useEffect } from "react"; + +/** + * Shows the elements marked `data-reveal` as they scroll into view: each + * rises and fades in once, then stays. Without JavaScript, and for visitors + * who ask for less motion, everything is simply there. + */ +export function Reveal() { + useEffect(() => { + const root = document.documentElement; + const elements = Array.from( + document.querySelectorAll<HTMLElement>("[data-reveal]"), + ); + if ( + window.matchMedia("(prefers-reduced-motion: reduce)").matches || + !("IntersectionObserver" in window) + ) { + return; + } + + root.classList.add("pm-motion"); + const observer = new IntersectionObserver( + (entries) => { + for (const entry of entries) { + if (entry.isIntersecting) { + entry.target.classList.add("is-shown"); + observer.unobserve(entry.target); + } + } + }, + { rootMargin: "0px 0px -12% 0px", threshold: 0.12 }, + ); + elements.forEach((element) => observer.observe(element)); + return () => { + observer.disconnect(); + root.classList.remove("pm-motion"); + }; + }, []); + return null; +} diff --git a/apps/web/components/site/showcase.ts b/apps/web/components/site/showcase.ts new file mode 100644 index 0000000..7de65bc --- /dev/null +++ b/apps/web/components/site/showcase.ts @@ -0,0 +1,11 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +/** One product on the home page, its words already chosen for the language. */ +export interface ShowcaseItem { + slug: string; + name: string; + line: string; + colour: string; + more: { label: string; href: string }; +} diff --git a/apps/web/e2e/pages.ts b/apps/web/e2e/pages.ts index f408573..da9f005 100644 --- a/apps/web/e2e/pages.ts +++ b/apps/web/e2e/pages.ts @@ -21,6 +21,8 @@ export const layoutPages = [ "license.progmasoft.com/pm-spl/1.0/information/", "license.progmasoft.com/pm-spl/1.0/faq/", "license.progmasoft.com/pm-spl/1.0/categories/", + "news.progmasoft.com/", + "news.progmasoft.com/tazel-0-2-0-shares-results-through-a-remote-cache", "agencelandmcp.progmasoft.com/", "git.progmasoft.com/", "git.progmasoft.com/example-with-a-rather-long-repository-name", diff --git a/apps/web/lib/brand-colours.ts b/apps/web/lib/brand-colours.ts new file mode 100644 index 0000000..07af37d --- /dev/null +++ b/apps/web/lib/brand-colours.ts @@ -0,0 +1,29 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { ProductFacts } from "./products"; + +type Accent = ProductFacts["accent"]; + +/** Four colours of a moving field, from the deepest to the lightest. */ +export type FieldColours = [string, string, string, string]; + +/** The colour of each accent of the catalog. */ +export const accentColours: Record<Accent, string> = { + violet: "#7655fa", + blue: "#0066b8", + green: "#1f8a5b", + orange: "#dc7644", + teal: "#1e7188", + slate: "#3b4658", +}; + +/** The moving field of each accent: its colour, deep to light. */ +export const accentFields: Record<Accent, FieldColours> = { + orange: ["#3a1a0c", "#b4572a", "#e8a070", "#f3e3cf"], + green: ["#0d2a1e", "#1f8a5b", "#8fd1ad", "#eef0e2"], + slate: ["#14233a", "#3b4658", "#9aa7bd", "#e9e4d8"], + violet: ["#1d1446", "#7655fa", "#c4b6ff", "#f1ece2"], + blue: ["#0a1f3d", "#0066b8", "#8cc0ec", "#eef1ee"], + teal: ["#0f3440", "#1e7188", "#7fb8c4", "#efe9dc"], +}; diff --git a/apps/web/lib/home-messages.ts b/apps/web/lib/home-messages.ts index 1c4bfe5..219c0b0 100644 --- a/apps/web/lib/home-messages.ts +++ b/apps/web/lib/home-messages.ts @@ -2,11 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-or-later import type { Locale } from "./localization"; +import type { ProductSlug } from "./products"; /** - * The text of progmasoft.com. The page describes the areas Progmasoft works - * in, not a list of products: the products have their own catalog on - * product.progmasoft.com, and the releases the page lists come from it. + * The text of progmasoft.com, which tells Progmasoft: a statement, the latest + * release as a feature, the news, what it makes, how it works and how to reach + * it. Names, versions, dates and links come from the catalog. */ interface HomeMessages { navigation: { @@ -14,274 +15,348 @@ interface HomeMessages { products: string; developers: string; }; - hero: { - title: string; - description: string; - catalog: string; - source: string; - }; - areas: { - title: string; - items: [title: string, description: string][]; + /** The opening paragraph: a bold first sentence, then the rest. */ + statement: { lead: string; rest: string }; + feature: { + readMore: string; + /** "Get {name}". */ + get: string; + follow: string; + label: string; + pause: string; + play: string; }; - releases: { + news: { title: string; + category: string; + product: string; + notes: string; + read: string; all: string; }; - developers: { + showcase: { title: string; learnMore: string }; + /** One line per product, as short as a headline. */ + lines: Record<ProductSlug, string>; + principles: { title: string; - description: string; - console: string; - account: string; - discovery: string; + items: [title: string, text: string][]; }; contact: { title: string; - support: string; - security: string; + items: [title: string, text: string, action: string][]; }; } export const homeMessages: Record<Locale, HomeMessages> = { "en-US": { navigation: { - technology: "Areas", + technology: "News", products: "Products", developers: "Developers", }, - hero: { - title: "Developer tools and infrastructure, built in the open.", - description: - "Progmasoft develops build systems, testing libraries, data infrastructure and an operating system, and runs the services they rely on. The source of every project is public.", - catalog: "Product catalog", - source: "Source on GitHub", + statement: { + lead: "Tools that turn source into running software.", + rest: "Progmasoft is an independent software organization. We build them to do exactly what they say, to explain what they did, and to stay maintained for as long as people rely on them.", + }, + feature: { + readMore: "Read more", + get: "Get {name}", + follow: "Source on GitHub", + label: "Products", + pause: "Pause the animation", + play: "Play the animation", }, - areas: { - title: "Areas of work", + news: { + title: "News", + category: "Release", + product: "Product", + notes: "Release notes", + read: "Read the announcement", + all: "All news", + }, + showcase: { title: "What we make", learnMore: "Learn more" }, + lines: { + tazel: "Builds C, C++ and Zig. Redoes only what changed.", + opentala: "A kernel that speaks Darwin. It boots today.", + catch3: "C++ tests that hunt for the failing case.", + agenceland: "An IDE where every agent works in its own worktree.", + etincelle: "SQL over large data, on the JVM.", + archer: "Columnar data in memory, for Java.", + }, + principles: { + title: "How we work", items: [ [ - "Build and packages", - "Builds that run each action again only when its inputs change, toolchains, lockfiles and a module registry.", + "Our mission", + "Make building software dependable, from the first command to the last release.", ], [ - "Quality and testing", - "Testing libraries for C++: property-based, stateful and mutation testing, coverage and test selection.", + "Transparent, always", + "We say what we decided, what changed and why, before and after every release.", ], [ - "Development environments", - "An agentic development environment and the integrations of the tools with editors.", + "Secure by default", + "Signed results, checked downloads, and settings that start safe rather than open.", ], [ - "Data infrastructure", - "Columnar in-memory formats and engines for large data on the JVM.", + "Made to last", + "Each release names what it was tested on, and earlier versions stay documented.", + ], + ], + }, + contact: { + title: "Get in touch", + items: [ + [ + "Ask us anything", + "Questions, problems and ideas reach the people who build the software.", + "Write to us", ], [ - "Operating systems", - "A kernel with Darwin's system call ABI, its loader and the system around it.", + "Report a vulnerability", + "Tell us privately; we answer, fix it and say what happened.", + "Security Policy", ], [ - "Identity and services", - "Progmasoft accounts with OAuth 2.1 and OpenID Connect, Git mirrors, registries and continuous integration.", + "Follow the work", + "Releases, issues and discussions of our public projects.", + "GitHub", ], ], }, - releases: { - title: "Recent releases", - all: "All releases", - }, - developers: { - title: "For developers", - description: - "Applications sign people in with their Progmasoft account through OAuth 2.1 and OpenID Connect. The Console manages the clients and tokens of your applications.", - console: "Open the Console", - account: "Progmasoft account", - discovery: "OpenID Connect discovery", - }, - contact: { - title: "Contact", - support: "Questions and support", - security: "Report a vulnerability", - }, }, "de-DE": { navigation: { - technology: "Bereiche", + technology: "Neuigkeiten", products: "Produkte", developers: "Entwickler", }, - hero: { - title: "Entwicklerwerkzeuge und Infrastruktur, offen entwickelt.", - description: - "Progmasoft entwickelt Build-Systeme, Testbibliotheken, Dateninfrastruktur und ein Betriebssystem und betreibt die Dienste, auf die sie angewiesen sind. Der Quellcode jedes Projekts ist öffentlich.", - catalog: "Produktkatalog", - source: "Quellcode auf GitHub", + statement: { + lead: "Werkzeuge, die aus Quellcode laufende Software machen.", + rest: "Progmasoft ist eine unabhängige Software-Organisation. Wir bauen sie so, dass sie genau tun, was sie sagen, erklären, was sie getan haben, und gepflegt bleiben, solange Menschen sich auf sie verlassen.", + }, + feature: { + readMore: "Mehr lesen", + get: "{name} holen", + follow: "Quellcode auf GitHub", + label: "Produkte", + pause: "Animation anhalten", + play: "Animation abspielen", + }, + news: { + title: "Neuigkeiten", + category: "Version", + product: "Produkt", + notes: "Versionshinweise", + read: "Ankündigung lesen", + all: "Alle Neuigkeiten", + }, + showcase: { title: "Was wir machen", learnMore: "Mehr erfahren" }, + lines: { + tazel: "Baut C, C++ und Zig. Und nur, was sich geändert hat.", + opentala: "Ein Kernel, der Darwin spricht. Er bootet schon heute.", + catch3: "C++-Tests, die den fehlschlagenden Fall aufspüren.", + agenceland: + "Eine IDE, in der jeder Agent in seinem eigenen Worktree arbeitet.", + etincelle: "SQL über große Datenmengen, auf der JVM.", + archer: "Spaltenorientierte Daten im Speicher, für Java.", }, - areas: { - title: "Arbeitsbereiche", + principles: { + title: "Wie wir arbeiten", items: [ [ - "Build und Pakete", - "Builds, die eine Aktion nur dann erneut ausführen, wenn sich ihre Eingaben ändern, Toolchains, Lockfiles und eine Modulregistrierung.", + "Unsere Mission", + "Software zu bauen soll verlässlich sein, vom ersten Befehl bis zur letzten Version.", ], [ - "Qualität und Tests", - "Testbibliotheken für C++: eigenschaftsbasierte, zustandsbehaftete und Mutationstests, Abdeckung und Testauswahl.", + "Immer transparent", + "Wir sagen, was wir entschieden haben, was sich geändert hat und warum, vor und nach jeder Version.", ], [ - "Entwicklungsumgebungen", - "Eine agentische Entwicklungsumgebung und die Integration der Werkzeuge in Editoren.", + "Sicher von Anfang an", + "Signierte Ergebnisse, geprüfte Downloads und Einstellungen, die sicher statt offen beginnen.", ], [ - "Dateninfrastruktur", - "Spaltenorientierte In-Memory-Formate und Engines für große Datenmengen auf der JVM.", + "Gemacht, um zu bleiben", + "Jede Version nennt, worauf sie getestet wurde, und frühere Versionen bleiben dokumentiert.", + ], + ], + }, + contact: { + title: "Kontakt", + items: [ + [ + "Fragen Sie uns", + "Fragen, Probleme und Ideen erreichen die Menschen, die die Software bauen.", + "Schreiben Sie uns", ], [ - "Betriebssysteme", - "Ein Kernel mit Darwins Systemaufruf-ABI, sein Loader und das System um ihn herum.", + "Eine Schwachstelle melden", + "Sagen Sie es uns vertraulich; wir antworten, beheben sie und sagen, was geschehen ist.", + "Sicherheitsrichtlinie", ], [ - "Identität und Dienste", - "Progmasoft-Konten mit OAuth 2.1 und OpenID Connect, Git-Spiegel, Registrierungen und kontinuierliche Integration.", + "Die Arbeit verfolgen", + "Versionen, Issues und Diskussionen unserer öffentlichen Projekte.", + "GitHub", ], ], }, - releases: { - title: "Neueste Versionen", - all: "Alle Versionen", - }, - developers: { - title: "Für Entwickler", - description: - "Anwendungen melden Personen über OAuth 2.1 und OpenID Connect mit ihrem Progmasoft-Konto an. In der Console verwalten Sie die Clients und Tokens Ihrer Anwendungen.", - console: "Console öffnen", - account: "Progmasoft-Konto", - discovery: "OpenID-Connect-Discovery", - }, - contact: { - title: "Kontakt", - support: "Fragen und Support", - security: "Eine Schwachstelle melden", - }, }, "ru-RU": { navigation: { - technology: "Направления", + technology: "Новости", products: "Продукты", developers: "Разработчикам", }, - hero: { - title: "Инструменты разработчика и инфраструктура, создаваемые открыто.", - description: - "Progmasoft разрабатывает системы сборки, библиотеки тестирования, инфраструктуру данных и операционную систему, а также поддерживает сервисы, на которые они опираются. Исходный код каждого проекта открыт.", - catalog: "Каталог продуктов", - source: "Исходный код на GitHub", + statement: { + lead: "Инструменты, которые превращают исходный код в работающие программы.", + rest: "Progmasoft — независимая организация, создающая программное обеспечение. Мы делаем их так, чтобы они делали ровно то, что обещают, объясняли, что сделали, и поддерживались, пока на них полагаются.", + }, + feature: { + readMore: "Подробнее", + get: "Скачать {name}", + follow: "Исходный код на GitHub", + label: "Продукты", + pause: "Остановить анимацию", + play: "Запустить анимацию", + }, + news: { + title: "Новости", + category: "Выпуск", + product: "Продукт", + notes: "Примечания к выпуску", + read: "Читать объявление", + all: "Все новости", }, - areas: { - title: "Направления работы", + showcase: { title: "Что мы делаем", learnMore: "Подробнее" }, + lines: { + tazel: "Собирает C, C++ и Zig. Пересобирает только изменённое.", + opentala: "Ядро, говорящее на языке Darwin. Оно уже загружается.", + catch3: "Тесты C++, которые находят случай, где всё ломается.", + agenceland: + "Среда разработки, где каждый агент работает в своём worktree.", + etincelle: "SQL над большими данными, на JVM.", + archer: "Колоночные данные в памяти, для Java.", + }, + principles: { + title: "Как мы работаем", items: [ [ - "Сборка и пакеты", - "Сборка, повторяющая действие только при изменении его входных данных, наборы инструментов, lock-файлы и реестр модулей.", + "Наша миссия", + "Сделать создание программ надёжным, от первой команды до последнего выпуска.", + ], + [ + "Всегда открыто", + "Мы говорим, что решили, что изменилось и почему, до и после каждого выпуска.", ], [ - "Качество и тестирование", - "Библиотеки тестирования для C++: тестирование на основе свойств, с состоянием и мутационное, покрытие и выбор тестов.", + "Безопасно по умолчанию", + "Подписанные результаты, проверенные загрузки и настройки, которые начинают с безопасного.", ], [ - "Среды разработки", - "Агентная среда разработки и интеграция инструментов с редакторами.", + "Сделано надолго", + "Каждый выпуск называет, на чём он проверен, а прежние версии остаются описанными.", ], + ], + }, + contact: { + title: "Связаться с нами", + items: [ [ - "Инфраструктура данных", - "Колоночные форматы данных в памяти и движки для больших данных на JVM.", + "Спросите нас", + "Вопросы, проблемы и идеи попадают к тем, кто создаёт программы.", + "Написать нам", ], [ - "Операционные системы", - "Ядро с ABI системных вызовов Darwin, его загрузчик и система вокруг него.", + "Сообщить об уязвимости", + "Сообщите нам конфиденциально; мы ответим, исправим и расскажем, что произошло.", + "Политика безопасности", ], [ - "Идентификация и сервисы", - "Аккаунты Progmasoft с OAuth 2.1 и OpenID Connect, зеркала Git, реестры и непрерывная интеграция.", + "Следить за работой", + "Выпуски, задачи и обсуждения наших открытых проектов.", + "GitHub", ], ], }, - releases: { - title: "Последние выпуски", - all: "Все выпуски", - }, - developers: { - title: "Разработчикам", - description: - "Приложения выполняют вход пользователей с аккаунтом Progmasoft через OAuth 2.1 и OpenID Connect. В Console вы управляете клиентами и токенами своих приложений.", - console: "Открыть Console", - account: "Аккаунт Progmasoft", - discovery: "Обнаружение OpenID Connect", - }, - contact: { - title: "Контакты", - support: "Вопросы и поддержка", - security: "Сообщить об уязвимости", - }, }, "fr-FR": { navigation: { - technology: "Domaines", + technology: "Actualités", products: "Produits", developers: "Développeurs", }, - hero: { - title: "Outils pour développeurs et infrastructure, développés en public.", - description: - "Progmasoft développe des systèmes de build, des bibliothèques de test, une infrastructure de données et un système d'exploitation, et opère les services dont ils dépendent. Le code source de chaque projet est public.", - catalog: "Catalogue des produits", - source: "Code source sur GitHub", + statement: { + lead: "Des outils qui transforment le code source en logiciel qui tourne.", + rest: "Progmasoft est une organisation logicielle indépendante. Nous les construisons pour qu'ils fassent exactement ce qu'ils disent, expliquent ce qu'ils ont fait et restent maintenus tant qu'on compte sur eux.", + }, + feature: { + readMore: "En savoir plus", + get: "Obtenir {name}", + follow: "Code source sur GitHub", + label: "Produits", + pause: "Mettre l'animation en pause", + play: "Lancer l'animation", + }, + news: { + title: "Actualités", + category: "Version", + product: "Produit", + notes: "Notes de version", + read: "Lire l'annonce", + all: "Toutes les actualités", + }, + showcase: { title: "Ce que nous faisons", learnMore: "En savoir plus" }, + lines: { + tazel: "Construit C, C++ et Zig. Ne refait que ce qui a changé.", + opentala: "Un noyau qui parle Darwin. Il démarre déjà.", + catch3: "Des tests C++ qui traquent le cas qui échoue.", + agenceland: "Un IDE où chaque agent travaille dans son propre worktree.", + etincelle: "Du SQL sur de grands volumes de données, sur la JVM.", + archer: "Des données en colonnes en mémoire, pour Java.", }, - areas: { - title: "Domaines de travail", + principles: { + title: "Notre façon de travailler", items: [ [ - "Build et paquets", - "Des builds qui ne relancent une action que lorsque ses entrées changent, des chaînes d'outils, des fichiers de verrouillage et un registre de modules.", + "Notre mission", + "Rendre fiable la construction du logiciel, de la première commande à la dernière version.", ], [ - "Qualité et tests", - "Des bibliothèques de test pour C++ : tests fondés sur les propriétés, tests à état et tests de mutation, couverture et sélection des tests.", + "Transparents, toujours", + "Nous disons ce que nous avons décidé, ce qui a changé et pourquoi, avant et après chaque version.", ], [ - "Environnements de développement", - "Un environnement de développement agentique et l'intégration des outils dans les éditeurs.", + "Sûrs par défaut", + "Des résultats signés, des téléchargements vérifiés et des réglages qui commencent sûrs plutôt qu'ouverts.", ], [ - "Infrastructure de données", - "Formats et moteurs en colonnes, en mémoire, pour de grands volumes de données sur la JVM.", + "Faits pour durer", + "Chaque version indique sur quoi elle a été testée, et les versions précédentes restent documentées.", + ], + ], + }, + contact: { + title: "Nous contacter", + items: [ + [ + "Posez-nous vos questions", + "Questions, problèmes et idées arrivent aux personnes qui construisent le logiciel.", + "Nous écrire", ], [ - "Systèmes d'exploitation", - "Un noyau avec l'ABI des appels système de Darwin, son chargeur et le système qui l'entoure.", + "Signaler une vulnérabilité", + "Dites-le-nous en privé ; nous répondons, corrigeons et expliquons ce qui s'est passé.", + "Politique de sécurité", ], [ - "Identité et services", - "Comptes Progmasoft avec OAuth 2.1 et OpenID Connect, miroirs Git, registres et intégration continue.", + "Suivre le travail", + "Versions, tickets et discussions de nos projets publics.", + "GitHub", ], ], }, - releases: { - title: "Versions récentes", - all: "Toutes les versions", - }, - developers: { - title: "Pour les développeurs", - description: - "Les applications connectent les personnes avec leur compte Progmasoft via OAuth 2.1 et OpenID Connect. La Console gère les clients et les jetons de vos applications.", - console: "Ouvrir la Console", - account: "Compte Progmasoft", - discovery: "Découverte OpenID Connect", - }, - contact: { - title: "Contact", - support: "Questions et assistance", - security: "Signaler une vulnérabilité", - }, }, }; diff --git a/apps/web/lib/news.ts b/apps/web/lib/news.ts new file mode 100644 index 0000000..3cf5892 --- /dev/null +++ b/apps/web/lib/news.ts @@ -0,0 +1,267 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { Locale } from "./localization"; +import { products, type ProductSlug } from "./products.ts"; + +/** The words of one article in one language. */ +interface ArticleText { + title: string; + summary: string; + body: string[]; +} + +interface ArticleSource { + date: string; + product: ProductSlug; + /** The release the article announces, when it announces one. */ + release?: string; + text: Record<Locale, ArticleText>; +} + +/** An article of news.progmasoft.com, with its address. */ +export interface Article extends ArticleSource { + slug: string; +} + +/** + * The address of an article: its English title in lower case, every run of + * other characters a single hyphen, as in "tazel-0-2-0-shares-results". + */ +export function slugOf(title: string): string { + return title + .normalize("NFKD") + .toLowerCase() + .replace(/[^a-z0-9]+/g, "-") + .replace(/^-|-$/g, ""); +} + +const sources: ArticleSource[] = [ + { + date: "2026-11-27", + product: "tazel", + release: "0.2.0", + text: { + "en-US": { + title: "Tazel 0.2.0 shares results through a remote cache", + summary: + "Builds take the results of actions from a cache that speaks Bazel's HTTP protocol, and readers accept only results signed with their key.", + body: [ + "Tazel 0.2.0 takes the results of actions from a remote cache that speaks Bazel's HTTP protocol, such as bazel-remote, and gives it the results of the actions it runs. Keys do not depend on where the module is checked out, so two machines share their work. Before a result is used, every header the compiler found is checked by its digest and every file by its SHA-256. A cache that cannot be reached is reported once, and the build goes on.", + "Results can be signed. A writer signs each result with Ed25519, RSA-4096 or ML-DSA-65, and a reader takes only results signed with its key's algorithm and verified by that key. tazel cache keygen makes a pair.", + "Project files are compiled once and kept, so a command whose MODULE.csx and BUILD.csx did not change no longer starts the C# compiler: on a module of a dozen packages, a build with nothing to do went from about three seconds to under half a second. Every message can now be written as rich terminal output, plain lines for scripts, JSON lines or XML, with --message-format.", + ], + }, + "de-DE": { + title: "Tazel 0.2.0 teilt Ergebnisse über einen entfernten Cache", + summary: + "Builds holen Ergebnisse von Aktionen aus einem Cache, der Bazels HTTP-Protokoll spricht, und Leser nehmen nur Ergebnisse an, die mit ihrem Schlüssel signiert sind.", + body: [ + "Tazel 0.2.0 holt die Ergebnisse von Aktionen aus einem entfernten Cache, der Bazels HTTP-Protokoll spricht, etwa bazel-remote, und gibt ihm die Ergebnisse der Aktionen, die es ausführt. Die Schlüssel hängen nicht davon ab, wo das Modul liegt, sodass zwei Rechner ihre Arbeit teilen. Bevor ein Ergebnis verwendet wird, wird jeder vom Compiler gefundene Header über seinen Digest und jede Datei über ihren SHA-256 geprüft. Ein unerreichbarer Cache wird einmal gemeldet, und der Build läuft weiter.", + "Ergebnisse können signiert werden. Ein Schreiber signiert jedes Ergebnis mit Ed25519, RSA-4096 oder ML-DSA-65, und ein Leser nimmt nur Ergebnisse an, die mit dem Algorithmus seines Schlüssels signiert und von ihm bestätigt sind. tazel cache keygen erzeugt ein Schlüsselpaar.", + "Projektdateien werden einmal kompiliert und aufbewahrt: Ein Befehl, dessen MODULE.csx und BUILD.csx sich nicht geändert haben, startet den C#-Compiler nicht mehr. Bei einem Modul mit einem Dutzend Paketen sank ein Build ohne Arbeit von etwa drei Sekunden auf unter eine halbe. Mit --message-format erscheint jede Meldung als reiche Terminalausgabe, als einfache Zeilen für Skripte, als JSON-Zeilen oder als XML.", + ], + }, + "ru-RU": { + title: "Tazel 0.2.0 делится результатами через удалённый кеш", + summary: + "Сборки берут результаты действий из кеша, работающего по HTTP-протоколу Bazel, а читатели принимают только результаты, подписанные их ключом.", + body: [ + "Tazel 0.2.0 берёт результаты действий из удалённого кеша, работающего по HTTP-протоколу Bazel, например bazel-remote, и отдаёт ему результаты действий, которые выполняет сам. Ключи не зависят от того, где лежит модуль, поэтому две машины делят свою работу. Прежде чем результат будет использован, каждый найденный компилятором заголовок проверяется по дайджесту, а каждый файл — по SHA-256. О недоступном кеше сообщается один раз, и сборка продолжается.", + "Результаты можно подписывать. Записывающий подписывает каждый результат ключом Ed25519, RSA-4096 или ML-DSA-65, а читающий принимает только результаты, подписанные алгоритмом его ключа и проверенные им. Пару ключей создаёт tazel cache keygen.", + "Файлы проекта компилируются один раз и сохраняются: команда, у которой MODULE.csx и BUILD.csx не изменились, больше не запускает компилятор C#. На модуле из дюжины пакетов сборка, которой нечего делать, ускорилась примерно с трёх секунд до менее чем половины секунды. С --message-format каждое сообщение выводится как насыщенный вывод терминала, простые строки для скриптов, строки JSON или XML.", + ], + }, + "fr-FR": { + title: "Tazel 0.2.0 partage ses résultats par un cache distant", + summary: + "Les builds reprennent les résultats d'actions d'un cache qui parle le protocole HTTP de Bazel, et les lecteurs n'acceptent que les résultats signés avec leur clé.", + body: [ + "Tazel 0.2.0 reprend les résultats d'actions d'un cache distant qui parle le protocole HTTP de Bazel, comme bazel-remote, et lui confie les résultats des actions qu'il exécute. Les clés ne dépendent pas de l'endroit où se trouve le module : deux machines partagent leur travail. Avant d'utiliser un résultat, chaque en-tête trouvé par le compilateur est vérifié par son empreinte et chaque fichier par son SHA-256. Un cache injoignable est signalé une fois, et le build continue.", + "Les résultats peuvent être signés. Un écrivain signe chaque résultat avec Ed25519, RSA-4096 ou ML-DSA-65, et un lecteur n'accepte que les résultats signés avec l'algorithme de sa clé et vérifiés par elle. tazel cache keygen crée une paire.", + "Les fichiers de projet sont compilés une fois et conservés : une commande dont MODULE.csx et BUILD.csx n'ont pas changé ne lance plus le compilateur C#. Sur un module d'une douzaine de paquets, un build sans rien à faire est passé d'environ trois secondes à moins d'une demi-seconde. Avec --message-format, chaque message s'écrit en sortie de terminal riche, en lignes simples pour les scripts, en lignes JSON ou en XML.", + ], + }, + }, + }, + { + date: "2026-11-20", + product: "opentala", + release: "0.1.0", + text: { + "en-US": { + title: "OpenTala 0.1.0 boots on amd64 and arm64", + summary: + "The first release of OpenTala runs programs in user mode through Darwin's system call ABI and Mach IPC, on QEMU for both architectures.", + body: [ + "OpenTala 0.1.0 is the first release of the kernel. It boots on amd64 through Multiboot and on arm64 on QEMU's virt machine, enters user mode, runs a program and gives every page back when the program ends.", + "Programs speak Darwin's system call ABI: syscall on amd64 and svc #0x80 on arm64, the BSD table and the Mach trap table with XNU's numbers, and the carry flag with errno on an error. Mach IPC has ports, a space of names per task with its rights, and mach_msg. A call that is not there ends in SIGSYS, and an exception kills the process with its signal instead of stopping the kernel.", + "User pages are no-execute, the kernel's memory is closed to user mode, and SMEP and SMAP are on from the start on amd64, PXN, UXN and PAN on arm64. Every boot in CI checks the kernel on both machines, and the release carries the two kernels with their SHA-256 sums.", + ], + }, + "de-DE": { + title: "OpenTala 0.1.0 bootet auf amd64 und arm64", + summary: + "Die erste Version von OpenTala führt Programme im Benutzermodus über Darwins Systemaufruf-ABI und Mach IPC aus, in QEMU für beide Architekturen.", + body: [ + "OpenTala 0.1.0 ist die erste Version des Kernels. Er bootet auf amd64 über Multiboot und auf arm64 auf der virt-Maschine von QEMU, wechselt in den Benutzermodus, führt ein Programm aus und gibt jede Seite zurück, wenn das Programm endet.", + "Programme sprechen Darwins Systemaufruf-ABI: syscall auf amd64 und svc #0x80 auf arm64, die BSD-Tabelle und die Mach-Trap-Tabelle mit den Nummern von XNU, und bei einem Fehler das Carry-Flag mit errno. Mach IPC bietet Ports, einen Namensraum je Task mit seinen Rechten und mach_msg. Ein fehlender Aufruf endet mit SIGSYS, und eine Ausnahme beendet den Prozess mit seinem Signal, statt den Kernel anzuhalten.", + "Benutzerseiten sind nicht ausführbar, der Speicher des Kernels ist für den Benutzermodus gesperrt, und SMEP und SMAP sind auf amd64 von Anfang an aktiv, PXN, UXN und PAN auf arm64. Jeder Bootvorgang in der CI prüft den Kernel auf beiden Maschinen, und die Version enthält beide Kernel mit ihren SHA-256-Summen.", + ], + }, + "ru-RU": { + title: "OpenTala 0.1.0 загружается на amd64 и arm64", + summary: + "Первый выпуск OpenTala запускает программы в пользовательском режиме через ABI системных вызовов Darwin и Mach IPC, в QEMU для обеих архитектур.", + body: [ + "OpenTala 0.1.0 — первый выпуск ядра. Оно загружается на amd64 через Multiboot и на arm64 на машине virt в QEMU, переходит в пользовательский режим, запускает программу и возвращает каждую страницу, когда программа завершается.", + "Программы говорят на ABI системных вызовов Darwin: syscall на amd64 и svc #0x80 на arm64, таблица BSD и таблица ловушек Mach с номерами XNU, а при ошибке — флаг переноса и errno. Mach IPC даёт порты, пространство имён каждой задачи с её правами и mach_msg. Отсутствующий вызов завершается сигналом SIGSYS, а исключение завершает процесс его сигналом, не останавливая ядро.", + "Пользовательские страницы не исполняемы, память ядра закрыта для пользовательского режима, SMEP и SMAP включены с самого начала на amd64, PXN, UXN и PAN — на arm64. Каждая загрузка в CI проверяет ядро на обеих машинах, а выпуск содержит оба ядра с их суммами SHA-256.", + ], + }, + "fr-FR": { + title: "OpenTala 0.1.0 démarre sur amd64 et arm64", + summary: + "La première version d'OpenTala exécute des programmes en mode utilisateur par l'ABI d'appels système de Darwin et Mach IPC, sous QEMU pour les deux architectures.", + body: [ + "OpenTala 0.1.0 est la première version du noyau. Il démarre sur amd64 par Multiboot et sur arm64 sur la machine virt de QEMU, passe en mode utilisateur, exécute un programme et rend chaque page quand le programme se termine.", + "Les programmes parlent l'ABI d'appels système de Darwin : syscall sur amd64 et svc #0x80 sur arm64, la table BSD et la table des traps Mach avec les numéros de XNU, et en cas d'erreur le drapeau de retenue avec errno. Mach IPC offre des ports, un espace de noms par tâche avec ses droits, et mach_msg. Un appel absent se termine par SIGSYS, et une exception tue le processus avec son signal au lieu d'arrêter le noyau.", + "Les pages utilisateur ne sont pas exécutables, la mémoire du noyau est fermée au mode utilisateur, SMEP et SMAP sont actifs dès le départ sur amd64, PXN, UXN et PAN sur arm64. Chaque démarrage en CI vérifie le noyau sur les deux machines, et la version fournit les deux noyaux avec leurs sommes SHA-256.", + ], + }, + }, + }, + { + date: "2026-11-15", + product: "catch3", + release: "0.4.0", + text: { + "en-US": { + title: "Catch3 0.4.0 maps every test to the lines it runs", + summary: + "The Catch3 runner records coverage per test, and keeps secrets out of the processes it starts.", + body: [ + "With --coverage=DIR, the Catch3 runner runs every test in a process of its own and keeps what each one reached: coverage.json maps each test to the lines it ran, and coverage.lcov holds the whole run. It reads LLVM source-based coverage from Clang and gcov from GCC.", + "Workers and the processes the runner starts no longer inherit environment variables whose names look like secrets, such as TOKEN, SECRET or PASSWORD. A test that needs one names it with --pass-env, or with pass-env in the project configuration.", + "Versions of Catch3 have three numbers again from this release on, MAJOR.MINOR.PATCH, as Semantic Versioning writes them. The repository tools are now C++17 programs run through Bazel.", + ], + }, + "de-DE": { + title: "Catch3 0.4.0 ordnet jedem Test die Zeilen zu, die er ausführt", + summary: + "Der Catch3-Runner erfasst die Abdeckung je Test und hält Geheimnisse aus den Prozessen heraus, die er startet.", + body: [ + "Mit --coverage=DIR führt der Catch3-Runner jeden Test in einem eigenen Prozess aus und hält fest, was jeder erreicht hat: coverage.json ordnet jedem Test die ausgeführten Zeilen zu, und coverage.lcov enthält den gesamten Lauf. Er liest die quellbasierte Abdeckung von LLVM aus Clang und gcov aus GCC.", + "Worker und die vom Runner gestarteten Prozesse erben keine Umgebungsvariablen mehr, deren Namen nach Geheimnissen aussehen, etwa TOKEN, SECRET oder PASSWORD. Ein Test, der eine braucht, nennt sie mit --pass-env oder mit pass-env in der Projektkonfiguration.", + "Versionen von Catch3 haben ab dieser Version wieder drei Zahlen, MAJOR.MINOR.PATCH, wie Semantic Versioning sie schreibt. Die Werkzeuge des Repositorys sind jetzt C++17-Programme, die über Bazel laufen.", + ], + }, + "ru-RU": { + title: "Catch3 0.4.0 сопоставляет каждому тесту выполненные им строки", + summary: + "Исполнитель Catch3 записывает покрытие для каждого теста и не пускает секреты в запускаемые им процессы.", + body: [ + "С --coverage=DIR исполнитель Catch3 запускает каждый тест в отдельном процессе и сохраняет, до чего он дошёл: coverage.json сопоставляет каждому тесту выполненные строки, а coverage.lcov содержит весь прогон. Он читает покрытие LLVM по исходному коду из Clang и gcov из GCC.", + "Рабочие процессы и процессы, которые запускает исполнитель, больше не наследуют переменные окружения, чьи имена похожи на секреты, например TOKEN, SECRET или PASSWORD. Тест, которому такая нужна, называет её через --pass-env или pass-env в конфигурации проекта.", + "С этого выпуска версии Catch3 снова состоят из трёх чисел, MAJOR.MINOR.PATCH, как их пишет Semantic Versioning. Инструменты репозитория теперь программы на C++17, запускаемые через Bazel.", + ], + }, + "fr-FR": { + title: "Catch3 0.4.0 relie chaque test aux lignes qu'il exécute", + summary: + "Le lanceur de Catch3 enregistre la couverture de chaque test et tient les secrets à l'écart des processus qu'il démarre.", + body: [ + "Avec --coverage=DIR, le lanceur de Catch3 exécute chaque test dans un processus à part et garde ce que chacun a atteint : coverage.json relie chaque test aux lignes qu'il a exécutées, et coverage.lcov contient l'exécution entière. Il lit la couverture par sources de LLVM avec Clang et gcov avec GCC.", + "Les workers et les processus que lance le lanceur n'héritent plus des variables d'environnement dont le nom ressemble à un secret, comme TOKEN, SECRET ou PASSWORD. Un test qui en a besoin la nomme avec --pass-env, ou avec pass-env dans la configuration du projet.", + "À partir de cette version, les versions de Catch3 ont de nouveau trois nombres, MAJOR.MINOR.PATCH, comme les écrit Semantic Versioning. Les outils du dépôt sont désormais des programmes C++17 lancés par Bazel.", + ], + }, + }, + }, +]; + +/** Every article, newest first. */ +export const articles: Article[] = sources + .map((source) => ({ ...source, slug: slugOf(source.text["en-US"].title) })) + .sort((a, b) => b.date.localeCompare(a.date)); + +export function findArticle(slug: string): Article | undefined { + return articles.find((article) => article.slug === slug); +} + +export function articleUrl(article: Article): string { + return `https://news.progmasoft.com/${article.slug}`; +} + +/** The release notes an article points to, from the catalog. */ +export function releaseNotes(article: Article): string | undefined { + const release = products[article.product].latestRelease; + return release && release.version === article.release + ? release.url + : undefined; +} + +interface NewsMessages { + title: string; + description: string; + latest: string; + back: string; + notes: string; + product: string; + read: string; +} + +export const newsMessages: Record<Locale, NewsMessages> = { + "en-US": { + title: "News", + description: "Releases and announcements from Progmasoft.", + latest: "Latest news", + back: "All news", + notes: "Release notes", + product: "About {name}", + read: "Read the announcement", + }, + "de-DE": { + title: "Neuigkeiten", + description: "Versionen und Ankündigungen von Progmasoft.", + latest: "Neueste Meldungen", + back: "Alle Neuigkeiten", + notes: "Versionshinweise", + product: "Über {name}", + read: "Ankündigung lesen", + }, + "ru-RU": { + title: "Новости", + description: "Выпуски и объявления Progmasoft.", + latest: "Последние новости", + back: "Все новости", + notes: "Примечания к выпуску", + product: "О {name}", + read: "Читать объявление", + }, + "fr-FR": { + title: "Actualités", + description: "Versions et annonces de Progmasoft.", + latest: "Dernières actualités", + back: "Toutes les actualités", + notes: "Notes de version", + product: "À propos de {name}", + read: "Lire l'annonce", + }, +}; + +/** + * The pages of news.progmasoft.com and the internal routes that render them: + * the list, and one page per article. + */ +export function newsRoute(pathname: string): string | null { + const path = + pathname.length > 1 && pathname.endsWith("/") + ? pathname.slice(0, -1) + : pathname; + if (path === "/") { + return "/news"; + } + const slug = /^\/([a-z0-9]+(?:-[a-z0-9]+)*)$/.exec(path)?.[1]; + return slug && findArticle(slug) ? `/news/${slug}` : null; +} diff --git a/apps/web/proxy.ts b/apps/web/proxy.ts index 38128f7..caab955 100644 --- a/apps/web/proxy.ts +++ b/apps/web/proxy.ts @@ -14,6 +14,7 @@ import { authorizeRoute, consoleRoute, issuerRoute } from "@/lib/credentials"; import { licenseRoute, productRoute } from "@/lib/sites"; import { mcpRoute } from "@/lib/mcp-messages"; import { gitRoute } from "@/lib/git-messages"; +import { newsRoute } from "@/lib/news"; import { contentSecurityPolicy, createNonce, @@ -65,6 +66,12 @@ const ownSites: OwnSite[] = [ route: licenseRoute, api: false, }, + { + hosts: hostsOf("news"), + root: "/news", + route: newsRoute, + api: false, + }, { hosts: hostsOf("git"), root: "/git", diff --git a/apps/web/tests/localization.test.mjs b/apps/web/tests/localization.test.mjs index b0ea8c5..654d5ab 100644 --- a/apps/web/tests/localization.test.mjs +++ b/apps/web/tests/localization.test.mjs @@ -108,7 +108,10 @@ test("the request host prefers the forwarded host and drops port and case", () = requestHost("Account.Progmasoft.com", "127.0.0.1:3010"), "account.progmasoft.com", ); - assert.equal(requestHost(null, "account.localhost:3000"), "account.localhost"); + assert.equal( + requestHost(null, "account.localhost:3000"), + "account.localhost", + ); assert.equal(requestHost(null, null), ""); }); @@ -162,7 +165,7 @@ test("the Russian messages are written in Cyrillic", () => { const russian = messages["ru-RU"]; for (const text of [ russian.navigation.language, - homeMessages["ru-RU"].hero.title, + homeMessages["ru-RU"].statement.lead, russian.auth.signIn, russian.dashboard.welcome, ]) { diff --git a/apps/web/tests/news.test.mjs b/apps/web/tests/news.test.mjs new file mode 100644 index 0000000..f7f721c --- /dev/null +++ b/apps/web/tests/news.test.mjs @@ -0,0 +1,78 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import assert from "node:assert/strict"; +import { test } from "node:test"; +import { supportedLocales } from "../lib/localization.ts"; +import { + articles, + articleUrl, + findArticle, + newsMessages, + newsRoute, + releaseNotes, + slugOf, +} from "../lib/news.ts"; +import { products } from "../lib/products.ts"; + +test("an article's address is its English title in kebab case", () => { + assert.equal( + slugOf("Tazel 0.2.0 shares results through a remote cache"), + "tazel-0-2-0-shares-results-through-a-remote-cache", + ); + assert.equal(slugOf(" C++ & Zig: ready! "), "c-zig-ready"); + for (const article of articles) { + assert.equal(article.slug, slugOf(article.text["en-US"].title)); + assert.equal( + articleUrl(article), + `https://news.progmasoft.com/${article.slug}`, + ); + } +}); + +test("every address names one article", () => { + const slugs = articles.map((article) => article.slug); + assert.equal(new Set(slugs).size, slugs.length); +}); + +test("articles are newest first", () => { + const dates = articles.map((article) => article.date); + assert.deepEqual(dates, [...dates].sort().reverse()); +}); + +test("every article is written in every language", () => { + for (const article of articles) { + for (const locale of supportedLocales) { + const text = article.text[locale]; + assert.ok(text?.title && text.summary, `${article.slug} ${locale}`); + assert.equal( + text.body.length, + article.text["en-US"].body.length, + `${article.slug} ${locale}`, + ); + } + } + for (const locale of supportedLocales) { + assert.ok(newsMessages[locale].title, locale); + } +}); + +test("an article that announces a release points to its notes", () => { + for (const article of articles.filter((entry) => entry.release)) { + assert.equal( + releaseNotes(article), + products[article.product].latestRelease?.url, + ); + } +}); + +test("news.progmasoft.com serves the list and each article", () => { + assert.equal(newsRoute("/"), "/news"); + const [first] = articles; + assert.equal(newsRoute(`/${first.slug}`), `/news/${first.slug}`); + assert.equal(newsRoute(`/${first.slug}/`), `/news/${first.slug}`); + assert.equal(newsRoute("/no-such-article"), null); + assert.equal(newsRoute("/a/b"), null); + assert.equal(newsRoute("/Tazel"), null); + assert.equal(findArticle(first.slug), first); +}); diff --git a/apps/web/tests/sites.test.mjs b/apps/web/tests/sites.test.mjs index f7f0957..15056f1 100644 --- a/apps/web/tests/sites.test.mjs +++ b/apps/web/tests/sites.test.mjs @@ -62,14 +62,13 @@ test("the catalog lists the projects, each with its repository", () => { assert.equal(isProductSlug("xide"), false); }); -test("the home page names areas, not products", () => { - const productNames = Object.values(products).map((product) => product.name); +test("the home page has a line for every product", () => { for (const locale of supportedLocales) { - for (const [title, description] of homeMessages[locale].areas.items) { - for (const name of productNames) { - assert.ok(!title.includes(name), `${locale}: ${title}`); - assert.ok(!description.includes(name), `${locale}: ${description}`); - } + for (const slug of productSlugs) { + assert.ok( + homeMessages[locale].lines[slug]?.length > 0, + `${locale}: ${slug}`, + ); } } }); diff --git a/ops/nginx/progmaweb.conf b/ops/nginx/progmaweb.conf index 60d4a5f..c5b7c37 100644 --- a/ops/nginx/progmaweb.conf +++ b/ops/nginx/progmaweb.conf @@ -447,6 +447,52 @@ server { } } +# The news of Progmasoft (news.progmasoft.com): pages of the Next.js site only. +server { + listen 80; + listen [::]:80; + server_name news.progmasoft.com; + + location ^~ /.well-known/acme-challenge/ { + root /var/lib/letsencrypt; + default_type text/plain; + } + + location / { + return 308 https://news.progmasoft.com$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name news.progmasoft.com; + + ssl_certificate /etc/letsencrypt/live/progmasoft.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/progmasoft.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + + client_max_body_size 1m; + + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "DENY" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; + + location / { + proxy_pass http://127.0.0.1:3010; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_read_timeout 60s; + } +} + # The Agenceland MCP Marketplace (agencelandmcp.progmasoft.com): pages of the Next.js site only; # it takes no uploads, so a request body is never larger than a form. server {