Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ariele Luciano Sgheiza
Portfolio CUI
Commits
efa150ca
Commit
efa150ca
authored
Dec 05, 2020
by
Luca Silly
Browse files
page recherche début
parent
9da21fff
Pipeline
#21276
failed with stages
in 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
efa150ca
...
...
@@ -33,8 +33,6 @@
</header>
<span
id=
"test"
>
t
</span>
</body>
</html>
\ No newline at end of file
recherche.html
0 → 100644
View file @
efa150ca
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
rel=
"stylesheet"
href=
"index.css"
>
<script
src=
"test.js"
></script>
<script
defer
src=
"https://use.fontawesome.com/releases/v5.14.0/js/all.js"
></script>
<script
src=
"https://unpkg.com/axios/dist/axios.min.js"
></script>
<title>
CUI Portfolio
</title>
</head>
<body>
<header>
<div
class=
"header-right"
>
<img
src=
"images/profil.png"
alt=
"profil"
id=
"profil_user"
>
</div>
<div
id=
"chercher"
>
<input
type=
"text"
placeholder=
"Cherchez un projet..."
id=
"search"
>
<button
type=
"submit"
class=
"searchButton"
id=
"submit"
onclick=
"rechercher()"
>
<i
class=
"fas fa-search"
></i>
</button>
</div>
<div
class=
"header-left"
>
<img
src=
"images/logo.png"
alt=
"logo"
id=
"logo"
>
<div
id=
"logo_couleur"
>
<p
id=
"title"
>
Portfolio CUI
</p>
</div>
</div>
</header>
<div
id=
"projet"
>
bonjour
</div>
</body>
</html>
\ No newline at end of file
test.js
View file @
efa150ca
...
...
@@ -17,13 +17,19 @@ function rechercher(){
var
motRecherche
=
document
.
getElementById
(
"
search
"
).
value
;
axios
.
get
(
'
http://127.0.0.1:2555/recherche/
'
,
{
params
:
{
motClef
:
motRecherche
}
})
.
then
(
response
=>
{
var
listeTitresProjets
=
""
;
window
.
location
=
'
recherche.html
'
;
for
(
var
i
=
0
;
i
<
response
.
data
.
length
;
i
++
){
}
/*var listeTitresProjets = "";
for(var i = 0; i < response.data.length; i++){
listeTitresProjets = listeTitresProjets + response.data[i].titre_projet;
if (i < response.data.length-1)
listeTitresProjets = listeTitresProjets + ", ";
}
document
.
getElementById
(
"
test
"
).
innerHTML
=
listeTitresProjets
;
document.getElementById("test").innerHTML= listeTitresProjets;
*/
})
.
catch
(
error
=>
{
console
.
log
(
error
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment