Skip to content

Add news pages, 404 error page, and motion blur effect; update footer…#9

Merged
5RoD merged 1 commit intomasterfrom
dev
Apr 30, 2025
Merged

Add news pages, 404 error page, and motion blur effect; update footer…#9
5RoD merged 1 commit intomasterfrom
dev

Conversation

@5RoD
Copy link
Owner

@5RoD 5RoD commented Apr 30, 2025

Updates to the front-end and back-end of the BLD e-Sports website, focusing on new features, improved styling, and enhanced user experience. Key changes include the addition of a news section, updates to the 404 error page, and various CSS enhancements for animations and layouts.

Front-End Features:

  • Added a new "News" section on the homepage, featuring interactive cards highlighting recent updates and announcements. Each card links to a dedicated news page. (public/html/home.php, public/css/style.css, public/html/news/news-1.php, public/html/news/news-2.php, public/html/news/news-3.php, public/html/news/news-4.php) [1] [2] [3] [4]
  • Created a new 404 error page with a styled layout and a message guiding users back to the homepage. (public/html/404.php, public/css/style.css) [1] [2]

CSS Enhancements:

  • Introduced smooth scrolling and improved overflow behavior for the html element. (public/css/style.css)
  • Removed the outdated "blur breathing" animation and replaced it with modern animations for interactive elements like cards in the news section. (public/css/style.css) [1] [2]
  • Added styles for new components, including .news, .card, .news-article, and .forOfor, to enhance the visual appeal of the website. (public/css/style.css) [1] [2]

Back-End Updates:

  • Simplified the routing logic in index.php to improve maintainability and ensure proper fallback to the 404 page. (public/html/index.php)

Content Updates:

  • Updated player descriptions and alt attributes for images on the homepage to improve accessibility and SEO. (public/html/home.php)… and header links and a ton of other stuff

Summary by CodeRabbit

  • New Features

    • Introduced a custom 404 error page with animated illustration and user guidance.
    • Added a news section and interactive news cards to the homepage.
    • Published the first news article with detailed content and styling.
    • Implemented a scroll-based motion blur effect for enhanced user experience.
  • Enhancements

    • Improved homepage structure and accessibility, including descriptive image alt text.
    • Updated the newsletter signup form to require only an email address.
    • Footer now links directly to the GitHub repository.
  • Style

    • Extensive new styles for news cards, 404 page animation, and layout improvements.
    • Removed unused blur animation and adjusted scrolling behavior.
  • Bug Fixes

    • Corrected footer image tag syntax.
  • Chores

    • Removed unused password validation script.
    • Updated navigation menu and meta tags for improved usability and accessibility.

@coderabbitai
Copy link

coderabbitai bot commented Apr 30, 2025

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

📥 Commits

Reviewing files that changed from the base of the PR and between 8750903 and 3c0dfef.

⛔ Files ignored due to path filters (6)
  • public/images/news/BLD-PARTNERSHIP-razer.png is excluded by !**/*.png
  • public/images/news/BLD-vct-won.png is excluded by !**/*.png
  • public/images/news/cubert-academy.png is excluded by !**/*.png
  • public/images/news/worldcuppartner.jpeg is excluded by !**/*.jpeg
  • public/images/svg/404-error-with-portals-not-css.svg is excluded by !**/*.svg
  • public/images/svg/clock.svg is excluded by !**/*.svg
📒 Files selected for processing (14)
  • .idea/discord.xml (1 hunks)
  • public/css/style.css (4 hunks)
  • public/html/404.php (1 hunks)
  • public/html/home.php (3 hunks)
  • public/html/index.php (1 hunks)
  • public/html/news/news-1.php (1 hunks)
  • public/html/news/news-2.php (1 hunks)
  • public/html/news/news-3.php (1 hunks)
  • public/html/news/news-4.php (1 hunks)
  • public/html/signup.php (1 hunks)
  • public/includes/footer.php (1 hunks)
  • public/includes/header.php (1 hunks)
  • public/js/motionBlur.js (1 hunks)
  • public/js/passwordChecking.js (0 hunks)
 ______________________________________________________________________________
< Dr. CodeRabbit, or: How I Learned to Stop Worrying and Love the Code Review. >
 ------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

Tip

You can disable poems in the walkthrough.

Disable the reviews.poem setting in your project's settings in CodeRabbit to disable the poems in the walkthrough.

✨ Finishing Touches
  • 🔥 Error while generating docstrings. (🔄 Check again to generate docstrings again)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@5RoD 5RoD requested a review from Copilot April 30, 2025 18:39
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 introduces new UI features by removing the unused password validation script and adding a scroll-based motion blur effect to enhance the visual experience.

  • Removed the deprecated password validation script.
  • Added a new motion blur effect script to enhance scrolling aesthetics.

Reviewed Changes

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

File Description
public/js/passwordChecking.js Deleted the unused password validation script.
public/js/motionBlur.js Added a motion blur effect with scroll and smooth anchor handling.
Files not reviewed (12)
  • .idea/discord.xml: Language not supported
  • public/css/style.css: Language not supported
  • public/html/404.php: Language not supported
  • public/html/home.php: Language not supported
  • public/html/index.php: Language not supported
  • public/html/news/news-1.php: Language not supported
  • public/html/news/news-2.php: Language not supported
  • public/html/news/news-3.php: Language not supported
  • public/html/news/news-4.php: Language not supported
  • public/html/signup.php: Language not supported
  • public/includes/footer.php: Language not supported
  • public/includes/header.php: Language not supported

@@ -0,0 +1,34 @@
// Made with CHATGPT its a scroll motionblur effect
Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider revising this comment for clarity and proper case (e.g., 'Made with ChatGPT: Scroll motion blur effect') to align with coding style guidelines.

Suggested change
// Made with CHATGPT its a scroll motionblur effect
// Made with ChatGPT: Scroll motion blur effect

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +34
// Remove blur after a brief delay
setInterval(() => {
document.body.style.filter = 'blur(0)';
}, 100);
Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

Using setInterval to remove the blur effect every 100ms may be unnecessarily resource-intensive; consider using a debounced approach to clear the blur after scrolling has stopped.

Suggested change
// Remove blur after a brief delay
setInterval(() => {
document.body.style.filter = 'blur(0)';
}, 100);
// Debounced function to remove blur after scrolling stops
const debounce = (func, delay) => {
let timeout;
return (...args) => {
clearTimeout(timeout);
timeout = setTimeout(() => func(...args), delay);
};
};
const removeBlurEffect = debounce(() => {
document.body.style.filter = 'blur(0)';
}, 100);
// Attach debounced blur reset to scroll event
window.addEventListener('scroll', removeBlurEffect);

Copilot uses AI. Check for mistakes.
@coderabbitai
Copy link

coderabbitai bot commented Apr 30, 2025

Caution

No docstrings were generated.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 16

🔭 Outside diff range comments (6)
public/html/news/news-3.php (1)

1-2: ⚠️ Potential issue

Missing content and PHP closing tag.

This file appears to be a placeholder for a future news article that's linked from the homepage news section, but currently only contains a PHP opening tag without any content or closing tag.

Consider either:

  1. Adding the actual news article content with proper HTML structure, or
  2. Creating a complete template with proper structure that can be filled in later:
 <?php
+include_once('../includes/header.php');
+?>
+
+<div class="news-article">
+    <h1>News Article Title</h1>
+    <div class="news-content">
+        <!-- Article content goes here -->
+        <p>Article content placeholder...</p>
+    </div>
+</div>
+
+<?php
+include_once('../includes/footer.php');
+?>
public/html/news/news-2.php (2)

1-2: ⚠️ Potential issue

Missing content and PHP closing tag.

This file appears to be a placeholder for a future news article that's linked from the homepage news section, but currently only contains a PHP opening tag without any content or closing tag.

Consider either:

  1. Adding the actual news article content with proper HTML structure, or
  2. Creating a complete template with proper structure that can be filled in later:
 <?php
+include_once('../includes/header.php');
+?>
+
+<div class="news-article">
+    <h1>News Article Title</h1>
+    <div class="news-content">
+        <!-- Article content goes here -->
+        <p>Article content placeholder...</p>
+    </div>
+</div>
+
+<?php
+include_once('../includes/footer.php');
+?>

1-2: 💡 Verification agent

🧩 Analysis chain

Inconsistency between news files.

According to the AI summary, news-1.php contains a fully developed article, while news-2.php, news-3.php, and news-4.php are empty placeholders. This inconsistency could confuse users who click on news cards expecting content.


🌐 Web query:

What is the best practice for placeholder pages in a website?

