-
Notifications
You must be signed in to change notification settings - Fork 642
chore #2112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore #2112
Conversation
Signed-off-by: codered-lgtm <[email protected]>
Signed-off-by: codered-lgtm <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @codered-lgtm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request introduces changes to the way featured images are handled in the _includes/list-posts.html
and _layouts/page.html
files. The primary goal appears to be to enable support for different images for dark and light themes. It achieves this by adding data-logo-for-dark
and data-logo-for-light
attributes to the <img>
tag, allowing the selection of appropriate images based on the user's theme preference. The PR also includes a conditional check for featured-image-light
to use a different image for the light theme if available, falling back to the default featured-image
if not.
Highlights
- Dark/Light Theme Image Support: The changes introduce support for displaying different featured images based on the user's theme (dark or light).
- HTML Modifications: The
<img>
tag in_includes/list-posts.html
and_layouts/page.html
is modified to includedata-logo-for-dark
anddata-logo-for-light
attributes. - Conditional Logic: Conditional logic is added to check for the existence of
featured-image-light
and use it if available, otherwise defaulting tofeatured-image
.
Changelog
- _includes/list-posts.html
- Modified the
<img>
tag to includeid="logo-dark-light"
,data-logo-for-dark
, anddata-logo-for-light
attributes. - Added conditional logic to use
featured-image-light
if it exists, otherwise usefeatured-image
for the light theme.
- Modified the
- _layouts/page.html
- Modified the
<img>
tag to includeid="logo-dark-light"
,data-logo-for-dark
, anddata-logo-for-light
attributes. - Added conditional logic to use
featured-image-light
if it exists, otherwise usefeatured-image
for the light theme.
- Modified the
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A theme's dark or light,
Images change in the night,
Data attributes gleam,
A designer's dream,
Visuals, a delightful sight.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
✅ Deploy Preview for mesheryio-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The changes introduce the ability to use different images for dark and light modes. The implementation involves adding data-logo-for-dark
and data-logo-for-light
attributes to the img
tag and using these attributes to switch between images based on the user's theme preference. This is a useful feature for improving the user experience on different themes.
Merge Readiness
The code changes seem reasonable. I recommend having another reviewer look at the javascript code that handles the switching of images based on the theme to ensure there are no performance or compatibility issues. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.
<img | ||
id="logo-dark-light" | ||
data-logo-for-dark="{{- post.featured-image | relative_url -}}" | ||
data-logo-for-light="{%- if post.featured-image-light -%}{{- post.featured-image-light | relative_url -}}{%- else -%}{{- post.featured-image | relative_url -}}{% endif %}" src="{{- post.featured-image | relative_url -}}" alt="" class="featured-image"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a descriptive alt
attribute to the img
tag. This improves accessibility for users who rely on screen readers and provides context when the image cannot be loaded.
<img | |
id="logo-dark-light" | |
data-logo-for-dark="{{- post.featured-image | relative_url -}}" | |
data-logo-for-light="{%- if post.featured-image-light -%}{{- post.featured-image-light | relative_url -}}{%- else -%}{{- post.featured-image | relative_url -}}{% endif %}" src="{{- post.featured-image | relative_url -}}" alt="" class="featured-image"> | |
<img | |
id="logo-dark-light" | |
data-logo-for-dark="{{- post.featured-image | relative_url -}}" | |
data-logo-for-light="{%- if post.featured-image-light -%}{{- post.featured-image-light | relative_url -}}{%- else -%}{{- post.featured-image | relative_url -}}{% endif %}" src="{{- post.featured-image | relative_url -}}" alt="{{ post.title }} Featured Image" class="featured-image"> |
data-logo-for-dark="{{- post.featured-image | relative_url -}}" | ||
data-logo-for-light="{%- if post.featured-image-light -%}{{- post.featured-image-light | relative_url -}}{%- else -%}{{- post.featured-image | relative_url -}}{% endif %}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a descriptive alt
attribute to the img
tag. This improves accessibility for users who rely on screen readers and provides context when the image cannot be loaded.
data-logo-for-dark="{{- post.featured-image | relative_url -}}" | |
data-logo-for-light="{%- if post.featured-image-light -%}{{- post.featured-image-light | relative_url -}}{%- else -%}{{- post.featured-image | relative_url -}}{% endif %}" | |
data-logo-for-dark="{{- post.featured-image | relative_url -}}" | |
data-logo-for-light="{%- if post.featured-image-light -%}{{- post.featured-image-light | relative_url -}}{%- else -%}{{- post.featured-image | relative_url -}}{% endif %}" | |
src="{{- page.featured-image | relative_url -}}" alt="{{ page.title }} Featured Image" class="featured-image"> |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue. |
Description
This PR fixes 2110
Notes for Reviewers
Signed commits