-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f6b12c
commit 18ba87d
Showing
10 changed files
with
99 additions
and
44,636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
apps/picsa-tools/resources-tool/src/app/pages/home/home.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 22 additions & 22 deletions
44
apps/picsa-tools/resources-tool/src/app/pages/resources/search.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<div> | ||
<input | ||
type="search" | ||
name="filter" | ||
class="form-control" | ||
placeholder="Search resources...." | ||
[(ngModel)]="query" | ||
(input)="onSearchInputChange($event)" | ||
autofocus | ||
/> | ||
<div *ngIf="searchResults.length > 0" class="card"> | ||
<div class="card-content" *ngFor="let result of searchResults"> | ||
<mat-card> | ||
<mat-card-header> | ||
<mat-card-title>{{ result.item.title }}</mat-card-title> | ||
<mat-card-subtitle> {{ result.item.description || '' }} </mat-card-subtitle> | ||
<img mat-card-avatar *ngIf="result.item.cover?.image" [src]="result.item.cover?.image" /> | ||
</mat-card-header> | ||
</mat-card> | ||
<div *ngIf="searchResults.length === 0 && query.length > 0"> | ||
<div class="card"> | ||
<div class="card-content">No results found.</div> | ||
<input | ||
type="search" | ||
name="filter" | ||
class="form-control" | ||
placeholder="Search resources...." | ||
[(ngModel)]="query" | ||
(input)="onSearchInputChange($event)" | ||
autofocus | ||
/> | ||
<div *ngIf="searchResults.length > 0" class="card"> | ||
<div class="card-content" *ngFor="let result of searchResults"> | ||
<mat-card> | ||
<mat-card-header> | ||
<mat-card-title>{{ result.item.title }}</mat-card-title> | ||
<mat-card-subtitle> {{ result.item.description || '' }} </mat-card-subtitle> | ||
<img mat-card-avatar *ngIf="result.item.cover?.image" [src]="result.item.cover?.image" /> | ||
</mat-card-header> | ||
</mat-card> | ||
<div *ngIf="searchResults.length === 0 && query.length > 0"> | ||
<div class="card"> | ||
<div class="card-content">No results found.</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
78 changes: 38 additions & 40 deletions
78
apps/picsa-tools/resources-tool/src/app/pages/resources/search.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,48 @@ | ||
.form-control { | ||
width: 50%; | ||
padding: 10px; | ||
border: 2px solid maroon; | ||
border-radius: 10px; | ||
border: 2px solid maroon; | ||
border-radius: 10px; | ||
box-sizing: border-box; | ||
font-size: 16px; | ||
margin-top: 50px; | ||
margin-left: auto; | ||
margin-left: auto; | ||
margin-right: auto; | ||
display: block; | ||
} | ||
|
||
.form-control:focus { | ||
outline: none; | ||
border-color: maroon; | ||
box-shadow: 0 0 5px maroon(0, 123, 255, 0.5); | ||
} | ||
|
||
|
||
.form-control:focus { | ||
outline: none; | ||
box-shadow: 0 0 5px maroon; | ||
} | ||
|
||
.card { | ||
width: 50%; | ||
border: 1px solid maroon; | ||
border-radius: 10px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
margin-top: 10px;/* Center the card below the search engine */ | ||
padding: 10px; | ||
box-sizing: border-box; | ||
display: block; | ||
background-color: white; | ||
} | ||
|
||
.card-content { | ||
font-size: 16px; | ||
color: maroon; | ||
font-weight: bold; | ||
} | ||
|
||
|
||
/* Optional: Hover effect for better user experience */ | ||
.card:hover { | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
cursor: pointer; | ||
} | ||
.form-control:focus { | ||
outline: none; | ||
border-color: maroon; | ||
box-shadow: 0 0 5px maroon(0, 123, 255, 0.5); | ||
} | ||
|
||
.form-control:focus { | ||
outline: none; | ||
box-shadow: 0 0 5px maroon; | ||
} | ||
|
||
.card { | ||
width: 50%; | ||
border: 1px solid maroon; | ||
border-radius: 10px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
margin-top: 10px; /* Center the card below the search engine */ | ||
padding: 10px; | ||
box-sizing: border-box; | ||
display: block; | ||
background-color: white; | ||
} | ||
|
||
.card-content { | ||
font-size: 16px; | ||
color: maroon; | ||
font-weight: bold; | ||
} | ||
|
||
/* Optional: Hover effect for better user experience */ | ||
.card:hover { | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 16 additions & 13 deletions
29
apps/picsa-tools/resources-tool/src/app/pages/resources/search.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import { SearchComponent } from "./search.component"; | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { FormsModule } from "@angular/forms"; | ||
import { ResourcesMaterialModule } from "../../material.module"; | ||
import { ResourcesComponentsModule } from "../../components/components.module"; | ||
import { PicsaCommonComponentsModule } from '@picsa/components'; | ||
import { PicsaTranslateModule } from '@picsa/shared/modules'; | ||
|
||
import { ResourcesComponentsModule } from '../../components/components.module'; | ||
import { ResourcesMaterialModule } from '../../material.module'; | ||
import { SearchComponent } from './search.component'; | ||
|
||
const routes: Routes = [{ path: '', component: SearchComponent, title: 'Search' }]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes), | ||
FormsModule, | ||
ResourcesMaterialModule, | ||
ResourcesComponentsModule, | ||
PicsaCommonComponentsModule, | ||
PicsaTranslateModule], | ||
exports: [RouterModule], | ||
}) | ||
export class SearchModule {} | ||
imports: [ | ||
RouterModule.forChild(routes), | ||
FormsModule, | ||
ResourcesMaterialModule, | ||
ResourcesComponentsModule, | ||
PicsaCommonComponentsModule, | ||
PicsaTranslateModule, | ||
], | ||
exports: [RouterModule], | ||
}) | ||
export class SearchModule {} |
Oops, something went wrong.