feat: auto-hide search

This commit is contained in:
2024-07-07 23:48:02 +03:00
parent e6da8b17a7
commit 9d2373a298
5 changed files with 23 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
<h1>It's home component</h1>
<div class="flex flex-col items-center">
<div class="flex flex-col items-center w-full px-3">
@for (item of items; track $index) {
<button (click)="getDetails(item.slug_url)" title="{{ item.name }}" class="mb-6">
<div class="card flex flex-col items-center border-black border-2 rounded-md p-4">
<button (click)="getDetails(item.slug_url)" title="{{ item.name }}" class="mb-6 w-full">
<div class="card flex flex-col items-center border-black border-2 rounded-md p-4 w-full">
<h1>{{ item.rus_name }}</h1>
<img [src]="item.cover.thumbnail" [alt]="item.slug" class="w-[200px] h-auto aspect-auto" />
</div>

View File

@@ -39,7 +39,6 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
ngAfterViewInit(): void {
this.route.queryParams.subscribe((params) => {
const search = params["search"];
console.log(params);
if (search) {
this.searchService.search(search);
}