💡 Result:

Best Practices for Website Placeholder Pages

Placeholder pages—whether for empty states, under-construction sections, or awaiting content—play an important role in the user experience. The following best practices are recommended for designing effective and user-friendly placeholder pages:

Make Placeholders Helpful and Inviting

  • Use engaging, friendly imagery or illustrations to fill what would otherwise be an empty, intimidating space. This helps reassure users and makes the interface feel more welcoming[4].
  • Provide concise, relevant messaging. Clearly communicate the page’s purpose, status (e.g., “Coming Soon”), or what the user can expect in the future[4].
  • Offer helpful next steps. Instead of leaving users at a dead end, guide them to actions they can take (like exploring other features, returning home, or completing setup)[4].

Avoid User Confusion

  • Do not use generic or vague placeholders. Tailor the content so that users always know where they are and why the page is empty or incomplete[7][8].
  • Never use placeholders as a substitute for permanent content or navigation. Make it clear the page is intentionally incomplete, not broken[4].

Accessibility and Usability

  • Ensure adequate color contrast for placeholder text or graphics, aiming for at least a 4.5:1 contrast ratio to meet WCAG accessibility standards[3][6].
  • Avoid using only placeholder text inside form fields without labels. Labels should remain visible, as placeholders disappear once the user starts typing, potentially causing confusion or accessibility issues, particularly for users of screen readers or those with cognitive disabilities[2][3][6].
  • If using example or instructional text, make it concise and directly relevant to the end-user’s context[6][8].

Content and Onboarding

  • Consider using example or starter content instead of leaving areas completely blank. For instance, email services will auto-populate a new inbox with welcome emails to guide users[4].
  • Offer onboarding tutorials or tooltips on placeholder pages to familiarize users with what will appear or how to interact with the section when it’s live[4].

Additional Tips

  • Disable or hide buttons that are not actionable, so users aren’t frustrated by features that are not yet available[4].
  • Whenever possible, engage users with alternative recommendations if the primary content is not yet available (“Try this other feature while you wait”)[4].

Summary Table: Do's and Don'ts for Placeholder Pages

Do Don't
Use inviting visuals and tailored messages Leave the page blank or with generic “Coming Soon”
Provide actionable next steps or alternatives Allow users to get stuck at a dead-end
Maintain high contrast and accessibility Use low-contrast or inaccessible placeholders
Keep placeholders concise and relevant Use placeholders as permanent navigation or labels
Guide users with examples and onboarding Present unactionable features or buttons

By following these practices, placeholder pages can enhance the user journey, set appropriate expectations, and keep users engaged as your website evolves[4][6][8].

Citations:


Add meaningful placeholder content for empty news pages

The files public/html/news/news-2.php, news-3.php, and news-4.php are currently blank, which will confuse users clicking through from the news overview. Instead of leaving them empty, provide a clear “Coming Soon” or “Under Construction” message with next-step links.

• Display an engaging illustration or icon
• Include concise text such as “This article is coming soon” or “Stay tuned for updates”
• Offer navigation options (e.g. link back to the news overview or homepage)
• Ensure accessibility (proper heading structure, sufficient color contrast)

Example snippet for each placeholder page:

<?php
  $pageTitle = 'News – Coming Soon';
  include '../partials/header.php';
?>
<main aria-labelledby="coming-soon-heading">
  <h1 id="coming-soon-heading">Coming Soon</h1>
  <p>We’re working on this story—check back soon or explore our <a href="/news">news overview</a>.</p>
  <img src="/assets/images/placeholder-news.svg" alt="Under construction illustration">
</main>
<?php include '../partials/footer.php'; ?>
public/html/news/news-4.php (1)

1-2: 🛠️ Refactor suggestion

Complete the news-4.php file with proper structure

This file is currently just a placeholder with only a PHP opening tag. For consistency and to avoid errors if accessed directly, it should include proper HTML structure and either placeholder content or actual news content.

 <?php
+// Include header
+include_once('../../includes/header.php');
+?>
+
+<title>BLD E-Sports - News Article</title>
+
+<div class="news-article">
+    <h1>News Title Placeholder</h1>
+    <p class="date">April 15, 2025</p>
+    
+    <div class="content">
+        <p>Content placeholder. Replace with actual news content.</p>
+    </div>
+</div>
+
+<?php
+// Include footer
+include_once('../../includes/footer.php');
+?>
public/includes/header.php (2)

