Skip to content
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

feat: 1st impl #1

Merged
merged 7 commits into from
Nov 20, 2023
Merged

feat: 1st impl #1

merged 7 commits into from
Nov 20, 2023

Conversation

YasunoriMATSUOKA
Copy link
Member

@YasunoriMATSUOKA YasunoriMATSUOKA commented Nov 19, 2023

Summary by CodeRabbit

  • Style

    • Implemented a CSS reset to standardize styling across browsers.
    • Updated visual presentation with new font styles, colors, and responsive design adjustments.
    • Added new animations for fade-in and scrolling effects to enhance user interaction.
  • New Features

    • Introduced interactive elements such as a drawer and popups with corresponding JavaScript functionality for improved user experience.
  • Documentation

    • Overhauled the website content to reflect information about the NEMTUS organization and its hackathons, including updated metadata for social sharing.
  • Refactor

    • Restructured the HTML document for better organization and readability, aligning with the new content strategy.

@YasunoriMATSUOKA YasunoriMATSUOKA added the enhancement New feature or request label Nov 19, 2023
@YasunoriMATSUOKA YasunoriMATSUOKA self-assigned this Nov 19, 2023
Copy link

coderabbitai bot commented Nov 19, 2023

## Walkthrough
A comprehensive revamp of a web project has been executed, transitioning from a Firebase welcome page to a feature-rich landing page for NEMTUS hackathons. This transformation includes a CSS reset, updated styling for responsiveness, and new JavaScript functionalities for interactive elements, alongside a restructured HTML document enriched with metadata and content tailored to showcase hackathon events.

## Changes

| File(s)                                      | Change Summary                                                                                           |
|----------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| `public/assets/css/reset.css`                | Introduced a CSS reset to standardize browser styling.                                                     |
| `public/assets/css/style.css`, `style.min.css`| Updated styles for fonts, layout, and responsiveness; added keyframe animations.                           |
| `public/assets/js/style.js`                   | Added JavaScript for drawer toggle, scroll animations, and popup functionality.                            |
| `public/index.html`                           | Overhauled HTML structure with new metadata, content, and links for a NEMTUS hackathon landing page.       |

> 🌟 In the brisk autumn air, code takes flight,  
> 🎉 With a hop and a skip, the site shines bright.  
> 🍂 Leaves may fall, but our spirits soar,  
> 🐰 For each line of code opens a new door.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

Copy link

github-actions bot commented Nov 19, 2023

Visit the preview URL for this PR (updated for commit 09c505d):

https://nemtus-hackathon-lp--pr1-feat-1st-impl-lv6ssjeq.web.app

