-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
154 lines (144 loc) · 5.06 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JYQL</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
<script src="JYLQ.js"></script>
<link rel="stylesheet" href="JYLQ.css">
</head>
<body>
<div class="header">
<img src="ressources/Logo.png" class="imt">
<div class="titre">
<h1 class="text-white text-center">Bienvenue sur le site de JYLQ</h1>
<p class="lead text-white text-center">Étudiants de la Promotion FIL 2022-2025</p>
</div>
</div>
<div class="grosse_div">
<div class="createur">
<div class="card" id="jules">
<span class="popup">
</span>
</div>
<p class="name">Marche Jules</p>
</div>
<div class="createur">
<div class="card" id="younes">
<span class="popup">
</span>
</div>
<p class="name">Ghoniem Younes</p>
</div>
<div class="createur">
<div class="card" id="louan">
<span class="popup">
</span>
</div>
<p class="name">Belicaud Louan</p>
</div>
<div class="createur">
<div class="card" id="quentin">
<span class="popup">
</span>
</div>
<p class="name">Tournier Quentin</p>
</div>
</div>
<div class="boutton">
<input id="btn" type="button" class="btn btn-light" value="Voir nos créations"/>
</div>
<script>
$(".card").hover( function() {
switch($(this).attr('id')){
case "quentin":
$(this).find("span").toggleClass("show");
break;
case "jules":
$(this).find("span").toggleClass("show");
break;
case "louan":
$(this).find("span").toggleClass("show");
break;
case "younes":
$(this).find("span").toggleClass("show");
break;
}
});
let json = '{\
"0": {\
"nom":"Marche Jules",\
"github": "Github Jules",\
"portfolio": "Portfolio Jules"\
},\
"1": {\
"nom":"Ghoniem Younes",\
"github": "Github Younes",\
"portfolio": "Portfolio Younes"\
},\
"2": {\
"nom":"Tournier Quentin",\
"github": "Github Quentin",\
"portfolio": "Portfolio Quentin"\
},\
"3": {\
"nom":"Belicaud Louan",\
"github": "Github Louan",\
"portfolio": "Portfolio Louan"\
}\
}'
json = JSON.parse(json);
for(indice in json){
switch(json[indice].nom){
case "Marche Jules":
div = $("#jules").find("span")
break;
case "Ghoniem Younes":
div = $("#younes").find("span")
break;
case "Tournier Quentin":
div = $("#quentin").find("span")
break;
case "Belicaud Louan":
div = $("#louan").find("span")
break;
}
$(div).append(createGithub(json[indice].github));
$(div).append(createBr());
$(div).append(createPortfolio(json[indice].portfolio));
}
function createGithub(lienGithub)
{
const img = document.createElement("img");
img.setAttribute("src","ressources/github.png")
img.setAttribute("class","github");
img.setAttribute("title","Voir le GitHub");
const a = document.createElement("a");
a.setAttribute("href",lienGithub)
a.setAttribute("target","_blank");
a.append(img);
return a;
}
function createBr()
{
const br = document.createElement("br");
return br;
}
function createPortfolio(lienPortfolio)
{
const img = document.createElement("img");
img.setAttribute("src","ressources/portfolio.png")
img.setAttribute("class","github");
img.setAttribute("title","Voir le Portfolio");
const a = document.createElement("a");
a.setAttribute("href",lienPortfolio)
a.setAttribute("target","_blank");
a.append(img);
return a;
}
</script>
</body>
</html>