8-9: ⚠️ Potential issue

Add missing title tag

According to the AI summary, the page title tag has been removed. A title tag is essential for SEO, browser tabs, and accessibility (screen readers). Each page should have a unique and descriptive title.

    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Cal+Sans&display=swap" rel="stylesheet">
+    <title>BLD E-Sports</title>
</head>

19-22: 🛠️ Refactor suggestion

Fix non-functioning navigation links

Most of the navigation links are using non-functional placeholder "#" URLs. For proper site navigation, these should link to their respective pages using the same format as the signup link.

-        <div class="nav-item"><a href="#">Home</a></div>
-        <div class="nav-item"><a href="#">Team</a></div>
-        <div class="nav-item"><a href="#">Matches</a></div>
+        <div class="nav-item"><a href="index.php?page=home">Home</a></div>
+        <div class="nav-item"><a href="index.php?page=team">Team</a></div>
+        <div class="nav-item"><a href="index.php?page=matches">Matches</a></div>
         <div class="nav-item"><a href="index.php?page=signup">Signup</a></div>
🧹 Nitpick comments (26)
.idea/discord.xml (1)

1-14: IDE configuration file not needed in version control.

This is an IntelliJ IDEA configuration file for Discord integration that contains personal IDE settings. These types of files are typically excluded from version control as they're specific to individual developer environments.

Consider adding this file to .gitignore to prevent personal IDE configuration files from being committed to the repository.

# Add to .gitignore
+.idea/
public/js/motionBlur.js (2)

1-1: Remove comment about code generation source.

Comments should focus on explaining the code's purpose and functionality rather than mentioning how it was created.

-// Made with CHATGPT its a scroll motionblur effect
+// Scroll-based motion blur effect that applies blur proportional to scroll speed

1-35: Consider providing an option to disable the effect.

Motion blur effects can cause accessibility issues for users with vestibular disorders or motion sensitivity.

Add a user preference option or respect the user's reduced motion settings:

 // Made with CHATGPT its a scroll motionblur effect
 let lastScrollY = window.scrollY;
+
+// Check if the user prefers reduced motion
+const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
 
 // Smooth transition for the blur effect
 document.body.style.transition = 'filter 0.1s ease-out';
 
 // Function to apply blur
 const applyBlurEffect = () => {
+    if (prefersReducedMotion) return;
     let blur = Math.min(Math.abs(lastScrollY - window.scrollY) / 10, 5);
     document.body.style.filter = `blur(${blur}px)`;
 };
public/html/signup.php (2)

4-6: Form purpose and action mismatch

The form heading has been updated to "Newsletter subscription", but the form action still uses "index.php?page=signup". Consider updating the action URL to match the new purpose of the form.

-        <form action="index.php?page=signup" method="POST" class="signup-form">
+        <form action="index.php?page=newsletter" method="POST" class="signup-form">

11-12: Enhance user guidance on spam prevention

The added message about emails potentially going to spam is helpful, but could be more actionable.

-            <p>Emails may sometimes go into spam</p>
+            <p>Emails may sometimes go into spam. Please add our email address to your contacts to prevent this.</p>
public/html/404.php (2)

1-1: Consider using a more appropriate section class

The "news-article" class is used for this 404 page, which semantically doesn't align with the content purpose.

-<section class="news-article">
+<section class="error-page">

Note: This change would require adding corresponding CSS styles for the new "error-page" class.


12-12: Style the navigation link as a button for better UX

The link to return to the homepage could be styled as a prominent button for better user experience.

-            <div class="nav-item"><a href="index.php?page=home">Go back</a></div>
+            <div class="nav-item"><a href="index.php?page=home" class="btn-main">Return to Homepage</a></div>
public/html/home.php (2)

53-53: Alt text duplicates visible text content

The alt text for news images duplicates the text that's already visible in the paragraph above each image. Consider more descriptive or complementary alt text.

- <a href="index.php?page=news/news-1"><img src="../images/news/worldcuppartner.jpeg" alt="BLD named as Esports World Cup Foundation Partner"></a>
+ <a href="index.php?page=news/news-1"><img src="../images/news/worldcuppartner.jpeg" alt="BLD and Esports World Cup logos side by side"></a>

Also applies to: 57-57, 61-61, 65-65


70-72: Remove or utilize the empty script tag