(expires Mon, 27 Nov 2023 02:59:42 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf5b60c4cf7fba804e07e9fae2b9ddbe4e214ca2

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.

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 17ef95e and eed2069.
Files ignored due to filter (27)
  • public/assets/img/about-bg.png
  • public/assets/img/behance.png
  • public/assets/img/bg-2022.png
  • public/assets/img/bg-2023.png
  • public/assets/img/bg-2024.png
  • public/assets/img/facebook.png
  • public/assets/img/hack-2022.png
  • public/assets/img/hack-2023.png
  • public/assets/img/hack-2024.png
  • public/assets/img/header-bg.png
  • public/assets/img/header-logo.png
  • public/assets/img/icon_github.svg
  • public/assets/img/icon_nemuts.svg
  • public/assets/img/icon_twitter.svg
  • public/assets/img/icon_youtube.svg
  • public/assets/img/icon_zenn.svg
  • public/assets/img/img-2022.png
  • public/assets/img/img-2023.png
  • public/assets/img/instagram.png
  • public/assets/img/logo-2022.png
  • public/assets/img/logo-2023.png
  • public/assets/img/logo-2024.png
  • public/assets/img/logo.png
  • public/assets/img/movie.mp4
  • public/assets/img/ogp.png
  • public/assets/js/style.min.js
  • public/favicon.ico
Files selected for processing (5)
  • public/assets/css/reset.css (1 hunks)
  • public/assets/css/style.css (1 hunks)
  • public/assets/css/style.min.css (1 hunks)
  • public/assets/js/style.js (1 hunks)
  • public/index.html (1 hunks)
Files skipped from review due to trivial changes (3)
  • public/assets/css/reset.css
  • public/assets/css/style.css
  • public/assets/css/style.min.css
Additional comments: 1
public/index.html (1)
  • 1-246: The HTML structure and content have been significantly updated. Here are some key points to consider:
  • Ensure that the new metadata (lines 8-15) is accurate and that the og:url is uncommented and set correctly if needed.
  • Verify that the new navigation links (lines 26-28, 51-53) point to the correct URLs.
  • The alt attributes for images (lines 32, 66, 74, 82, 97, 129, 169, 185, 224, 227, 230, 233, 236) should accurately describe the images for accessibility purposes. Ensure they are descriptive enough.
  • The repeated placeholder text "現在開催中〜〜" (lines 115-116, 152-153, 191-192) should be replaced with actual content if this is not intentional.
  • The alt attribute in lines 129, 169 incorrectly states "HACK+ NEMTUS Hackathon 2024" for the 2023 and 2022 hackathons, respectively. These should be corrected to match the respective years.
  • The copyright year in the footer (line 241) should be updated to the current year or dynamically generated to stay current.
  • Ensure that the linked JavaScript file (line 245) contains the necessary functionality updates to match the new HTML structure and content.

Comment on lines +2 to +8
jQuery(".drawer-icon").on("click", function (e) {
e.preventDefault();
jQuery(".drawer-icon").toggleClass("is-active");
jQuery(".drawer-content").toggleClass("is-active");
jQuery(".drawer-background").toggleClass("is-active");

return false;
Copy link

Choose a reason for hiding this comment

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

The drawer toggle functionality is correctly implemented using jQuery. The use of e.preventDefault() is appropriate to prevent the default action of the clicked element, and the return false at the end of the event handler is redundant since e.preventDefault() has already been called.

-  return false;

Commitable 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.

Suggested change
jQuery(".drawer-icon").on("click", function (e) {
e.preventDefault();
jQuery(".drawer-icon").toggleClass("is-active");
jQuery(".drawer-content").toggleClass("is-active");
jQuery(".drawer-background").toggleClass("is-active");
return false;
jQuery(".drawer-icon").on("click", function (e) {
e.preventDefault();
jQuery(".drawer-icon").toggleClass("is-active");
jQuery(".drawer-content").toggleClass("is-active");
jQuery(".drawer-background").toggleClass("is-active");

Comment on lines +12 to +27
$(window).scroll(function () {
fadeAnime();
});
function fadeAnime() {
$(".fuwa").each(function () {
let target = ($(this).offset().top -= 50);
let scroll = $(window).scrollTop();
let windowHeight = $(window).height();

if (scroll > target - windowHeight + 200) {
$(this).addClass("fadeUp");
} else {
$(this).removeClass("fadeUp");
}
});
}
Copy link

Choose a reason for hiding this comment

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

The scroll animation logic is sound, but there is a potential performance issue. The fadeAnime function is called every time the user scrolls, which can lead to performance degradation, especially on devices with less processing power. It's better to throttle or debounce the scroll event handler to limit the number of times fadeAnime is called.

$(window).scroll(throttle(fadeAnime, 250));

Comment on lines +16 to +25
$(".fuwa").each(function () {
let target = ($(this).offset().top -= 50);
let scroll = $(window).scrollTop();
let windowHeight = $(window).height();

if (scroll > target - windowHeight + 200) {
$(this).addClass("fadeUp");
} else {
$(this).removeClass("fadeUp");
}
Copy link

Choose a reason for hiding this comment

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

The calculation of target within the .each() loop is incorrect. The -= operator is used, which will modify the offset of each .fuwa element every time fadeAnime is called, leading to an incorrect target value after the first call. This should be a simple subtraction.

-    let target = ($(this).offset().top -= 50);
+    let target = $(this).offset().top - 50;

Commitable 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.

Suggested change
$(".fuwa").each(function () {
let target = ($(this).offset().top -= 50);
let scroll = $(window).scrollTop();
let windowHeight = $(window).height();
if (scroll > target - windowHeight + 200) {
$(this).addClass("fadeUp");
} else {
$(this).removeClass("fadeUp");
}
$(".fuwa").each(function () {
let target = $(this).offset().top - 50;
let scroll = $(window).scrollTop();
let windowHeight = $(window).height();
if (scroll > target - windowHeight + 200) {
$(this).addClass("fadeUp");
} else {
$(this).removeClass("fadeUp");
}

Comment on lines +39 to +45
$(".modal_pop-2").hide();
$(".show_pop-2").on("click", function () {
$(".modal_pop-2").fadeIn();
});
$(".js-modal-close").on("click", function () {
$(".modal_pop-2").fadeOut();
});
Copy link

Choose a reason for hiding this comment

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

The popup show/hide functionality is correctly implemented. However, there is a potential issue with the event handler for .js-modal-close. It is attached to all elements with this class, which means that clicking on any close button will close all popups, not just the associated one. This could be problematic if there are multiple popups on the page. It would be better to scope the close button to its respective popup.

$(".modal_pop-1 .js-modal-close").on("click", function () {
  $(".modal_pop-1").fadeOut();
});
$(".modal_pop-2 .js-modal-close").on("click", function () {
  $(".modal_pop-2").fadeOut();
});

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between eed2069 and 63d552e.
Files selected for processing (2)
  • public/assets/css/style.css (1 hunks)
  • public/index.html (1 hunks)
Files skipped from review due to trivial changes (1)
  • public/assets/css/style.css
Additional comments: 1
public/index.html (1)
  • 1-241: The overhaul of the HTML document appears to be comprehensive and aligns with the summary provided. The addition of Open Graph Protocol metadata (lines 8-15) is a good practice for social media sharing and SEO. The restructuring of the header (lines 22-39), main content (lines 62-210), and footer (lines 214-241) seems to be well-organized and semantically correct.

However, there are a few points to consider:

  • Ensure that all links (e.g., lines 26-29, 52-55) are correct and lead to the intended destinations.
  • Verify that all images are correctly sourced and displayed (e.g., lines 33, 68, 76, 84, 99, 124, 164, 179, 219, 222, 225, 228, 231).
  • Check that the alt text for images is descriptive and accurate (e.g., lines 33, 68, 76, 84, 99, 124, 164, 179).
  • Confirm that the copyright year in the footer (line 236) is updated or dynamically generated to reflect the current year.
  • Ensure that the external script (line 239) is still necessary and that the version used is compatible with the rest of the codebase.

Overall, the changes seem to be in line with the intended update to the website's purpose and design. It's important to test the page across different devices and browsers to ensure responsiveness and compatibility.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 63d552e and 590dbbf.
Files selected for processing (1)
  • public/index.html (1 hunks)
Additional comments: 1
public/index.html (1)
  • 1-244: The HTML overhaul from a Firebase Hosting welcome page to a NEMTUS hackathon landing page is extensive and appears to be well-structured. The metadata, header, navigation, main content sections, and footer have been updated to reflect the new purpose of the page. The use of semantic HTML tags like <header>, <main>, <section>, and <footer> enhances the document's readability and SEO. The inclusion of Open Graph tags will help with the page's presentation on social media platforms.

However, there are a few points to consider:

  • Ensure that all links are correct and lead to the intended destinations. Broken links can negatively impact user experience and SEO.
  • The <meta> tags in lines 11 and 14 are broken into two lines, which might be an issue if the HTML parser does not handle multi-line attribute values correctly. It's best to keep the content attribute value on a single line to avoid any potential issues.
  • The copyright year in the footer (line 237) should be updated to the current year or dynamically generated to avoid the need for manual updates.
  • The use of <object> tags for SVGs (lines 220, 223, 226, 229, 232) is acceptable, but consider using <img> tags for simplicity and consistency unless there's a specific need for <object>, such as scriptability or DOM access.
  • The inclusion of jQuery (line 240) should be reviewed. If the site's functionality does not heavily rely on jQuery, it might be beneficial to remove it to reduce page load times and depend on vanilla JavaScript or modern frameworks that are more performant.

@YasunoriMATSUOKA YasunoriMATSUOKA merged commit c27ff9f into main Nov 20, 2023
2 checks passed
@YasunoriMATSUOKA YasunoriMATSUOKA deleted the feat-1st-impl branch November 20, 2023 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant