From 4fa63e43ccbef17ea3908cc2c81ac4152cc4abda Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Mon, 27 Apr 2026 15:18:21 +0000 Subject: [PATCH] =?UTF-8?q?feat(newsletter):=20Beehiiv=20signup=20integrat?= =?UTF-8?q?ion=20=E2=80=94=20theme=20v2.1.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add page-subscribe.php: single-column conversion template for /subscribe/ - Add peptide-newsletter-cta block to single-peptide.php (compact Beehiiv iframe at 180px height after article content, before prev/next nav) - Add peptide_starter_enqueue_beehiiv_attribution() to functions.php: loads attribution.js site-wide in footer (one include covers all placements) - Add 'Get our weekly digest →' footer CTA in column 1 linking to /subscribe/ (styled accent-green; sits below brand blurb) Form ID: 6edcd482-cbea-4767-8777-97ac17d6d609 Attribution tracking: https://subscribe-forms.beehiiv.com/attribution.js --- CHANGELOG.md | 263 +- footer.php | 3 +- functions.php | 32 +- page-subscribe.php | 44 + single-peptide.php | 78 +- style.css | 6580 +++++++++++++++++++++----------------------- 6 files changed, 3340 insertions(+), 3660 deletions(-) create mode 100755 page-subscribe.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 978f65a..b91e063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,214 +1,91 @@ # Peptide Starter Theme - Changelog +All notable changes to the Peptide Starter Theme are documented in this file. + +## [2.1.7] - 2026-04-27 — Newsletter signup infrastructure (Beehiiv) + +### Added + +- `page-subscribe.php` — single-column conversion template for `/subscribe/` landing page. + No sticky ToC; signup-form-centric layout. +- `single-peptide.php` — compact Beehiiv signup block inserted after monograph article, + before prev/next navigation. Copy: "Want updates on monographs like this? One email a + week, no spam." Form ID: `6edcd482-cbea-4767-8777-97ac17d6d609`. +- `footer.php` column 1 — "Get our weekly digest →" link to `/subscribe/` below brand blurb. +- `functions.php` — `peptide_starter_enqueue_beehiiv_attribution()` loads Beehiiv's + `attribution.js` site-wide (footer, async) for UTM source capture across all placements. + +### Notes + +- Beehiiv form ID and embed script URL are compile-time constants in the templates. + If the form ID changes, update `single-peptide.php` and `page-subscribe.php`. +- `single-repo_daily.php` and `archive-repo_daily.php` signup placements deferred to + the Repo Daily sprint (templates don't exist yet). +- Sender: `repo-weekly@mail.peptiderepo.com`. DNS records (SPF/DKIM/DMARC for + `mail.peptiderepo.com`) to be added by Terence in Cloudflare when Beehiiv + sending-domain verification runs. + ## [2.1.6] - 2026-04-27 — Our Methodology page template + footer link ### Added -- `page-our-methodology.php` — two-column sticky ToC template for `/our-methodology/`. - Mirrors `page-how-we-review.php` layout; CSS classes use `page-our-methodology` prefix. - The `#last-verified` anchor on this page is the deep-link target for Phase 2 - verdict-card "Last verified" lines. -- Footer "Our Method" section (section 5) now lists **Our Methodology** (`/our-methodology/`) - between How We Review Peptides and Editorial Standards. +- `page-our-methodology.php` — two-column ToC template for the `/our-methodology/` + editorial-standards page. Mirrors `page-how-we-review.php` layout; CSS classes + use `page-our-methodology` prefix. The `#last-verified` anchor on this page is the + deep-link target for Phase 2 verdict-card "Last verified" lines. +- Footer "Our Method" section now includes **Our Methodology** link (`/our-methodology/`) + alongside How We Review Peptides and Editorial Standards. ### Notes -- No changes to existing templates, CSS, or JS beyond the footer list addition. - -## [2.1.5] - 2026-04-27 — Featured verdicts vertical-rhythm fix - -### Changed -- `.hero-featured-verdicts__grid`: grid `gap` increased from `--spacing-xl` (32px) to - `--spacing-2xl` (48px). Cards were too close together, making the three verdict cards - read as a single visual block rather than three distinct entries. -- `.hero-verdict-card__title`: `margin-top: calc(var(--spacing-sm) - var(--spacing-md))` - added (−8px offset). The verdict badge and title are a label/heading pair; the uniform - card `gap: --spacing-md` (16px) created too much separation between them. Effective - badge→title gap is now 8px; title→summary gap remains 16px. - - -## [2.1.4] - 2026-04-26 — B2: Coming soon badges on inactive tool cards - -### Added -- `ps-module-card__badge` CSS class — absolute-positioned pill badge overlaid top-right of inactive cards; `--gray-200` bg, `--gray-700` text, Inter 600, 10px, pill shape -- `coming_soon` key in module card definitions; Protocol Builder, Tracker, Subject Log marked `true` -- Badge renders on top of existing `--inactive` visual treatment (dim + no-hover); does not replace it - -### Changed -- `position: relative` added to `.ps-module-card` to enable badge absolute positioning -- Calculator card: `coming_soon` remains `false`; `available` resolves `true` via `shortcode_exists('prc_calculator')` — card now fully active with no dim, no badge, full hover -## [2.0.0-alpha.3] - 2026-04-26 — CMO walkthrough P1 fixes - -### Fixed -- `template-parts/verdict/card.php`: Verdict text was a hardcoded generic placeholder. - Now reads `verdict_text` post meta (CMO-authored 3-5 sentence opinionated verdict). - Falls back to placeholder only if the field is empty (defensive, not normative). -- `template-parts/verdict/card.php`: Evidence-row glyphs were hardcoded by row position - (row 1=✓, row 2=!, row 3=?), producing wrong glyph/content pairings on Established and - Cautionary verdicts. Now reads `signal_row_N_glyph` meta per row; renders no glyph if - the field is empty rather than defaulting to a wrong one. -- `single-peptide.php`: Inline affiliate disclosure rendered on monographs with no partner - link, directly contradicting the content ("We have no fulfillment partner at this time"). - Now conditional on `has_partner_link` boolean meta (default false). Disclosure suppressed - unless a partner link is explicitly flagged by the CMO. -- `header.php`: Dark-mode toggle was live in the header. Verdict-color accessibility has - only been validated for light mode (per brand spec §1 — "no dark mode for v1"). Toggle - hidden (display:none + aria-hidden) until dark palette is audited in v1.1. - -### Added -- `inc/verdict-meta.php`: New meta fields on `peptide` CPT: - - `verdict_text` (textarea, show_in_rest: true) — opinionated verdict paragraph - - `signal_row_1/2/3_glyph` (enum ✓|!|?|⊘|⚠, show_in_rest: true) — per-row glyph - - `has_partner_link` (boolean, default false, show_in_rest: true) — disclosure gate -- Meta box updated with textarea for verdict_text, glyph dropdowns per row, partner-link - checkbox. -- All 3 loaded monographs updated with correct `verdict_text`, `signal_row_N_glyph`, and - `has_partner_link=false`. - - -## [2.0.0-alpha.2] - 2026-04-26 — Wire verdict card and disclosure into single-peptide.php - -### Fixed -- `single-peptide.php`: Verdict card component was created in alpha.1 but never called - from the template — no verdict state was rendering on any peptide page. Now called - immediately after the page header for all `pr_peptide` posts with a `verdict_state`. -- `single-peptide.php`: Affiliate disclosure (inline context) was created in alpha.1 but - never called. Now rendered directly after the content box (below `the_content()`), - ensuring it appears below any partner links in the post body per the editorial - disclosure spec. -- `single-peptide.php`: Duplicate `

