Skip to content

Conversation

@sinon
Copy link
Owner

@sinon sinon commented Aug 30, 2025

No description provided.

@sinon sinon requested a review from Copilot August 30, 2025 16:24
@github-actions
Copy link

PR Preview Action v1.6.1

🚀 View preview at
https://sinon.github.io/pr-preview/pr-16/

Built to branch gh-pages at 2025-08-30 16:24 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR disables the reading time display (clock icon and duration) for TIL (Today I Learned) posts by adding CSS rules that hide these elements when displayed on TIL-related pages or sections.

  • Adds conditional CSS styling to hide reading time elements on TIL posts
  • Implements the hiding functionality in both section and individual page templates
  • Uses CSS display: none !important to ensure the clock icon and reading time text are not visible

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
templates/section.html Adds CSS to hide reading time on TIL section pages with conditional class application
templates/page.html Adds CSS to hide reading time on individual TIL pages based on path detection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}
</style>

<div class="section-content{% if section.title == 'TILs' or 'til' in section.slug %} tils-section{% endif %}">
Copy link

Copilot AI Aug 30, 2025

Choose a reason for hiding this comment

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

The condition 'til' in section.slug will always evaluate to True because it's not properly grouped with the first condition. It should be (section.title == 'TILs') or ('til' in section.slug) to work as intended.

Suggested change
<div class="section-content{% if section.title == 'TILs' or 'til' in section.slug %} tils-section{% endif %}">
<div class="section-content{% if (section.title == 'TILs') or ('til' in section.slug) %} tils-section{% endif %}">

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +10
<style>
.tils-section .muted svg.i-clock,
.tils-section .muted svg.i-clock+span {
display: none !important;
}
</style>

Copy link

Copilot AI Aug 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Inline styles in templates should be avoided. Consider moving this CSS to a separate stylesheet or using a more maintainable approach like CSS classes that can be conditionally applied.

Suggested change
<style>
.tils-section .muted svg.i-clock,
.tils-section .muted svg.i-clock+span {
display: none !important;
}
</style>

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +10
<style>
.muted svg.i-clock,
.muted svg.i-clock+span {
display: none !important;
}
</style>
Copy link

Copilot AI Aug 30, 2025

Choose a reason for hiding this comment

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

This CSS rule is duplicated between templates/section.html and templates/page.html. Consider extracting this to a shared CSS file or creating a reusable template block to avoid code duplication.

Suggested change
<style>
.muted svg.i-clock,
.muted svg.i-clock+span {
display: none !important;
}
</style>
{% include "shared/muted-clock-style.html" %}

Copilot uses AI. Check for mistakes.
@sinon sinon merged commit d1ceb1b into main Aug 30, 2025
6 checks passed
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.

2 participants