-
Notifications
You must be signed in to change notification settings - Fork 0
phase-6 #2
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
base: main
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,24 @@ | |||
| .layout { | |||
| display: grid; | |||
| grid-template-columns: 100px 1fr; | |||
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.
use rem instead of px
| selector: 'app-aside', | ||
| imports: [], | ||
| templateUrl: './aside.html', | ||
| styleUrl: './aside.scss' |
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.
اسم کامپوننت ها باید یکم دیسکریپتیور تر باشن این خوب نیست اسمش اصلا
من نمیدونم مربوط به کجاست
تازه همپوشانی هم با اسم تگ های خود html داره که بدتر میکنه اسمش رو
| flex-direction: column; | ||
| margin: 1rem; | ||
| border: 1.5px solid var(--color-border); | ||
| border-radius: 1rem; |
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.
از px استفاده نشه
| export class Book implements OnInit { | ||
| books: books[] = []; | ||
|
|
||
| constructor(private http: HttpClient) {} |
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.
access modifier
| padding: 1.5rem; | ||
| text-align: center; | ||
| font-size: 1rem; | ||
| font-weight: 600; |
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.
don't use px
|
|
||
| * { | ||
| margin: 0; | ||
| padding: 0; |
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.
این خیلییی خطرناکه
در مورد css reset بخونیدد
| templateUrl: './book.html', | ||
| styleUrl: './book.scss' | ||
| }) | ||
| export class Book implements OnInit { |
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.
اسم کامپوننت اصلا خوب نیست
این چیه ؟
کتاب ؟
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.
یدونه کتاب؟
لیست کتاب هاتون ؟
اصلا نمیفهمم از اسمش که چه کاری داره میکنه
| @@ -0,0 +1,8 @@ | |||
| <div class="books-info" *ngFor="let book of books"> | |||
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.
از سینتکس جدید اسفاده کنین
@for
|
ساختار صفحه بندی و کامپوننت ها خیلی مشخص نیست برای مثال book-detail صفحه جزئیات محصول هست و همین مورد برای کامپوننت های layout مثل footer و header هم صدق میکنه، بهتره مثلا داخل /components یا /ui باشن و مثلا برای book.model.ts و کلا مدل های کل اپ بهتره داخل دایرکتوری /models باشه و مستقیما توی root پروژه نباشه |
| const input = event.target as HTMLInputElement; | ||
| if (input.files && input.files.length > 0) { | ||
| this.selectedFile = input.files[0]; | ||
| console.log('File selected:', this.selectedFile); |
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.
بودن لاگ توی پروژه بعد از تست و توسعه روی پروداکشن اشتباهه
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.
اینا رو واسه تست گذاشتم بودم که ببینم مشکل از کجاست و متاسفانه یادم رفت پاک کنم.ممنون که گفتی🙏🙏
|
خیلی از جاها از px unit استفاده کردید. بهتره از rem استفاده کنید. |
| <span class="price"> ${{ book.price }}</span> | ||
| </div> | ||
|
|
||
| <button class="details-button" (click)="onViewDetails(book.id)"> |
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.
اگه به جای دکمه یه همچین لینکی میزاشتی بهتر بود، و دیگه نیاز به بایند کردن متد و هندل کردنش با navigate توی کلاس نبود:
<a class="details-button" [routerLink]="['/books', book.id]">
View Details
</a>
ممنون میشم در این مورد یکم بیشتر راهنمایی کنید.مثلا ساختار به این صورت زیر باشه چطور؟ src/ |
سعی شده توی موارد زیر از px استفاده بشه: |
No description provided.