Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Boite de conserve
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxime POULAIN
Boite de conserve
Commits
13c851a8
Commit
13c851a8
authored
1 year ago
by
Coralie
Browse files
Options
Downloads
Patches
Plain Diff
modifs recherche
parent
919fbf82
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Angular/src/app/archive.service.ts
+12
-4
12 additions, 4 deletions
Angular/src/app/archive.service.ts
Angular/src/app/search-results/search-results.component.html
+13
-17
13 additions, 17 deletions
Angular/src/app/search-results/search-results.component.html
with
25 additions
and
21 deletions
Angular/src/app/archive.service.ts
+
12
−
4
View file @
13c851a8
...
...
@@ -19,7 +19,8 @@ export class ArchiveService {
}
getArchiveRandom
():
Observable
<
Archive
[]
>
{
this
.
_archive
=
this
.
_httpClient
.
get
<
Archive
[]
>
(
`
${
environment
.
apiUrl
}
Archives/Random?count=10`
);
this
.
_archive
=
this
.
_httpClient
.
get
<
Archive
[]
>
(
`
${
environment
.
apiUrl
}
Archives/Random?count=10`
);
return
this
.
_archive
;
}
...
...
@@ -28,7 +29,8 @@ export class ArchiveService {
this
.
_archive
=
this
.
getArchiveRandom
();
}
else
{
this
.
_archive
=
this
.
_httpClient
.
get
<
Archive
[]
>
(
`
${
environment
.
apiUrl
}
Archives/Search?search=
${
str
}
&page=1&limit=30`
);
this
.
_archive
=
this
.
_httpClient
.
get
<
Archive
[]
>
(
`
${
environment
.
apiUrl
}
Archives/Search?search=
${
str
}
&page=1&limit=30`
);
}
return
this
.
_archive
;
}
...
...
@@ -36,8 +38,14 @@ export class ArchiveService {
}
export
interface
Archive
{
n
ame
:
string
,
fullN
ame
:
string
,
description
:
string
,
link
:
string
,
images
:
Image
[]
,
date
:
Date
}
export
interface
Image
{
name
:
string
,
description
:
string
,
link
:
string
}
This diff is collapsed.
Click to expand it.
Angular/src/app/search-results/search-results.component.html
+
13
−
17
View file @
13c851a8
<div
*ngIf=
"(_archive | async) as archive"
>
<p-carousel
[value]=
"archive"
styleClass=
"custom-carousel"
[numVisible]=
"4"
[numScroll]=
"1"
[circular]=
"true"
[autoplayInterval]=
"3000"
[responsiveOptions]=
"responsiveOptions"
>
<ng-template
let-item
pTemplate=
"item"
>
<div
class=
"item"
>
<div
class=
"item-content"
>
<h3
class=
"mb-1 name"
>
{{item.fullName}}
</h3>
<div
class=
"mb-3"
>
<img
src=
{{item.images[0].link}}
[alt]=
"item.images[0].name"
class=
"item-image"
/>
</div>
<div>
<p
class=
"mt-0 mb-3 description"
>
{{item.description}}
</p>
<p
class=
"mt-0 mb-3 date"
>
{{item.date}}
</p>
</div>
</div>
</div>
</ng-template>
</p-carousel>
<div
*ngIf=
"(_archive | async) as archive"
style=
"text-align: center;"
>
<div
class=
"item"
*ngFor=
"let item of archive"
>
<h2>
{{item.fullName}}
</h2>
<p
class=
"mt-0 mb-3 description"
>
{{item.description}}
</p>
<p
class=
"mt-0 mb-3 date"
>
{{item.date}}
</p>
<div
class=
"mb-3"
*ngFor=
"let image of item.images"
>
<img
src=
{{image.link}}
[alt]=
"image.name"
style=
"width: 50%;"
/>
<br
/>
</div>
<br
/>
<br
/>
<br
/>
</div>
</div>
<div
*ngIf=
"(_archive | async) === undefined"
>
<p>
PAS DE RESULTATS
</p>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment