Compare commits

..

2 Commits

Author SHA1 Message Date
peptiderepo
5212f75d28 fix: correct indentation in footer.php line 60 (PHPCS) 2026-04-29 06:25:24 +00:00
peptiderepo
4b7f79efb6 feat: RCT inline abbreviation tooltip on verdict legend strip (v2.2.1)
- Add abbrs field to Established verdict taxonomy item
- Add peptide_starter_render_desc() helper — builds safe HTML from
  esc_html/esc_attr components; replaces abbr terms with <abbr> tap-targets
- Update front-page.php description output to use render_desc()
- Add assets/js/abbr-tooltip.js — popover open/close, outside-click
  dismissal, keyboard accessibility (Enter/Space/Escape), ARIA attrs
- Enqueue abbr-tooltip.js on is_front_page() only
- Add .pr-abbr and .pr-abbr-popover CSS with dashed underline affordance,
  fade-in animation, dark-mode-safe surface variables
- Fix PEPTIDE_STARTER_VERSION drift: 2.0.0-alpha.3 → 2.2.1

Routing note: this is a theme change (not PR Core). Term 'RCT' is scoped
to the verdict legend strip only; monograph bodies are unaffected.
2026-04-29 06:23:15 +00:00
6 changed files with 26 additions and 46 deletions

View File

@@ -29,22 +29,12 @@ jobs:
with:
script: |
const sha = context.sha;
// Squash-merge -> PR association is eventually-consistent; poll briefly
// before concluding this was a direct push (avoids false positives on merges).
async function findMergedPR() {
for (let attempt = 1; attempt <= 5; attempt++) {
const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: sha,
});
const m = prs.find(p => p.merged_at);
if (m) return m;
if (attempt < 5) await new Promise(r => setTimeout(r, 10000));
}
return null;
}
const merged = await findMergedPR();
const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: sha,
});
const merged = prs.find(p => p.merged_at);
if (merged) {
core.info(`OK: commit ${sha.substring(0,7)} came from PR #${merged.number}`);
return;

View File

@@ -1,18 +1,5 @@
# Peptide Starter Theme - Changelog
## [2.2.2] - 2026-04-29 — Front page layout restructure
### Changed
- `template-parts/module-cards.php`: Removed Science Feed from the module card
grid. The grid is for interactive tools only; news is content. Grid is now
5 cards: Peptides, Calculator, Protocol Builder, Tracker, Subject Log. No card
in this set goes inactive-dimmed due to a plugin registration check.
- `front-page.php`: Replaced the full `[peptide_news]` inline feed with a
3-item teaser row (`[peptide_news count="3"]`) and a "View all research →"
CTA linking to `/news`. Reduces page weight and drives traffic to the
dedicated news page.
## [2.2.1] - 2026-04-29 — RCT inline abbreviation tooltip
### Added

View File

@@ -204,7 +204,7 @@ $featured_monograph_ids = array( 211, 36, 177 );
</section>
<?php endif; ?>
<!-- Research Modules Grid (5 cards) -->
<!-- Research Modules Grid (6 cards) -->
<?php get_template_part( 'template-parts/module', 'cards' ); ?>
<!-- PRAutoBlogger Posts Widget -->
@@ -214,22 +214,19 @@ $featured_monograph_ids = array( 211, 36, 177 );
}
?>
<!-- News Teaser Section — 3 items + "View all" CTA -->
<!-- News Feed Section -->
<?php
if ( shortcode_exists( 'peptide_news' ) ) {
?>
<section class="news-teaser-section">
<section class="news-feed-section">
<div class="ps-container">
<div class="news-teaser-header">
<div>
<h2><?php esc_html_e( 'Latest Peptide Research', 'peptide-starter' ); ?></h2>
<p><?php esc_html_e( 'Recent publications from leading research sources.', 'peptide-starter' ); ?></p>
</div>
<a href="<?php echo esc_url( home_url( '/news' ) ); ?>" class="ps-btn ps-btn-secondary">
<?php esc_html_e( 'View all research →', 'peptide-starter' ); ?>
</a>
<div class="news-feed-header">
<h2 class="news-feed-title"><?php esc_html_e( 'What\'s new', 'peptide-starter' ); ?></h2>
<p class="news-feed-description">
<?php esc_html_e( 'Recent peptide research, regulatory shifts, and synthesis news. New posts weekly.', 'peptide-starter' ); ?>
</p>
</div>
<?php echo do_shortcode( '[peptide_news count="3"]' ); ?>
<?php echo do_shortcode( '[peptide_news]' ); ?>
</div>
</section>
<?php
@@ -239,4 +236,3 @@ $featured_monograph_ids = array( 211, 36, 177 );
</main>
<?php get_footer(); ?>

View File

@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
// Theme constants.
define( 'PEPTIDE_STARTER_VERSION', '2.2.2' );
define( 'PEPTIDE_STARTER_VERSION', '2.2.1' );
define( 'PEPTIDE_STARTER_DIR', get_template_directory() );
define( 'PEPTIDE_STARTER_URI', get_template_directory_uri() );

View File

@@ -4,7 +4,7 @@ Theme URI: https://github.com/peptiderepo/peptide-starter
Description: Premium, accessible WordPress theme for scientific peptide reference database
Author: Peptide Repo
Author URI: https://peptiderepo.com
Version: 2.2.2
Version: 2.2.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: peptide-starter

View File

@@ -2,7 +2,7 @@
/**
* Template Part: Research Module Cards
*
* Renders a 5-card grid of research modules (tools/sections) for the front page.
* Renders a 6-card grid of research modules (tools/sections) for the front page.
* Each card checks if the target plugin is active; inactive cards are dimmed.
* Cards with 'coming_soon' => true display a "Coming soon" badge overlaid in
* the top-right corner — layered on top of the --inactive visual treatment.
@@ -58,6 +58,14 @@ $modules = array(
'available' => shortcode_exists( 'peptide_tracker' ),
'coming_soon' => true,
),
array(
'title' => __( 'Science Feed', 'peptide-starter' ),
'description' => __( 'What\'s new in peptide research. Filtered for what matters, weekly.', 'peptide-starter' ),
'url' => '/news',
'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 22h16a2 2 0 002-2V4a2 2 0 00-2-2H8a2 2 0 00-2 2v16a2 2 0 01-2 2zm0 0a2 2 0 01-2-2v-9c0-1.1.9-2 2-2h2"/><line x1="10" y1="6" x2="18" y2="6"/><line x1="10" y1="10" x2="18" y2="10"/><line x1="10" y1="14" x2="14" y2="14"/></svg>',
'available' => shortcode_exists( 'peptide_news' ),
'coming_soon' => false,
),
array(
'title' => __( 'Subject Log', 'peptide-starter' ),
'description' => __( 'Track outcomes over time. Subjective markers, lab results, protocol changes — your own data, kept private.', 'peptide-starter' ),
@@ -101,4 +109,3 @@ $modules = array(
</div>
</div>
</section>