-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCouple.html
84 lines (74 loc) · 3.55 KB
/
Couple.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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Couples</title>
<link rel="icon" href="https://fsymbols.com/images/heart.png"> <!--Icône du Site-->
<meta name="theme-color" content="#ff0000">
<script>
function lov(){
const Gars = ["Gaël", "Victor", "Noé", "Ronan", "Jean-Baptiste", "Lilian", "Mattéo", "Toni", "Teoman", "Raphaël"];
const Fille = ["Gwenaëlle", "Gabrièle", "Uliana", "Diane", "Fleur"];
var indiceAleatoireA = Math.floor(Math.random() * Gars.length);
var indiceAleatoireB = Math.floor(Math.random() * Fille.length);
var PrenomA = Gars[indiceAleatoireA];
var PrenomB = Fille[indiceAleatoireB];
// Tkt c'est à peine truqué
if (PrenomA == Gars[0] || PrenomB == Fille[0])
{
PrenomA = Gars[0];
PrenomB = Fille[0];
}
document.getElementById("resultat").textContent = PrenomA;
document.getElementById("resultat2").textContent = PrenomB;
document.getElementById("resultat3").textContent = PrenomB.substring(0, Math.floor(PrenomB.length / 2)) + PrenomA.substring(Math.floor(PrenomA.length / 2));
;
}
</script>
<style>
body{
background: url(https://img.freepik.com/free-vector/blurred-valentine-s-day-wallpaper_23-2148819570.jpg) no-repeat center fixed;
background-size: cover
}
.BoutonRouge{background:linear-gradient(to bottom, rgb(181, 0, 0) 5%, rgb(109, 0, 0) 100%)}
.BoutonRouge:hover{background:linear-gradient(to bottom, rgb(109, 0, 0) 5%, rgb(181, 0, 0) 100%)}
.BoutonRouge:active{position:relative;top:2px}
.BoutonRouge{
font-size: 16px;
font-weight: bold;
line-height: 1;
text-decoration: none;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
display: inline-block;
padding: 8px 10px 8px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
border-bottom: 1px solid rgba(0,0,0,0.5);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
box-shadow: 0 1px 3px rgba(0,0,0,0.5);
margin: 2px;
}
#mob{font-size: 500%;}
@media only screen and (max-width: 1000px){#mob{font-size: 200%;}}
@media only screen and (max-width: 750px){#mob{font-size: 100%;}}
</style>
</head>
<body>
<h1 style="text-align: center;font-size: 300%;background-color: rgb(181, 60, 60);color: rgb(255, 255, 255);">Couple Aléatoire</h1>
<button class="BoutonRouge" onclick="lov()">Cliquez ici 💕</button>
<div id="mob" style="text-align: center;">
<table style="width: 100%; border-spacing: 10px; "><tbody><tr>
<td style="width:50%; background-color: rgb(236, 187, 234);border: 1px solid black;" id="resultat"> <span style="color: transparent;">Gars </span></td>
<td style="width:50%; background-color: rgb(236, 187, 234);border: 1px solid black;" id="resultat2"> <span style="color: transparent;">Fille </span></td>
</tr></tbody></table>
<table style="width: 100%; border-spacing: 10px 0;"><tbody><tr>
<td> </td>
<td style="width: 30%; background-color: rgb(217, 151, 214);border: 1px solid black;" id="resultat3"> <span style="color: transparent;">Enfant </span></td>
<td> </td>
</tr></tbody></table> </div>
</body>
</html>