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

add homework #3979

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

add homework #3979

wants to merge 6 commits into from

Conversation

anastvozniuk
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Thank you for your hard work on this project! 😊 There are a few critical issues that need to be addressed before we can approve the pull request:

  1. File Naming and Location: The SCSS file should be named main.scss and located in src/styles/ as per the task requirements. Please rename the file and update its location.

  2. HTML Link Update: The HTML file currently links to styles/index.scss and ./../css/index.css. Once the SCSS file is renamed to main.scss, ensure the HTML file is updated to link correctly to this file.

  3. Vertical Centering: The calendar needs to be centered vertically on the screen. Please add the necessary styles to achieve this.

These changes are crucial for meeting the core requirements of the task. Once these are addressed, your code will be in great shape! Keep up the great work, and don't hesitate to reach out if you need any help! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

css/index.css Outdated
Comment on lines 8 to 10
display: -webkit-box;
display: -ms-flexbox;
display: flex;

Choose a reason for hiding this comment

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

Consider removing vendor prefixes for display: flex; as modern browsers have good support for flexbox without prefixes. Use tools like Autoprefixer if you need to support older browsers.

css/index.css Outdated
Comment on lines 22 to 24
display: -webkit-box;
display: -ms-flexbox;
display: flex;

Choose a reason for hiding this comment

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

Similar to the previous comment, check if vendor prefixes for display: flex; are necessary. Modern browsers typically do not require these prefixes.

css/index.css Outdated
Comment on lines 37 to 38
-webkit-transition: linear 0.5s;
transition: linear 0.5s;

Choose a reason for hiding this comment

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

Consider removing the -webkit-transition prefix unless you need to support very old versions of WebKit browsers. Modern browsers support the unprefixed transition property.

css/index.css Outdated
Comment on lines 50 to 52
-webkit-transform: translateY(-20px);
-ms-transform: translateY(-20px);
transform: translateY(-20px);

Choose a reason for hiding this comment

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

Check if vendor prefixes for transform: translateY(-20px); are necessary. Most modern browsers support the unprefixed version.

src/index.html Outdated
Comment on lines 14 to 16
<link
rel="stylesheet"
href="./../css/index.css"

Choose a reason for hiding this comment

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

The link to the stylesheet is pointing to ./../css/index.css. Ensure that this path is correct relative to the HTML file's location. If the file structure is different, update the path accordingly.

Comment on lines 39 to 40
&:first-child {
margin-left: 606px;

Choose a reason for hiding this comment

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

The margin-left value is hardcoded as 606px. Consider calculating this value using the existing SCSS variables to maintain consistency and flexibility. For example, you could use $columns-size * 6 or another appropriate calculation based on your layout requirements.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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


Great job on addressing the task requirements! 🎉 Your code is well-structured, and you've effectively used SCSS features like loops and mixins to enhance maintainability and scalability. The calendar is centered using flexbox, which is a modern and efficient approach.

However, there's a critical issue with the HTML file linking to the SCSS file instead of the compiled CSS file. Please update the href attribute to link to css/main.css to ensure styles are applied correctly in the browser. This is crucial for the functionality of your project.

Keep up the good work, and make sure to address this issue to avoid similar problems in the future. Your progress is impressive, and with these adjustments, your project will be even better! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

@@ -9,10 +9,42 @@
<title>Calendar</title>
<link
rel="stylesheet"
href="styles/index.scss"
href="styles/main.scss"

Choose a reason for hiding this comment

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

The href attribute currently links to styles/main.scss. This should be updated to link to the compiled CSS file css/main.css to ensure the styles are applied correctly in the browser.

Comment on lines +12 to +17
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;

Choose a reason for hiding this comment

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

The body styles are correctly set to center the content vertically and horizontally using flexbox, which aligns with the task requirement to center the calendar on the screen.

Comment on lines +59 to +65
@each $day, $margin in (mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6) {
&.calendar--start-day-#{$day} {
.calendar__day:first-child {
margin-left: calc((#{$day-size} + #{$gap}) * (#{$margin - 1}));
}
}
}

Choose a reason for hiding this comment

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

The use of the @each loop to dynamically generate classes for different starting days of the week is a good practice, making the code more maintainable and scalable.

Comment on lines +67 to +73
@for $i from 28 through 31 {
&.calendar--month-length-#{$i} {
.calendar__day:nth-child(n + #{$i + 1}) {
display: none;
}
}
}

Choose a reason for hiding this comment

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

The @for loop is used effectively to handle different month lengths, ensuring that extra days are hidden for months with fewer days.

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