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 search-bar #4512

Closed
wants to merge 1 commit into from
Closed

add search-bar #4512

wants to merge 1 commit into from

Conversation

yuurex
Copy link

@yuurex yuurex commented Oct 5, 2024

(дуже розчарований в цьому завданні, макет зроблений дуже погано, не вказані важливі параметри шрифтів, а тести взагалі показують що треба було робити медіа запити, про які в макеті нічого не сказано..)

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.

Hey there! It looks like you've done a great job overall, but there are a couple of things that need your attention before we can move forward. Don't worry, they're easy fixes! 😊 First, remember to specify fallback fonts - it's a safety net that ensures your text remains readable even if the primary font fails to load. Also, let's make sure the alt texts for images are descriptive, this helps with accessibility and SEO. Lastly, using semantic tags like label in forms is a good practice that makes your code cleaner and more meaningful. Keep up the good work, and with these small tweaks, your code will be even better! 👍

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

Comment on lines +21 to +33
<form class="form form__1">
<div class="input__wrapper">
<img
src="images/Search.svg"
alt="search-logo"
class="input__icon input__icon__1"
/>
<input
class="input input__first"
type="text"
data-qa="big keypress"
placeholder="Try “Los Angeles“"
/>

Choose a reason for hiding this comment

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

Use semantic tags where possible. Instead of using div for wrapping input elements, consider using label which is more appropriate for form input elements.

Comment on lines +23 to +26
<img
src="images/Search.svg"
alt="search-logo"
class="input__icon input__icon__1"

Choose a reason for hiding this comment

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

The alt attribute should describe the image content. 'search-logo' is not descriptive of the image content. It should describe the action or purpose of the image, like 'Search icon'.

Comment on lines +37 to +49
<form class="form form__2">
<div class="input__wrapper">
<img
src="images/Search.svg"
alt="search-logo"
class="input__icon input__icon__2"
/>
<input
class="input input__second"
type="text"
data-qa="small"
placeholder="Try “Los Angeles“"
/>

Choose a reason for hiding this comment

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

Use semantic tags where possible. Similar to the previous form, consider using label for wrapping input elements.

Comment on lines +39 to +42
<img
src="images/Search.svg"
alt="search-logo"
class="input__icon input__icon__2"

Choose a reason for hiding this comment

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

The alt attribute should describe the image content. 'search-logo' is not descriptive of the image content. It should describe the action or purpose of the image, like 'Search icon'.

}

body {
font-family: Avenir-Book, sans-serif;

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. It's good practice to specify a generic family as a fallback, such as sans-serif for Avenir-Book.

border-radius: 4px;
background-color: white;
box-shadow: 0 1px 8px 0 #3d4e611a;
font-family: Avenir-Book, sans-serif;

Choose a reason for hiding this comment

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

You've specified the font-family again for .input__first which is redundant since it's already been set for the body. If the intention is to have a consistent font throughout the site, setting it on the body should suffice.

text-shadow: 0 4px 4px 0 #00000040;
outline: none;
color: #3d4e61;
font-family: Avenir-Heavy, sans-serif;

Choose a reason for hiding this comment

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

The font-family Avenir-Heavy should also have a fallback font specified, similar to the body's font-family declaration.

justify-content: center; /* Центрування форми по горизонталі */
align-items: center;
width: 100%; /* Ширина для flex-контейнера */
margin-top: 20px;

Choose a reason for hiding this comment

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

Be consistent with your margins (Add only top or bottom, but not both). Here, you've added a margin-top to .form, which might lead to margin collapse issues if you're not careful.

border: 1px solid #e1e7ed;
border-radius: 4px;
box-shadow: 0 1px 8px 0 #3d4e611a;
font-family: Avenir-Book, sans-serif;

Choose a reason for hiding this comment

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

The font-family declaration here is redundant as well since it's the same as the one set for the body. You can remove it unless you need a different font for this specific element.

@yuurex yuurex closed this by deleting the head repository Oct 5, 2024
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