Spaces:
Running
Running
File size: 5,690 Bytes
682db22 |
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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trump Game</title>
<link href="dist/svgMap.css" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
font-family: Arial, sans-serif;
background-color: #000; /* Fond noir */
color: #fff;
}
.chatbot {
width: 33%; /* 1/3 de l'écran */
height: 100vh;
border-right: 1px solid #333;
background-color: #000; /* Fond noir */
display: flex;
flex-direction: column;
}
/* Header du chat */
.chatbot-header {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
border-bottom: 1px solid #333;
}
.chatbot-header img {
width: 60px;
height: 60px;
border-radius: 50%;
margin-bottom: 10px;
}
.chatbot-header .name {
font-size: 18px;
font-weight: bold;
margin-bottom: 5px;
}
.chatbot-header .handle {
font-size: 14px;
color: #71767b;
margin-bottom: 10px;
}
.chatbot-header .description {
font-size: 14px;
color: #e1e8ed;
text-align: center;
}
/* Messages */
.chatbot-messages {
flex: 1;
overflow-y: scroll; /* Permet le défilement */
padding: 10px;
scroll-behavior: smooth; /* Défilement fluide */
}
.chatbot-messages::-webkit-scrollbar {
display: none; /* Masquer la barre de défilement */
}
.message {
display: flex;
margin-bottom: 15px;
}
.message img {
width: 40px;
height: 40px;
border-radius: 50%;
margin-right: 10px;
}
.message-content {
border-radius: 15px;
padding: 10px;
max-width: 70%;
}
.message.trump {
justify-content: flex-start; /* Aligné à gauche */
}
.message.trump .message-content {
background-color: #333; /* Messages de Trump en gris foncé */
color: #e1e8ed; /* Texte blanc */
}
.message.user {
justify-content: flex-end; /* Aligné à droite */
}
.message.user .message-content {
background-color: #1da1f2; /* Messages de l'utilisateur en bleu */
color: #fff; /* Texte blanc */
}
.timestamp {
font-size: 12px;
color: #71767b;
margin-top: 5px;
}
/* Input section */
.chatbot-input {
border-top: 1px solid #333;
padding: 10px;
display: flex;
}
.chatbot-input input {
flex: 1;
background-color: #192734;
border: 1px solid #333;
border-radius: 20px;
padding: 10px;
color: #e1e8ed;
outline: none;
font-size: 14px;
}
.chatbot-input input::placeholder {
color: #71767b; /* Texte gris clair pour le placeholder */
}
.chatbot-input button {
margin-left: 10px;
background-color: #1da1f2;
color: white;
border: none;
border-radius: 20px;
padding: 10px 15px;
cursor: pointer;
}
/* Empty white section (côté droit) */
.content {
flex: 1; /* 2/3 de l'écran */
background-color: #fff;
}
</style>
<script src="dist/svgMap.js" defer></script>
<script src="data/gdp.js" defer></script>
</head>
<body>
<div class="chatbot">
<!-- Header -->
<div class="chatbot-header">
<img src="images/donald_trump.jpg" alt="Donald Trump">
<div class="name">Donald J. Trump</div>
<div class="handle">@realDonaldTrump</div>
<div class="description">
45th President of the United States of America <br>
DonaldJTrump.com<br>
A rejoint X en mars 2009
</div>
</div>
<!-- Messages -->
<div class="chatbot-messages">
<div class="message trump">
<img src="images/donald_trump.jpg" alt="Trump">
<div>
<div class="message-content">
I want to invade Canada!
</div>
<div class="timestamp" id="timestamp-trump"></div>
</div>
</div>
<div class="message user">
<img src="images/user.png" alt="User">
<div>
<div class="message-content">
That's not a good idea, Mr. President!
</div>
<div class="timestamp" id="timestamp-user"></div>
</div>
</div>
</div>
<!-- Input -->
<div class="chatbot-input">
<input type="text" placeholder="Écrire un message...">
<button>Send</button>
</div>
</div>
<!-- Empty white section -->
<div class="content">
<div id="svgMapGPD" style="height: 100%;"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
// Ajouter les timestamps actuels
const currentDate = new Date();
const options = { day: 'numeric', month: 'long', year: 'numeric', hour: 'numeric', minute: 'numeric' };
const formattedDate = currentDate.toLocaleDateString('fr-FR', options);
document.getElementById('timestamp-trump').textContent = formattedDate;
document.getElementById('timestamp-user').textContent = formattedDate;
// Initialiser la carte
new svgMap({
targetElementID: 'svgMapGPD',
data: svgMapDataGPD,
mouseWheelZoomEnabled: true,
mouseWheelZoomWithKey: true
});
});
</script>
</body>
</html>
|