An empty script tag has been added but contains no code. This should either be removed or filled with actual JavaScript.

-<script>
-
-</script>
public/css/style.css (17)

1-4: Avoid using !important on smooth scrolling
Using !important here can conflict with user preferences and other styles. Instead, rely on selector specificity or feature-detect smooth scrolling.


183-187: Consider responsive padding for the News section
Hardcoded padding: 20px 10px; works, but you may want to switch to relative units (e.g., rem) or adjust at breakpoints for mobile layouts.


251-265: Simplify hover transform logic on .main:hover
The cascading transforms for each card could be driven by CSS variables or nth-child selectors, reducing repetition.


284-287: Beware performance of CSS filter: blur() on hover
Applying filter: blur(3px) to non-hovered cards can be GPU-intensive on lower-powered devices. Consider a simpler opacity fade or pointer-event block instead.


289-294: Reconsider use of height: 30vmax
Viewport-based sizing (vmax) may yield unpredictable layouts on very tall or wide screens. A percentage-based height or min/max constraints could be more consistent.


296-307: Optimize heavy backdrop-filter on .card img
backdrop-filter: blur(4px) is visually rich but costly. Provide a fallback or limit this effect to supported browsers.


309-321: Merge #c4 img with .card img
These two selectors duplicate nearly identical rules. Combine them under the shared rule and use a modifier class for the one different box-shadow.


326-329: Ensure consistent vertical rhythm in .news-article
padding: 50px 10px 30px 10px; may feel uneven. Consider symmetric top/bottom padding or use variables to maintain spacing scale.


331-339: Normalize button padding in news links
padding: 7px 66px; is very wide. For consistency with other buttons, switch to padding: .5rem 1rem; or CSS variables.


361-369: Tone down excessive text-shadow on article paragraphs
text-shadow: 0 0 30px 20px rgba(0,0,0,1); can reduce readability. Consider a subtler shadow or none.


371-379: Same for .news-article h1 text-shadow
The strong glow makes text hard to read; reduce blur & opacity or remove.


392-395: Nit: Indent and whitespace in .news-card-text
Adjust indentation on padding: 30px 30px; for consistency with surrounding rules.


530-541: DRY up .signup & .forOfor sections
These containers duplicate nearly the same background and flex centering. Extract a common utility class (e.g., .full-screen-center) to avoid two definitions.


551-554: Clarify purpose of .clock
Setting a 10×10px block without context may be placeholder. Add a comment or adjust size/units for production.


600-614: Standardize keyframes naming & cleanup
Use kebab-case (e.g., @keyframes float) and remove redundant opacity declarations in frames where it doesn't change.


616-644: Simplify heartbeat keyframes
You can collapse repeated segments (e.g., 30%–40% and 60%–100% share the same transform). Fewer breakpoints improve readability.


646-658: Validate need for wind keyframes
This slight rotation may go unnoticed. If it’s essential for the 404 page, fine; otherwise consider removing or simplifying for performance.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8750903 and 3c0dfef.

⛔ Files ignored due to path filters (6)
  • public/images/news/BLD-PARTNERSHIP-razer.png is excluded by !**/*.png
  • public/images/news/BLD-vct-won.png is excluded by !**/*.png
  • public/images/news/cubert-academy.png is excluded by !**/*.png
  • public/images/news/worldcuppartner.jpeg is excluded by !**/*.jpeg
  • public/images/svg/404-error-with-portals-not-css.svg is excluded by !**/*.svg
  • public/images/svg/clock.svg is excluded by !**/*.svg
📒 Files selected for processing (14)
  • .idea/discord.xml (1 hunks)
  • public/css/style.css (4 hunks)
  • public/html/404.php (1 hunks)
  • public/html/home.php (3 hunks)
  • public/html/index.php (1 hunks)
  • public/html/news/news-1.php (1 hunks)
  • public/html/news/news-2.php (1 hunks)
  • public/html/news/news-3.php (1 hunks)
  • public/html/news/news-4.php (1 hunks)
  • public/html/signup.php (1 hunks)
  • public/includes/footer.php (1 hunks)
  • public/includes/header.php (1 hunks)
  • public/js/motionBlur.js (1 hunks)
  • public/js/passwordChecking.js (0 hunks)
💤 Files with no reviewable changes (1)
  • public/js/passwordChecking.js
🔇 Additional comments (8)
public/includes/footer.php (1)

