Skip to content

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

Closed
Closed

chore #2112

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion _includes/list-posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ <h2><a href="{% include relative-src.html src=post.url %}">{{ post.title }}</a><
{% include post-title.html post=post %}
<div class="post-content">
{%- if post.featured-image -%}
<img 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="" class="featured-image">
Comment on lines +8 to +11
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

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.

Suggested change
<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">

{%- else -%}
<!-- {%- assign postImage = "/assets/images/image-default.jpg" -%}
<img src="{{- postImage | relative_url -}}" alt="" class="featured-image"> -->
Expand Down
6 changes: 5 additions & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<section class="page">
<div class="container {% if page.full_width %}max-container{% endif %}">
{%- if page.featured-image -%}
<img src="{{- page.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 %}"
Comment on lines +10 to +11
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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">

src="{{- page.featured-image | relative_url -}}" alt="" class="featured-image">
{%- endif -%}

{% if page.name %}
Expand Down
Loading