` issue — the page header was rendering an H1 - title AND the verdict card was also rendering an H1. Fixed: page header H1 is now - suppressed when a `verdict_state` is set; the verdict card owns the H1 for monograph - posts. - - -All notable changes to the Peptide Starter Theme are documented in this file. - -## [2.0.0-alpha.1] - 2026-04-26 — Brand Identity v1.0.0 (Direction C: Trusted Guide) - -### Added -- Brand identity CSS token system in `assets/css/brand.css` (Direction C palette: Teal/Lime/Orange) -- Poppins + Inter + IBM Plex Mono font loading (Google Fonts) with preload/preconnect -- Full favicon/PWA/OG asset pack from peptide-repo-brand v1.0.0: - - Logo variants: horizontal, horizontal-reverse, horizontal-on-teal, mark, mark-small, wordmark, wordmark-reverse, mono - - Favicons: ICO + PNG 16/32/48, apple-touch-icon - - PWA icons and manifest - - og-default.png (1200×630) for social sharing fallback -- `inc/verdict-meta.php` — Post meta registration for pr_peptide CPT: - - `verdict_state` (required): established|promising|investigational|insufficient|cautionary - - `signal_row_1/2/3` (optional): evidence signal labels - - Meta box in pr_peptide edit screen with sanitization and nonce protection -- Verdict badge component (`template-parts/verdict/badge.php`) with state-specific glyphs -- Verdict card component (`template-parts/verdict/card.php`) for monograph hero with evidence rows -- Evidence signal row sub-component (`template-parts/verdict/evidence-row.php`) -- Affiliate disclosure component (`template-parts/affiliate-disclosure.php`) with 3 contexts: - - Inline (adjacent to links) - - Banner (page-top disclosure) - - Footer (persistent sitewide) -- `page-how-we-review.php` — How We Review Peptides page template with ToC sidebar -- `page-about.php` — About & Editorial Standards page template with disclosure block -- Footer "Our Method" link section pointing to verdict explainer and editorial standards -- Footer affiliate disclosure via template-part (footer context) -- OG image fallback meta tag in header.php (og-default.png) -- Favicon and PWA manifest links in header.php with theme-color -- SVG logo support in header via inline `logo-horizontal.svg` (fallback to text if unavailable) -- Skip-to-content link in header.php (screen reader text) -- Reduced-motion media query in brand.css for button transitions - -### Changed -- `header.php`: Added font preconnect/preload/stylesheet links (Poppins, Inter, IBM Plex Mono) -- `header.php`: Swapped logo function to use inline SVG `logo-horizontal.svg` if available -- `functions.php`: Updated version to 2.0.0-alpha.1 -- `functions.php`: Added `require_once` for new `inc/verdict-meta.php` -- `functions.php`: Enqueued `assets/css/brand.css` before main stylesheet (dependency order) -- `functions.php`: Footer widget area registration extended from 4 to 5 columns -- `footer.php`: Added "Our Method" footer section with two links -- `footer.php`: Integrated affiliate disclosure component (footer context) -- `inc/helpers.php`: Updated `peptide_starter_the_custom_logo()` to prefer SVG logo from `assets/brand/logo-horizontal.svg` - -### Styling -- Brand CSS tokens cascade into existing theme; all new components use semantic token variables -- Verdict states (5-state taxonomy) signaled by color AND glyph AND label (never color-only) -- Lime (`#7FD600`) restricted to badge/button backgrounds with ink foreground (WCAG AA compliant) -- Prefers-reduced-motion honored for chip hover transitions -- All component BEM classes use `.pr-` prefix (brand) or `.ps-` prefix (theme); no collision with plugin prefixes (`.pn-`, `.psa-`, `.prab-`) - -### Accessibility -- Verdict badge component: `role="img"` + `aria-label="Verdict: {State}"` for screen readers -- Glyph marked `aria-hidden="true"` to avoid redundant announcement -- Affiliate disclosure component: `