9-10: Great improvement on footer links and HTML syntax

Updating the GitHub link from a placeholder to the actual repository URL and fixing the img tag's syntax improves both user experience and code quality.

public/html/index.php (2)

11-16: Simplified file existence check looks good

The simplified conditional check for file existence and proper fallback to the 404 page is well-implemented and improves code readability.


21-21: Motion blur script addition aligns with PR objectives

The addition of the motion blur script supports the PR objective of implementing "modern animations" and improving the visual appeal of the website.

public/html/news/news-1.php (1)

34-34:

Details

✅ Verification successful

Verify the anchor link destination

The navigation link includes an anchor "#c1" which might not exist on the home page, potentially leading to a confusing user experience.


🏁 Script executed:

#!/bin/bash
# Check if the home page contains an element with id="c1"
grep -n 'id="c1"' public/html/home.php

Length of output: 82


Valid anchor link confirmed – no changes needed

The element with id="c1" exists on public/html/home.php (line 51), so the “Go back” link will navigate correctly.

public/html/home.php (2)

1-7: Good implementation of proper document structure

Adding a complete HTML document structure with appropriate meta tags is a good practice for SEO and browser rendering.


24-24: Improved alt text for better accessibility

The alt attributes for player images now include both role and name, which is more descriptive and better for accessibility.

Also applies to: 29-29, 34-34

public/css/style.css (2)

341-346: Hover styles for news links look good
No issues spotted; the transition and box-shadow provide clear feedback.


382-391: Approve base styling for .news-card
This block reuses the hexagon background nicely and scales.

Comment on lines +31 to +34
// Remove blur after a brief delay
setInterval(() => {
document.body.style.filter = 'blur(0)';
}, 100);
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Inefficient blur reset method.

Using setInterval to continuously reset the blur effect every 100ms wastes resources, especially when the user isn't scrolling.

Replace the interval with a debounced function that only runs after scrolling stops:

-// Remove blur after a brief delay
-setInterval(() => {
-    document.body.style.filter = 'blur(0)';
-}, 100);
+// Remove blur after scrolling stops
+let scrollTimeout;
+window.addEventListener('scroll', () => {
+    clearTimeout(scrollTimeout);
+    scrollTimeout = setTimeout(() => {
+        document.body.style.filter = 'blur(0)';
+    }, 150);
+});
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Remove blur after a brief delay
setInterval(() => {
document.body.style.filter = 'blur(0)';
}, 100);
// Remove blur after scrolling stops
let scrollTimeout;
window.addEventListener('scroll', () => {
clearTimeout(scrollTimeout);
scrollTimeout = setTimeout(() => {
document.body.style.filter = 'blur(0)';
}, 150);
});

Comment on lines +19 to +29
// Handle anchor link clicks for smooth scroll
document.addEventListener('click', (e) => {
if (e.target.tagName === 'A') {
e.preventDefault();
let target = document.getElementById(e.target.getAttribute('href').slice(1));
if (target) {
window.scrollTo({ top: target.offsetTop, behavior: 'smooth' });
applyBlurEffect();
}
}
});
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Anchor link handling prevents normal link navigation.

The code prevents all anchor tags from their default behavior, including external links or links to other pages, by calling preventDefault() on all link clicks. It also doesn't check if the href attribute exists before accessing it.

