Progmasoft Git

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

Fix what Playwright found at phone width; keep the header inside it

Checked in Chromium through Playwright against a production build:
seven catalog pages, four languages, 1366 and 390 pixels wide, with the
console, CSP and horizontal overflow watched.

- The site header was 51 px wider than a 390 px phone on every host
  (progmasoft.com, account, viget and the catalog): the brand, the
  account button and the two preference controls did not fit. Below 480
  px the gaps shrink and the header may wrap to a second line; overflow
  is 0 on all of them now.
- .pm-catalog already named the dashed box of the home page, which
  framed the whole index; the index is .pm-index.
- Phone width: the four numbers sit two by two, the project column of
  the table keeps 200 px, and the index starts closer to the hero.
- A project's description goes into the hero, as before, instead of
  running into the heading of its list.

No console errors, no CSP violations, no overflow on any of the 56 page,
language and width combinations.

Claude-Session: https://claude.ai/code/session_01Ji7xZMYjc4zankoc7hGBE1
Commit
02b9cd891bdc5e2e2eb6ed4ffe6ef6272ff93b77
Author
Leitwolf11 ·
Parents
fd5d1dfc8223

Files · Download .tar.gz

Changes

 apps/web/app/globals.css                  | 17 +++++++++++++++++
 apps/web/app/products/[slug]/page.tsx     |  3 +--
 apps/web/app/products/catalog.css         | 19 ++++++++++++++++++-
 apps/web/app/products/categories/page.tsx |  2 +-
 apps/web/app/products/languages/page.tsx  |  2 +-
 apps/web/app/products/page.tsx            |  2 +-
 apps/web/app/products/releases/page.tsx   |  2 +-
 7 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css
index a56f2e8..7480c11 100644
--- a/apps/web/app/globals.css
+++ b/apps/web/app/globals.css
@@ -1433,6 +1433,23 @@ a {
   unicode-bidi: isolate;
 }
 
+/* A phone keeps the brand, the account button and both preferences on one
+   line: the gaps shrink, and the line may wrap rather than widen the page. */
+@media (max-width: 480px) {
+  .header-inner {
+    flex-wrap: wrap;
+    gap: 8px 12px;
+  }
+
+  .primary-nav {
+    gap: 10px;
+  }
+
+  .preference-controls {
+    padding-left: 0;
+  }
+}
+
 /* The theme changes in one frame; nothing animates its colours meanwhile. */
 .theme-switching,
 .theme-switching *,
diff --git a/apps/web/app/products/[slug]/page.tsx b/apps/web/app/products/[slug]/page.tsx
index 4a56c93..080b5af 100644
--- a/apps/web/app/products/[slug]/page.tsx
+++ b/apps/web/app/products/[slug]/page.tsx
@@ -50,12 +50,11 @@ export default async function ProductPage({ params }: ProductPageProps) {
       catalog={catalog}
       view="all"
       title={product.name}
-      description={text.tagline}
+      description={text.description}
     >
       <section className="pm-section">
         <div className="pm-shell pm-detail">
           <div>
-            <p className="pm-lede">{text.description}</p>
             <div className="pm-heading">
               <h2>
                 {product.status === "released"
diff --git a/apps/web/app/products/catalog.css b/apps/web/app/products/catalog.css
index 79af348..1e61ad4 100644
--- a/apps/web/app/products/catalog.css
+++ b/apps/web/app/products/catalog.css
@@ -31,11 +31,16 @@
   color: var(--blue-700);
 }
 
-.pm-catalog {
+.pm-index {
   display: grid;
   gap: 32px;
 }
 
+/* The hero already sets the page apart; the index starts close below it. */
+.pm-section:has(> .pm-index) {
+  padding-block-start: 48px;
+}
+
 .pm-stats {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
@@ -139,6 +144,10 @@
   white-space: nowrap;
 }
 
+.pm-table tbody th {
+  min-inline-size: 200px;
+}
+
 .pm-table tbody th a {
   display: block;
   font-weight: 700;
@@ -252,4 +261,12 @@
   .pm-filter {
     grid-template-columns: 1fr;
   }
+
+  .pm-stats {
+    grid-template-columns: repeat(2, minmax(0, 1fr));
+  }
+
+  .pm-stats dd {
+    font-size: 26px;
+  }
 }
diff --git a/apps/web/app/products/categories/page.tsx b/apps/web/app/products/categories/page.tsx
index 4c3de6e..a942864 100644
--- a/apps/web/app/products/categories/page.tsx
+++ b/apps/web/app/products/categories/page.tsx
@@ -33,7 +33,7 @@ export default async function CategoriesPage() {
       description={catalog.categoriesDescription}
     >
       <section className="pm-section">
-        <div className="pm-shell pm-catalog">
+        <div className="pm-shell pm-index">
           {productCategories.map((category) => {
             const slugs = productSlugs.filter(
               (slug) => products[slug].category === category,
diff --git a/apps/web/app/products/languages/page.tsx b/apps/web/app/products/languages/page.tsx
index d09eeac..9c561db 100644
--- a/apps/web/app/products/languages/page.tsx
+++ b/apps/web/app/products/languages/page.tsx
@@ -33,7 +33,7 @@ export default async function LanguagesPage() {
       description={catalog.languagesDescription}
     >
       <section className="pm-section">
-        <div className="pm-shell pm-catalog">
+        <div className="pm-shell pm-index">
           {productLanguages.map((language) => {
             const slugs = productSlugs.filter(
               (slug) => products[slug].language === language,
diff --git a/apps/web/app/products/page.tsx b/apps/web/app/products/page.tsx
index fd9f9a1..e0cad71 100644
--- a/apps/web/app/products/page.tsx
+++ b/apps/web/app/products/page.tsx
@@ -63,7 +63,7 @@ export default async function ProductsPage({ searchParams }: CatalogProps) {
       description={catalog.description}
     >
       <section className="pm-section">
-        <div className="pm-shell pm-catalog">
+        <div className="pm-shell pm-index">
           <dl className="pm-stats">
             {stats.map(([label, value]) => (
               <div key={label}>
diff --git a/apps/web/app/products/releases/page.tsx b/apps/web/app/products/releases/page.tsx
index 30d0233..f9629fa 100644
--- a/apps/web/app/products/releases/page.tsx
+++ b/apps/web/app/products/releases/page.tsx
@@ -39,7 +39,7 @@ export default async function ReleasesPage() {
       description={catalog.releasesDescription}
     >
       <section className="pm-section">
-        <div className="pm-shell pm-catalog">
+        <div className="pm-shell pm-index">
           {released.length === 0 ? (
             <p>{catalog.noReleases}</p>
           ) : (