Skip to content

Add profile image#254

Merged
lemon-mint merged 2 commits into
productionfrom
main
Jul 12, 2026
Merged

Add profile image#254
lemon-mint merged 2 commits into
productionfrom
main

Conversation

@lemon-mint

@lemon-mint lemon-mint commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary by Sourcery

Display a real author avatar image in blog post cards instead of a generic placeholder.

New Features:

  • Show a rounded author avatar image in blog post cards using the site icon asset.

Enhancements:

  • Remove the unused gray-300 background utility from the global stylesheet.

@sourcery-ai

sourcery-ai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Implements a profile image for blog post cards by replacing the placeholder avatar circle with a static image and cleaning up unused gray background styling in CSS.

Flow diagram for BlogPostCard profile image rendering

flowchart TD
  User[User views blog post list] --> BlogPostCard[BlogPostCard template]
  BlogPostCard --> AvatarImage[img src /assets/apple-touch-icon.png]
  AvatarImage --> RenderedCard[Rendered blog post card with author avatar]

  CSS[main.css] -.->|removes .bg-gray-300| AvatarImage
Loading

File-Level Changes

Change Details Files
Replace the gray circular placeholder avatar in blog post cards with a real profile image element.
  • Swap the placeholder div avatar for an img tag pointing to /assets/apple-touch-icon.png.
  • Apply sizing and rounded styles via existing utility classes on the img element.
  • Add alt text for the avatar image to improve accessibility.
view/component_blog_post.templ
view/component_blog_post_templ.go
Remove unused gray background color token and utility class now that the avatar no longer depends on it.
  • Delete the CSS variable for gray-300 from the root theme variables.
  • Remove the bg-gray-300 utility class definition from the main stylesheet.
public/main.css

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@lemon-mint lemon-mint merged commit 5e302eb into production Jul 12, 2026
5 checks passed

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • If --color-gray-300 or .bg-gray-300 are still referenced elsewhere, consider keeping or replacing them with an existing gray token to avoid inconsistent styling across components.
  • Consider making the avatar alt text dynamic (e.g., including the author name) so that it conveys more useful information for screen readers.
  • You might want to add loading="lazy" to the avatar image to avoid unnecessary image loads when many blog cards are rendered on the page.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- If `--color-gray-300` or `.bg-gray-300` are still referenced elsewhere, consider keeping or replacing them with an existing gray token to avoid inconsistent styling across components.
- Consider making the avatar `alt` text dynamic (e.g., including the author name) so that it conveys more useful information for screen readers.
- You might want to add `loading="lazy"` to the avatar image to avoid unnecessary image loads when many blog cards are rendered on the page.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the placeholder gray div for the blog post author's avatar with an actual image and removes the unused --color-gray-300 variable and .bg-gray-300 class from the stylesheet. Feedback suggests removing the remaining .dark .bg-gray-300 block to avoid dead CSS, and setting the avatar's alt attribute to empty (alt="") to prevent redundant announcements for screen readers.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

I am having trouble creating individual review comments. Click here to see my feedback.

public/main.css (828-830)

medium

Removing the .bg-gray-300 class leaves .dark .bg-gray-300 on line 1122 as dead CSS. Please remove the .dark .bg-gray-300 block as well to keep the stylesheet clean and maintainable.

view/component_blog_post.templ (18)

medium

Since the author's name is displayed immediately next to the avatar image, the image is redundant for screen readers. Having alt="Author avatar" results in repetitive announcements. It is a best practice for accessibility to use an empty alt attribute (alt="") so screen readers skip the redundant image.

				<img src="/assets/apple-touch-icon.png" class="w-10 h-10 mr-3 rounded-full" alt=""/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant