-
Notifications
You must be signed in to change notification settings - Fork 116
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
changing text align centre #391
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes in this pull request primarily involve updates to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Deploy Preview for manageyourwaste failed. Why did it fail? →
|
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.
Thank you, ambrishgoswami, for creating this pull request and contributing to WasteManagement! 💗
The maintainers will review this Pull Request and provide feedback as soon as possible! 😇
We appreciate your patience and contribution, Keep up the great work! 😀
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (5)
ecotips.html (5)
Line range hint
1-452
: Critical: Remove duplicate HTML structureThe file contains two complete HTML documents merged together, with duplicate
<head>
and<body>
sections. This is invalid HTML and will cause rendering issues.Keep only one complete HTML structure. Remove the duplicate sections (lines 453-857) and merge any unique content from the second section into the first.
Also applies to: 453-857
Line range hint
33-37
: Improve navigation menu accessibilityThe navigation menu lacks ARIA labels and mobile responsiveness indicators.
Enhance the navigation menu:
- <nav> + <nav aria-label="Main navigation"> <ul> <li> - <a href="#eco-tips-container"> + <a href="#eco-tips-container" aria-label="View eco tips"> <i class="fa-brands fa-pagelines"></i> Tips </a> </li>
Line range hint
36-36
: Fix HTML formatting inconsistenciesThere are inconsistent spacing and formatting issues in multiple sections.
Apply consistent formatting:
- Remove extra spaces between attributes
- Maintain consistent indentation
- Ensure proper tag closing positions
Example fix:
- <h2 class="blogs-section-title"style="text-align: center;"> + <h2 class="blogs-section-title"> Essential Eco Blogs: Your Guide to a Greener Tomorrow! </h2>Also applies to: 216-216, 217-217, 218-218
Line range hint
348-391
: Enhance slider script performance and accessibilityThe slider implementation could be improved for better performance and accessibility.
- Add keyboard navigation support
- Implement touch events for mobile
- Add ARIA labels for screen readers
- Use requestAnimationFrame for smooth animations
+ const KEYS = { + LEFT: 'ArrowLeft', + RIGHT: 'ArrowRight' + }; const updateSlider = () => { + requestAnimationFrame(() => { const slideWidth = slides[0].clientWidth; tipsSlider.style.transform = `translateX(-${ currentIndex * slideWidth }px)`; + }); }; + // Add keyboard navigation + document.addEventListener('keydown', (e) => { + if (e.key === KEYS.LEFT) prevSlide.click(); + if (e.key === KEYS.RIGHT) nextSlide.click(); + });
Line range hint
391-452
: Enhance form security and validationThe newsletter form lacks proper security measures and validation.
Add proper form validation and security measures:
- <form id="newsletter-form"> + <form id="newsletter-form" + onsubmit="return validateForm(event)" + autocomplete="off" + novalidate> <input + type="email" + pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" + name="email" placeholder="Your Email" required /> <button type="submit">Subscribe</button> + <div class="error-message" aria-live="polite"></div> </form>
<h2 class="blogs-section-title"style="text-align: center;"> | ||
Essential Eco Blogs: Your Guide to a Greener Tomorrow! | ||
</h2> | ||
<div class="eco-blogs-container"> | ||
<div class="eco-blogs-container" style="text-align: center;"> |
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.
🛠️ Refactor suggestion
Avoid inline styles for layout and positioning
Using inline styles (style="text-align: center;"
) for layout is not recommended as it:
- Reduces maintainability
- Makes it harder to maintain consistent styling across the site
- Mixes presentation with content
Move the styling to your CSS file:
.blogs-section-title,
.eco-blogs-container {
text-align: center;
}
Then remove the inline styles:
- <h2 class="blogs-section-title"style="text-align: center;">
+ <h2 class="blogs-section-title">
Essential Eco Blogs: Your Guide to a Greener Tomorrow!
</h2>
- <div class="eco-blogs-container" style="text-align: center;">
+ <div class="eco-blogs-container">
@@ -18,7 +18,7 @@ | |||
<body> | |||
|
|||
<header> | |||
<h1>WasteManagement</h1> | |||
<h1>Waste Product Management</h1> |
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.
💡 Codebase verification
Title inconsistency detected - "Waste Product Management" appears only once
Based on the search results, the title "Waste Product Management" appears only once in ecotips.html
as an h1
heading, while everywhere else in the codebase (including other parts of the same file) consistently uses "Waste Management". This creates an inconsistency in branding and user experience.
ecotips.html
: Line containing<h1>Waste Product Management</h1>
should be changed to<h1>Waste Management</h1>
to maintain consistency with:- Page titles across all HTML files
- Navigation headers
- Footer text
- Alt text in images
- Company references in content
🔗 Analysis chain
Verify the title change impact
The heading has been changed to "Waste Product Management", but this change needs to be consistent across the site.
Let's verify the title consistency:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for inconsistent titles across the site
echo "Searching for title variations..."
rg -i "waste.*management" --type html
Length of output: 4539
Issues Identification
Closes: #(issue number) #390
Description
Summary
Provide a brief description of what this pull request does and why it is needed.
Details
Include any detailed information about the changes in this pull request.
Types of Changes
Please check the boxes that apply
Checklist
Please check the boxes that apply
Screenshots
If applicable, please attach screenshots of the changes made to the user interface.
Additional Information
Please provide any other information that is relevant to this pull request.
Summary by CodeRabbit
New Features
Improvements