Modify the code to only intercept internal anchor links (those starting with #):

 // Handle anchor link clicks for smooth scroll
 document.addEventListener('click', (e) => {
-    if (e.target.tagName === 'A') {
+    const target = e.target.closest('a');
+    if (target && target.getAttribute('href') && target.getAttribute('href').startsWith('#')) {
         e.preventDefault();
-        let target = document.getElementById(e.target.getAttribute('href').slice(1));
-        if (target) {
-            window.scrollTo({ top: target.offsetTop, behavior: 'smooth' });
+        const targetElement = document.getElementById(target.getAttribute('href').slice(1));
+        if (targetElement) {
+            window.scrollTo({ top: targetElement.offsetTop, behavior: 'smooth' });
             applyBlurEffect();
         }
     }
 });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Handle anchor link clicks for smooth scroll
document.addEventListener('click', (e) => {
if (e.target.tagName === 'A') {
e.preventDefault();
let target = document.getElementById(e.target.getAttribute('href').slice(1));
if (target) {
window.scrollTo({ top: target.offsetTop, behavior: 'smooth' });
applyBlurEffect();
}
}
});
// Handle anchor link clicks for smooth scroll
document.addEventListener('click', (e) => {
const target = e.target.closest('a');
if (target && target.getAttribute('href') && target.getAttribute('href').startsWith('#')) {
e.preventDefault();
const targetElement = document.getElementById(target.getAttribute('href').slice(1));
if (targetElement) {
window.scrollTo({ top: targetElement.offsetTop, behavior: 'smooth' });
applyBlurEffect();
}
}
});

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BLD e-Sports Team</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Remove user-scalable=no for accessibility compliance

Disabling user zooming with user-scalable=no creates significant accessibility issues. Users with visual impairments often rely on zooming to read content, and this change prevents that functionality. This also violates WCAG 2.1 success criterion 1.4.4 (Resize text).

-    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta name="viewport" content="width=device-width, initial-scale=1">

🌐 Web query:

WCAG accessibility requirements for user zoom and scaling

💡 Result:

WCAG Accessibility Requirements for User Zoom and Scaling

WCAG (Web Content Accessibility Guidelines) includes several important requirements regarding user zoom and scaling to ensure digital content is accessible to everyone, including people with visual impairments. Here's a comprehensive overview:

Core Requirements

1.4.4 Resize Text (AA)

  • Text must be resizable up to 200% without loss of content or functionality
  • Should work without requiring assistive technology
  • Content should reflow appropriately when zoomed
  • No horizontal scrolling should be required at standard screen widths

1.4.10 Reflow (AA)

  • Content must reflow when zoomed to 400% at 1280px width
  • All content and functionality must remain available
  • Only one dimension of scrolling should be required (typically vertical)
  • Exception: content that requires two-dimensional layout (like maps, diagrams)

1.4.12 Text Spacing (AA)

  • Content must accommodate these spacing adjustments without loss:
    • Line height at least 1.5 times font size
    • Spacing after paragraphs at least 2 times font size
    • Letter spacing at least 0.12 times font size
    • Word spacing at least 0.16 times font size

Technical Implementation Guidelines

To properly comply with these requirements:

  • Never disable browser zoom capabilities with viewport meta tags that include user-scalable=no or maximum-scale=1.0
  • Use relative units (%, em, rem) rather than fixed units (px) for text
  • Implement responsive design techniques
  • Test your website at various zoom levels (200% and 400%)
  • Ensure breakpoints accommodate zoomed content properly
  • Use CSS that allows for fluid layouts (Flexbox, Grid)

Common Implementation Mistakes

  • Using fixed container widths that create horizontal scrolling
  • Implementing overlapping content when zoomed
  • Creating modals or menus that become inaccessible at higher zoom levels
  • Using absolute positioning that breaks when text is enlarged
  • Hiding content off-screen when zoomed

These WCAG requirements help ensure that users who need larger text or different spacing can access digital content effectively, which is essential for those with low vision, cognitive disabilities, or other visual processing needs.


Remove user-scalable=no to restore zoom functionality for accessibility compliance

Disallowing zoom via user-scalable=no prevents users from resizing text up to 200% (WCAG 2.1 SC 1.4.4) and reflowing content correctly (SC 1.4.10), creating barriers for those with low vision.

Please update the viewport meta tag as follows:

• File: public/includes/header.php
Line: 4

-    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=1">

$page = isset($_GET['page']) ? basename($_GET['page']) : 'home';

// check if the page ends with .php
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Add proper input validation for security

The code no longer uses basename() to sanitize the page parameter. This could introduce a path traversal vulnerability if not properly validated. Always sanitize user inputs to prevent security issues.

-$page = isset($_GET['page']) ? $_GET['page'] : 'home';
+$page = isset($_GET['page']) ? basename($_GET['page']) : 'home';

🏁 Script executed:

#!/bin/bash
# Check if there's any validation of the $_GET['page'] parameter elsewhere in the codebase

# Search for sanitization or validation of the page parameter
echo "Searching for page parameter validation in PHP files..."
rg -t php "\\\$_GET\['page'\]" --after-context=3 --before-context=3

Length of output: 531


Enforce input sanitization on $_GET['page'] to prevent path traversal

The page parameter is used directly to build a filename and isn’t sanitized anywhere else in the codebase. An attacker could supply directory traversal sequences and potentially include unintended files. At minimum, strip any directory components before appending the “.php” extension, or—better yet—compare against a whitelist of allowed page names.

Locations needing update:

  • public/html/index.php (around line 9)

Suggested change:

--- public/html/index.php
@@ -9,7 +9,7 @@
 // Default page is set to 'home'
- $page = isset($_GET['page']) ? $_GET['page'] : 'home';
+ $page = isset($_GET['page']) ? basename($_GET['page']) : 'home';
  $page_file = $page . '.php';

  if (file_exists($page_file)) {

For stronger security, replace the basename() call with a lookup against an explicit list of valid pages (e.g., in_array($page, ['home','about','contact'], true)).

Comment on lines +6 to 13
<form action="index.php?page=signup" method="POST" class="signup-form">
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" name="email" placeholder="Email" required aria-required="true">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" placeholder="Password" required aria-required="true"
pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$">
<small class="password-hint">Password must be at least 8 characters long with uppercase, lowercase, number, and special character.</small>
</div>
<div class="form-group">
<label for="password_confirm">Confirm Password</label>
<input type="password" id="password_confirm" name="password_confirm" placeholder="Confirm Password" required aria-required="true">
</div>
<button type="submit">Sign Up</button>
<p>Emails may sometimes go into spam</p>
</form>
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider adding feedback and security mechanisms

The form lacks visual feedback for successful submission and CSRF protection.

Consider adding:

  1. A success message or redirect after form submission
  2. CSRF token for better security
  3. A privacy policy reference since you're collecting email addresses

Example implementation:

         <form action="index.php?page=newsletter" method="POST" class="signup-form">
+            <input type="hidden" name="csrf_token" value="<?php echo generateCSRFToken(); ?>">
             <div class="form-group">
                 <label for="email">Email</label>
                 <input type="email" id="email" name="email" placeholder="Email" required aria-required="true">
             </div>
             <button type="submit">Sign Up</button>
             <p>Emails may sometimes go into spam. Please add our email address to your contacts to prevent this.</p>
+            <p class="small">By subscribing, you agree to our <a href="index.php?page=privacy">Privacy Policy</a>.</p>
         </form>

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +191 to +200
.card {

width: 350px;
height: 250px;
background: rgba(211, 211, 211, 0.199);
position: absolute;
transition: .3s ease-in-out;
cursor: pointer;
box-shadow: 0 0 30px -10px rgba(0, 0, 0, 0.3);
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Reevaluate absolute positioning on .card
Positioning .card absolutely without a containing context may lead to overlap and responsiveness issues. Consider a flex or grid layout on the parent instead of position: absolute;.

Comment on lines +486 to +491
.signup-container p {
margin-top: 8px;
font-size: 10px;
color: gray;

}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Increase small font-size for accessibility
font-size: 10px; is below WCAG recommendations. Use at least 0.75rem (~12px) for readability.

Comment on lines +348 to +359
.news-article img {
margin: 30px auto;
width: 60%;
height: 30%;
object-fit: cover;
display: flow;
border: 1px solid transparent;
border-radius: 10px;
box-shadow: 0 0 30px -10px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(4px);
overflow: hidden;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix invalid display: flow; on .news-article img
display: flow; is not a valid value. Replace with display: block; or inline-block as needed.

Comment on lines +267 to +283
#c1:hover {
transform: translateX(-200px) rotate(0deg) !important;

}

#c2:hover {
transform: translateX(-200px) rotate(0deg) !important;
}

#c3:hover {
transform: translateX(-200px) rotate(0deg) !important;
}

#c4:hover {
transform: translateX(0px) rotate(0deg) !important;
}
/*blurs the background on hover*/
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Remove !important from hover overrides
Relying on !important to reset transforms makes future tweaks brittle. Instead increase selector specificity or restructure hover rules to avoid !important.

Comment on lines +543 to +548
.forOfor h2 p {
font-size: 3rem;
color: var(--title-color);
text-decoration: none;
text-align: center;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix selector .forOfor h2 p
This selects <p> inside an <h2>, which is invalid HTML. Likely you meant .forOfor h2, .forOfor p.

@coderabbitai
Copy link

coderabbitai bot commented Apr 30, 2025

Caution

No docstrings were generated.

@5RoD 5RoD merged commit 96cc7a8 into master Apr 30, 2025
2 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.

1 participant