Skip to content

Commit eb5453e

Browse files
jack-arturoclaude
andauthored
feat(theme): readability pass — light/dark contrast, aligned log, agent avatar (#12)
* feat(theme): readability pass — light/dark contrast, aligned log, agent avatar Design pass on the drunk.support theme. Readability / contrast: - Consolidate two competing color systems: remap legacy --bg-*/--text-*/--accent tokens onto the newspaper palette so the search modal, tables, copy button, and reading bar track light/dark from one source. - Tune --ink-mute/--ink-faint and add --link (AA-safe orange) for body text; keep bright --bleed for fills/borders/large display only. - Fix the .signal promo box (was 1.08:1 in dark), the active nav number, and the hot-fill post kicker (all dark-on-dark in dark mode). Variable-ize editor-style.css. Result: 0 WCAG-AA failures in both modes. Log: - Drop per-row thumbnails and the fake md5 "commit hash"; add an aligned author-avatar column + two-line excerpt. One grid, so titles share a left edge. Author avatar: - minimalcode_author_avatar()/_url(): AutoJack posts use the agent's Gravatar (bundled portrait as offline fallback); shown in log rows, bylines, and the about-author block. Code blocks: - Dequeue the theme's duplicate CDN Prism when the Code Syntax Block plugin is active; frame blocks (acid top-edge + rule border + padding). A11y: visible :focus-visible rings, prefers-reduced-motion respected. Verification: php -l clean; programmatic WCAG-AA contrast audit in light + dark across all components — 0 failures. Visual checks via a static CSS harness (Local site was returning a 502). Risk: avatars now load from secure.gravatar.com (standard WP behavior). Code syntax highlighting still requires per-block language tags. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(theme): align remaining log templates + resolve AutoJack avatar from agent identity Addresses Codex review on PR #12. - search.php, 404.php, page-dev-pulse.php still rendered the old .entry markup (entry-hash / entry-thumb) after index/archive moved to the new grid, so those rows would misalign. Update all three to the date · author · title+excerpt · tags structure; drop the fake md5 hash; switch 404/dev-pulse AutoJack detection from the bare meta flag to minimalcode_is_autojack() (also catches category / author-2 posts). - minimalcode_author_avatar_url() derived the AutoJack Gravatar from the post author, but the Authorship checkbox (inc/post-types.php) flags a post without changing post_author — a human-saved flagged post would show the human's avatar. Resolve from the agent account via new filterable minimalcode_autojack_user_id() instead. - Update tests/theme-design-static.php markers (entry-hash → entry-author / entry-excerpt) to match the new markup. php -l clean; tests/theme-design-static.php passes; no entry-hash/entry-thumb markup remains. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(theme): keep copied code button legible in dark mode (Codex P3) The copy button's `.copied` state used color:var(--ink) on background:var(--hot), which in dark mode is cream-on-acid (~1.2:1) for the two-second confirmation. Add it to the existing dark hot-fill override set so the text uses --paper (11.3:1), matching the other hot-filled controls. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ae95773 commit eb5453e

12 files changed

Lines changed: 360 additions & 135 deletions

404.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,18 @@
5151
<div class="log">
5252
<?php
5353
foreach ( $recent_posts as $rp ) :
54-
$rp_hash = substr( md5( $rp->post_name ), 0, 6 );
55-
$rp_autojack = (bool) get_post_meta( $rp->ID, '_minimalcode_autojack', true );
54+
$rp_autojack = minimalcode_is_autojack( $rp->ID );
55+
$rp_excerpt = wp_strip_all_tags( get_the_excerpt( $rp ) );
5656
?>
57-
<a class="entry" href="<?php echo esc_url( get_permalink( $rp->ID ) ); ?>">
58-
<span class="entry-hash"><?php echo esc_html( $rp_hash ); ?></span>
57+
<a class="entry<?php echo $rp_autojack ? ' entry--aj' : ''; ?>" href="<?php echo esc_url( get_permalink( $rp->ID ) ); ?>">
5958
<span class="entry-date"><?php echo esc_html( strtoupper( get_the_date( 'M d', $rp->ID ) ) ); ?></span>
60-
<span class="entry-title serif <?php echo $rp_autojack ? 'aj' : ''; ?>"><?php echo esc_html( get_the_title( $rp->ID ) ); ?></span>
59+
<span class="entry-author"><?php echo minimalcode_author_avatar( $rp->ID, 32 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- helper escapes internally. ?></span>
60+
<span class="entry-main">
61+
<span class="entry-title serif"><?php echo esc_html( get_the_title( $rp->ID ) ); ?></span>
62+
<?php if ( $rp_excerpt ) : ?>
63+
<span class="entry-excerpt"><?php echo esc_html( $rp_excerpt ); ?></span>
64+
<?php endif; ?>
65+
</span>
6166
<span class="entry-tags">
6267
<?php if ( $rp_autojack ) : ?>
6368
<span class="tag aj">autojack</span>

archive.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@
5050
while ( have_posts() ) :
5151
the_post();
5252
$post_month = get_the_date( 'F Y' );
53-
$post_hash = substr( md5( get_post_field( 'post_name', get_the_ID() ) ), 0, 6 );
5453
$is_autojack = minimalcode_is_autojack();
55-
$has_thumb = has_post_thumbnail();
54+
$entry_excerpt = wp_strip_all_tags( get_the_excerpt() );
5655

5756
if ( $post_month !== $current_month ) :
5857
$current_month = $post_month;
@@ -64,13 +63,15 @@
6463
</div>
6564
<?php endif; ?>
6665

67-
<a id="post-<?php the_ID(); ?>" <?php post_class( 'entry' . ( $has_thumb ? ' entry--has-thumb' : '' ) ); ?> href="<?php the_permalink(); ?>">
68-
<?php if ( $has_thumb ) : ?>
69-
<span class="entry-thumb"><?php the_post_thumbnail( 'medium', array( 'loading' => 'lazy', 'alt' => '' ) ); ?></span>
70-
<?php endif; ?>
71-
<span class="entry-hash"><?php echo esc_html( $post_hash ); ?></span>
66+
<a id="post-<?php the_ID(); ?>" <?php post_class( 'entry' . ( $is_autojack ? ' entry--aj' : '' ) ); ?> href="<?php the_permalink(); ?>">
7267
<span class="entry-date"><?php echo esc_html( strtoupper( get_the_date( 'M d' ) ) ); ?></span>
73-
<span class="entry-title serif <?php echo $is_autojack ? 'aj' : ''; ?>"><?php the_title(); ?></span>
68+
<span class="entry-author"><?php echo minimalcode_author_avatar( get_the_ID(), 32 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- helper escapes internally. ?></span>
69+
<span class="entry-main">
70+
<span class="entry-title serif"><?php the_title(); ?></span>
71+
<?php if ( $entry_excerpt ) : ?>
72+
<span class="entry-excerpt"><?php echo esc_html( $entry_excerpt ); ?></span>
73+
<?php endif; ?>
74+
</span>
7475
<span class="entry-tags">
7576
<?php if ( $is_autojack ) : ?>
7677
<span class="tag aj">autojack</span>

assets/css/custom.css

Lines changed: 171 additions & 57 deletions
Large diffs are not rendered by default.

assets/css/editor-style.css

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55

66
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
77

8+
/* The editor iframe doesn't inherit the theme's :root tokens, so the newspaper
9+
palette is hardcoded here as light-mode values (the block editor has no
10+
front-end dark toggle). Keep these in sync with custom.css :root. */
811
.editor-styles-wrapper {
912
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
1013
font-size: 18px;
1114
line-height: 1.7;
12-
color: #1a1a1a;
15+
color: #0e0d0c; /* --ink */
1316
}
1417

1518
.editor-styles-wrapper h1,
@@ -36,34 +39,34 @@
3639
}
3740

3841
.editor-styles-wrapper a {
39-
color: #0066cc;
42+
color: #b53114; /* --link */
4043
text-decoration: none;
4144
}
4245

4346
.editor-styles-wrapper code {
4447
font-family: 'JetBrains Mono', 'Courier New', monospace;
4548
font-size: 0.9em;
46-
background-color: #f6f8fa;
47-
color: #24292e;
49+
background-color: #ebe5d6; /* --paper-dark */
50+
color: #0e0d0c; /* --ink */
4851
padding: 0.2em 0.4em;
49-
border-radius: 3px;
52+
border-radius: 0;
5053
}
5154

5255
.editor-styles-wrapper pre {
5356
font-family: 'JetBrains Mono', 'Courier New', monospace;
54-
background-color: #f6f8fa;
55-
color: #24292e;
57+
background-color: #ebe5d6; /* --paper-dark */
58+
color: #0e0d0c; /* --ink */
5659
padding: 1.5rem;
57-
border-radius: 6px;
60+
border-radius: 0;
5861
overflow-x: auto;
59-
border: 1px solid #e1e4e8;
62+
border: 1.5px solid #1a1814; /* --rule */
6063
}
6164

6265
.editor-styles-wrapper blockquote {
63-
border-left: 4px solid #0066cc;
66+
border-left: 4px solid #1a1814; /* --rule */
6467
padding-left: 1.5rem;
6568
margin: 1.5rem 0;
66-
color: #666666;
69+
color: #6b665c; /* --ink-mute */
6770
font-style: italic;
6871
}
6972

assets/images/autojack-profile.jpg

40.2 KB
Loading

assets/js/theme.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
// Update meta theme-color for mobile browsers
3333
const metaThemeColor = document.querySelector('meta[name="theme-color"]');
3434
if (metaThemeColor) {
35-
metaThemeColor.setAttribute('content', theme === 'dark' ? '#0d1117' : '#ffffff');
35+
metaThemeColor.setAttribute('content', theme === 'dark' ? '#1a1714' : '#f3efe6');
3636
} else {
3737
const meta = document.createElement('meta');
3838
meta.name = 'theme-color';
39-
meta.content = theme === 'dark' ? '#0d1117' : '#ffffff';
39+
meta.content = theme === 'dark' ? '#1a1714' : '#f3efe6';
4040
document.head.appendChild(meta);
4141
}
4242
},

functions.php

Lines changed: 115 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,27 @@ function minimalcode_scripts() {
7070
// Custom styles
7171
wp_enqueue_style('minimalcode-custom', get_template_directory_uri() . '/assets/css/custom.css', array(), filemtime(get_template_directory() . '/assets/css/custom.css'));
7272

73-
// Prism.js for code highlighting (dark mode compatible)
74-
wp_enqueue_style('prismjs', 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css', array(), '1.29.0');
75-
wp_enqueue_script('prismjs', 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js', array(), '1.29.0', true);
76-
77-
// Add language support for common languages
78-
$prism_languages = array('javascript', 'python', 'bash', 'json', 'css', 'php', 'typescript');
79-
foreach ($prism_languages as $lang) {
80-
wp_enqueue_script(
81-
'prismjs-' . $lang,
82-
'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-' . $lang . '.min.js',
83-
array('prismjs'),
84-
'1.29.0',
85-
true
86-
);
73+
// Prism.js for code highlighting. The Code Syntax Block plugin already
74+
// ships and enqueues its own Prism (only on pages that contain a code
75+
// block), so loading a second copy from the CDN is pure duplication. Only
76+
// fall back to the theme's CDN Prism when that plugin is NOT active.
77+
if ( ! function_exists( 'mkaz_prism_theme_css' ) ) {
78+
wp_enqueue_style('prismjs', 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css', array(), '1.29.0');
79+
wp_enqueue_script('prismjs', 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js', array(), '1.29.0', true);
80+
81+
// Add language support for common languages
82+
$prism_languages = array('javascript', 'python', 'bash', 'json', 'css', 'php', 'typescript');
83+
foreach ($prism_languages as $lang) {
84+
wp_enqueue_script(
85+
'prismjs-' . $lang,
86+
'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-' . $lang . '.min.js',
87+
array('prismjs'),
88+
'1.29.0',
89+
true
90+
);
91+
}
8792
}
88-
93+
8994
// Theme behavior + live ⌘K search.
9095
// Depends on wp-api-fetch so the search modal can hit /wp/v2/search.
9196
wp_enqueue_script('minimalcode-theme', get_template_directory_uri() . '/assets/js/theme.js', array('wp-api-fetch'), filemtime(get_template_directory() . '/assets/js/theme.js'), true);
@@ -147,6 +152,101 @@ function minimalcode_is_autojack( $post = null ) {
147152
return 2 === $author_id;
148153
}
149154

155+
/**
156+
* The WordPress user account for AutoJack, the AI agent author.
157+
*
158+
* Avatar resolution comes from this identity, NOT a post's own author: a post
159+
* can be flagged AutoJack (the Authorship checkbox or the `autojack` category)
160+
* while still saved by a human, whose Gravatar would otherwise show. Defaults to
161+
* user ID 2 — the legacy account also recognized by minimalcode_is_autojack() —
162+
* and is filterable for installs where the agent is a different user.
163+
*
164+
* @return int Agent user ID.
165+
*/
166+
function minimalcode_autojack_user_id() {
167+
static $id = null;
168+
if ( null === $id ) {
169+
$id = (int) apply_filters( 'minimalcode_autojack_user_id', 2 );
170+
}
171+
return $id;
172+
}
173+
174+
/**
175+
* Resolve the author-avatar URL for a post.
176+
*
177+
* AutoJack posts use the Gravatar on the agent's account, with the theme-bundled
178+
* portrait as the offline fallback. Human posts use the /about/ page featured
179+
* image, then the author's Gravatar. Returns '' if nothing resolves (callers
180+
* show initials).
181+
*
182+
* @param int|WP_Post|null $post Post ID, object, or null for the current post.
183+
* @return string Image URL or ''.
184+
*/
185+
function minimalcode_author_avatar_url( $post = null ) {
186+
$post_id = $post ? ( is_object( $post ) ? $post->ID : (int) $post ) : get_the_ID();
187+
if ( ! $post_id ) {
188+
return '';
189+
}
190+
191+
$author_id = (int) get_post_field( 'post_author', $post_id );
192+
193+
if ( minimalcode_is_autojack( $post_id ) ) {
194+
// Resolve from the agent's account, not the post author — a flagged
195+
// post can still be saved by a human. The theme-bundled portrait is
196+
// passed as Gravatar's `default`, so a missing or unreachable Gravatar
197+
// degrades to a matching local image instead of a mystery-man.
198+
$bundled = get_template_directory_uri() . '/assets/images/autojack-profile.jpg';
199+
$agent = minimalcode_autojack_user_id();
200+
$grav = $agent ? get_avatar_url( $agent, array( 'size' => 192, 'default' => $bundled ) ) : '';
201+
return $grav ? $grav : $bundled;
202+
}
203+
204+
// Human author: /about/ page featured image, else the author's Gravatar.
205+
$about_page = get_page_by_path( 'about' );
206+
if ( $about_page && has_post_thumbnail( $about_page->ID ) ) {
207+
return (string) get_the_post_thumbnail_url( $about_page->ID, 'thumbnail' );
208+
}
209+
210+
return (string) get_avatar_url( $author_id, array( 'size' => 96 ) );
211+
}
212+
213+
/**
214+
* Render a small author avatar for log rows and bylines. Falls back to an
215+
* initials monogram when no image resolves.
216+
*
217+
* @param int|WP_Post|null $post Post ID, object, or null for the current post.
218+
* @param int $size Rendered px (square).
219+
* @return string HTML.
220+
*/
221+
function minimalcode_author_avatar( $post = null, $size = 32 ) {
222+
$post_id = $post ? ( is_object( $post ) ? $post->ID : (int) $post ) : get_the_ID();
223+
$is_autojack = minimalcode_is_autojack( $post_id );
224+
$name = $is_autojack
225+
? 'AutoJack'
226+
: get_the_author_meta( 'display_name', (int) get_post_field( 'post_author', $post_id ) );
227+
$url = minimalcode_author_avatar_url( $post_id );
228+
$class = 'entry-avatar' . ( $is_autojack ? ' aj' : '' );
229+
$dim = (int) $size;
230+
231+
if ( $url ) {
232+
return sprintf(
233+
'<img class="%s" src="%s" alt="%s" width="%d" height="%d" loading="lazy" decoding="async">',
234+
esc_attr( $class ),
235+
esc_url( $url ),
236+
esc_attr( $name ),
237+
$dim,
238+
$dim
239+
);
240+
}
241+
242+
$initials = $is_autojack ? 'AJ' : strtoupper( mb_substr( (string) $name, 0, 1 ) );
243+
return sprintf(
244+
'<span class="%s entry-avatar--fallback" aria-hidden="true">%s</span>',
245+
esc_attr( $class ),
246+
esc_html( $initials ? $initials : '·' )
247+
);
248+
}
249+
150250
/**
151251
* Custom excerpt length
152252
*/

index.php

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@
3838
<?php
3939
the_post();
4040
$lede_id = get_the_ID();
41-
$lede_hash = substr( md5( get_post_field( 'post_name', $lede_id ) ), 0, 6 );
4241
$lede_excerpt = get_the_excerpt();
4342
?>
4443
<article id="post-<?php the_ID(); ?>" <?php post_class( 'lede' ); ?>>
45-
<div class="lede-marker">FRESH · <?php echo esc_html( strtoupper( $lede_hash ) ); ?></div>
44+
<div class="lede-marker">FRESH</div>
4645
<div class="lede-content">
4746
<span class="lede-eyebrow"><?php echo esc_html( minimalcode_primary_category_name() ); ?></span>
4847
<h1 class="lede-title">
@@ -56,10 +55,11 @@
5655
$lede_author = $lede_is_autojack ? 'AutoJack' : get_the_author();
5756
?>
5857
<div class="lede-byline">
58+
<?php echo minimalcode_author_avatar( $lede_id, 28 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- helper escapes internally. ?>
59+
<span class="lede-byline-name">by <?php echo esc_html( $lede_author ); ?></span>
5960
<?php if ( $lede_is_autojack ) : ?>
60-
<span class="tag aj">🤖 autojack</span>
61+
<span class="tag aj">autojack</span>
6162
<?php endif; ?>
62-
<span class="lede-byline-name">by <?php echo esc_html( $lede_author ); ?></span>
6363
</div>
6464
<div class="lede-meta">
6565
<span><?php echo esc_html( strtoupper( get_the_date( 'M d Y' ) ) ); ?></span>
@@ -84,9 +84,8 @@
8484
while ( have_posts() ) :
8585
the_post();
8686
$post_month = get_the_date( 'F Y' );
87-
$post_hash = substr( md5( get_post_field( 'post_name', get_the_ID() ) ), 0, 6 );
8887
$is_autojack = minimalcode_is_autojack();
89-
$has_thumb = has_post_thumbnail();
88+
$entry_excerpt = wp_strip_all_tags( get_the_excerpt() );
9089

9190
if ( $post_month !== $current_month ) :
9291
$current_month = $post_month;
@@ -98,13 +97,15 @@
9897
</div>
9998
<?php endif; ?>
10099

101-
<a id="post-<?php the_ID(); ?>" <?php post_class( 'entry' . ( $has_thumb ? ' entry--has-thumb' : '' ) ); ?> href="<?php the_permalink(); ?>">
102-
<?php if ( $has_thumb ) : ?>
103-
<span class="entry-thumb"><?php the_post_thumbnail( 'medium', array( 'loading' => 'lazy' ) ); ?></span>
104-
<?php endif; ?>
105-
<span class="entry-hash"><?php echo esc_html( $post_hash ); ?></span>
100+
<a id="post-<?php the_ID(); ?>" <?php post_class( 'entry' . ( $is_autojack ? ' entry--aj' : '' ) ); ?> href="<?php the_permalink(); ?>">
106101
<span class="entry-date"><?php echo esc_html( strtoupper( get_the_date( 'M d' ) ) ); ?></span>
107-
<span class="entry-title serif <?php echo $is_autojack ? 'aj' : ''; ?>"><?php the_title(); ?></span>
102+
<span class="entry-author"><?php echo minimalcode_author_avatar( get_the_ID(), 32 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- helper escapes internally. ?></span>
103+
<span class="entry-main">
104+
<span class="entry-title serif"><?php the_title(); ?></span>
105+
<?php if ( $entry_excerpt ) : ?>
106+
<span class="entry-excerpt"><?php echo esc_html( $entry_excerpt ); ?></span>
107+
<?php endif; ?>
108+
</span>
108109
<span class="entry-tags">
109110
<?php if ( $is_autojack ) : ?>
110111
<span class="tag aj">autojack</span>

page-dev-pulse.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,18 @@
186186
<div class="log">
187187
<?php
188188
foreach ( $pulse_posts as $rp ) :
189-
$rp_hash = substr( md5( $rp->post_name ), 0, 6 );
190-
$rp_autojack = (bool) get_post_meta( $rp->ID, '_minimalcode_autojack', true );
189+
$rp_autojack = minimalcode_is_autojack( $rp->ID );
190+
$rp_excerpt = wp_strip_all_tags( get_the_excerpt( $rp ) );
191191
?>
192-
<a class="entry" href="<?php echo esc_url( get_permalink( $rp->ID ) ); ?>">
193-
<span class="entry-hash"><?php echo esc_html( $rp_hash ); ?></span>
192+
<a class="entry<?php echo $rp_autojack ? ' entry--aj' : ''; ?>" href="<?php echo esc_url( get_permalink( $rp->ID ) ); ?>">
194193
<span class="entry-date"><?php echo esc_html( strtoupper( get_the_date( 'M d', $rp->ID ) ) ); ?></span>
195-
<span class="entry-title serif <?php echo $rp_autojack ? 'aj' : ''; ?>"><?php echo esc_html( get_the_title( $rp->ID ) ); ?></span>
194+
<span class="entry-author"><?php echo minimalcode_author_avatar( $rp->ID, 32 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- helper escapes internally. ?></span>
195+
<span class="entry-main">
196+
<span class="entry-title serif"><?php echo esc_html( get_the_title( $rp->ID ) ); ?></span>
197+
<?php if ( $rp_excerpt ) : ?>
198+
<span class="entry-excerpt"><?php echo esc_html( $rp_excerpt ); ?></span>
199+
<?php endif; ?>
200+
</span>
196201
<span class="entry-tags">
197202
<?php if ( $rp_autojack ) : ?>
198203
<span class="tag aj">autojack</span>

search.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,18 @@
4848
<?php
4949
while ( have_posts() ) :
5050
the_post();
51-
$post_hash = substr( md5( get_post_field( 'post_name', get_the_ID() ) ), 0, 6 );
52-
$is_autojack = minimalcode_is_autojack();
53-
$has_thumb = has_post_thumbnail();
51+
$is_autojack = minimalcode_is_autojack();
52+
$entry_excerpt = wp_strip_all_tags( get_the_excerpt() );
5453
?>
55-
<a id="post-<?php the_ID(); ?>" <?php post_class( 'entry' . ( $has_thumb ? ' entry--has-thumb' : '' ) ); ?> href="<?php the_permalink(); ?>">
56-
<?php if ( $has_thumb ) : ?>
57-
<span class="entry-thumb"><?php the_post_thumbnail( 'medium', array( 'loading' => 'lazy', 'alt' => '' ) ); ?></span>
58-
<?php endif; ?>
59-
<span class="entry-hash"><?php echo esc_html( $post_hash ); ?></span>
54+
<a id="post-<?php the_ID(); ?>" <?php post_class( 'entry' . ( $is_autojack ? ' entry--aj' : '' ) ); ?> href="<?php the_permalink(); ?>">
6055
<span class="entry-date"><?php echo esc_html( strtoupper( get_the_date( 'M d' ) ) ); ?></span>
61-
<span class="entry-title serif <?php echo $is_autojack ? 'aj' : ''; ?>"><?php the_title(); ?></span>
56+
<span class="entry-author"><?php echo minimalcode_author_avatar( get_the_ID(), 32 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- helper escapes internally. ?></span>
57+
<span class="entry-main">
58+
<span class="entry-title serif"><?php the_title(); ?></span>
59+
<?php if ( $entry_excerpt ) : ?>
60+
<span class="entry-excerpt"><?php echo esc_html( $entry_excerpt ); ?></span>
61+
<?php endif; ?>
62+
</span>
6263
<span class="entry-tags">
6364
<?php if ( $is_autojack ) : ?>
6465
<span class="tag aj">autojack</span>

0 commit comments

Comments
 (0)