Spaces:
Running
Running
Update chat.html
Browse files
chat.html
CHANGED
|
@@ -3,176 +3,34 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Secure Chat
|
| 7 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
|
| 8 |
-
|
| 9 |
<style>
|
| 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 |
-
.chat-header {
|
| 35 |
-
background: #2f855a;
|
| 36 |
-
color: white;
|
| 37 |
-
padding: 15px 20px;
|
| 38 |
-
text-align: center;
|
| 39 |
-
position: relative;
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
.security-badge {
|
| 43 |
-
position: absolute;
|
| 44 |
-
top: 10px;
|
| 45 |
-
right: 15px;
|
| 46 |
-
background: #68d391;
|
| 47 |
-
padding: 4px 8px;
|
| 48 |
-
border-radius: 12px;
|
| 49 |
-
font-size: 0.7em;
|
| 50 |
-
font-weight: bold;
|
| 51 |
-
}
|
| 52 |
-
|
| 53 |
-
.encryption-notice {
|
| 54 |
-
text-align: center;
|
| 55 |
-
padding: 8px;
|
| 56 |
-
background: #c6f6d5;
|
| 57 |
-
color: #22543d;
|
| 58 |
-
font-size: 0.8em;
|
| 59 |
-
border-bottom: 1px solid #9ae6b4;
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
.key-input {
|
| 63 |
-
width: 90%;
|
| 64 |
-
margin: 10px auto;
|
| 65 |
-
display: block;
|
| 66 |
-
padding: 10px 12px;
|
| 67 |
-
border: 2px solid #9ae6b4;
|
| 68 |
-
border-radius: 10px;
|
| 69 |
-
font-size: 14px;
|
| 70 |
-
text-align: center;
|
| 71 |
-
background: #fafffa;
|
| 72 |
-
transition: border-color 0.3s;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
.key-input:focus {
|
| 76 |
-
border-color: #48bb78;
|
| 77 |
-
outline: none;
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
.messages-container {
|
| 81 |
-
flex: 1;
|
| 82 |
-
padding: 20px;
|
| 83 |
-
overflow-y: auto;
|
| 84 |
-
background: #f7faf7;
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
.message {
|
| 88 |
-
margin-bottom: 15px;
|
| 89 |
-
padding: 10px 15px;
|
| 90 |
-
border-radius: 15px;
|
| 91 |
-
max-width: 80%;
|
| 92 |
-
word-wrap: break-word;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
.message.own {
|
| 96 |
-
background: #68d391;
|
| 97 |
-
color: #1a202c;
|
| 98 |
-
margin-left: auto;
|
| 99 |
-
border-bottom-right-radius: 5px;
|
| 100 |
-
}
|
| 101 |
-
|
| 102 |
-
.message.other {
|
| 103 |
-
background: #e6fffa;
|
| 104 |
-
color: #2f855a;
|
| 105 |
-
border-bottom-left-radius: 5px;
|
| 106 |
-
}
|
| 107 |
-
|
| 108 |
-
.message-info {
|
| 109 |
-
font-size: 0.8em;
|
| 110 |
-
opacity: 0.7;
|
| 111 |
-
margin-bottom: 3px;
|
| 112 |
-
}
|
| 113 |
-
|
| 114 |
-
.input-container {
|
| 115 |
-
padding: 15px 20px;
|
| 116 |
-
background: white;
|
| 117 |
-
border-top: 1px solid #c6f6d5;
|
| 118 |
-
display: flex;
|
| 119 |
-
flex-direction: column;
|
| 120 |
-
gap: 10px;
|
| 121 |
-
}
|
| 122 |
-
|
| 123 |
-
.message-input {
|
| 124 |
-
width: 100%;
|
| 125 |
-
height: 70px;
|
| 126 |
-
resize: none;
|
| 127 |
-
padding: 12px 15px;
|
| 128 |
-
border: 2px solid #c6f6d5;
|
| 129 |
-
border-radius: 12px;
|
| 130 |
-
outline: none;
|
| 131 |
-
font-size: 15px;
|
| 132 |
-
line-height: 1.4;
|
| 133 |
-
transition: border-color 0.3s;
|
| 134 |
-
background: #fafffa;
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
-
.message-input:focus {
|
| 138 |
-
border-color: #48bb78;
|
| 139 |
-
}
|
| 140 |
-
|
| 141 |
-
.button-row {
|
| 142 |
-
display: flex;
|
| 143 |
-
justify-content: space-between;
|
| 144 |
-
align-items: center;
|
| 145 |
-
}
|
| 146 |
-
|
| 147 |
-
.send-button, .clear-button {
|
| 148 |
-
padding: 10px 20px;
|
| 149 |
-
border: none;
|
| 150 |
-
border-radius: 25px;
|
| 151 |
-
font-weight: bold;
|
| 152 |
-
cursor: pointer;
|
| 153 |
-
transition: background 0.3s;
|
| 154 |
-
}
|
| 155 |
-
|
| 156 |
-
.send-button {
|
| 157 |
-
background: #48bb78;
|
| 158 |
-
color: white;
|
| 159 |
-
}
|
| 160 |
-
|
| 161 |
-
.send-button:hover { background: #38a169; }
|
| 162 |
-
|
| 163 |
-
.clear-button {
|
| 164 |
-
background: #e53e3e;
|
| 165 |
-
color: white;
|
| 166 |
-
}
|
| 167 |
-
|
| 168 |
-
.clear-button:hover { background: #c53030; }
|
| 169 |
-
|
| 170 |
-
.messages-container::-webkit-scrollbar { width: 6px; }
|
| 171 |
-
.messages-container::-webkit-scrollbar-thumb { background: #a0aec0; border-radius: 3px; }
|
| 172 |
-
.messages-container::-webkit-scrollbar-thumb:hover { background: #718096; }
|
| 173 |
</style>
|
| 174 |
</head>
|
| 175 |
-
|
| 176 |
<body>
|
| 177 |
<div class="chat-container">
|
| 178 |
<div class="chat-header">
|
|
@@ -329,3 +187,4 @@ document.addEventListener('DOMContentLoaded',()=>new SecureChat());
|
|
| 329 |
</script>
|
| 330 |
</body>
|
| 331 |
</html>
|
|
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Secure Chat 🔒</title>
|
|
|
|
|
|
|
| 7 |
<style>
|
| 8 |
+
/* базовые стили (зелёные тона) */
|
| 9 |
+
* { margin:0; padding:0; box-sizing:border-box; }
|
| 10 |
+
body { font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg,#48bb78 0%,#2f855a 100%); height:100vh; display:flex; justify-content:center; align-items:center; padding:20px; }
|
| 11 |
+
.chat-container { width:100%; max-width:500px; height:700px; background:white; border-radius:15px; display:flex; flex-direction:column; overflow:hidden; }
|
| 12 |
+
.chat-header { background:#2f855a; color:white; padding:15px 20px; text-align:center; position:relative; }
|
| 13 |
+
.security-badge { position:absolute; top:10px; right:15px; background:#38a169; padding:4px 8px; border-radius:12px; font-size:0.7em; font-weight:bold; }
|
| 14 |
+
.messages-container { flex:1; padding:20px; overflow-y:auto; background:#f0fff4; }
|
| 15 |
+
.message { margin-bottom:15px; padding:10px 15px; border-radius:15px; max-width:80%; word-wrap:break-word; }
|
| 16 |
+
.message.own { background:#48bb78; color:white; margin-left:auto; border-bottom-right-radius:5px; }
|
| 17 |
+
.message.other { background:#c6f6d5; color:#2f855a; border-bottom-left-radius:5px; }
|
| 18 |
+
.message-info { font-size:0.8em; opacity:0.7; margin-bottom:3px; }
|
| 19 |
+
.input-container { padding:15px 20px; display:flex; gap:10px; align-items:center; border-top:1px solid #9ae6b4; background:white; }
|
| 20 |
+
.message-input { flex:1; padding:12px 15px; border:2px solid #9ae6b4; border-radius:25px; outline:none; font-size:14px; }
|
| 21 |
+
.message-input:focus { border-color:#38a169; }
|
| 22 |
+
.send-button { padding:12px 20px; background:#38a169; color:white; border:none; border-radius:25px; cursor:pointer; font-weight:bold; }
|
| 23 |
+
.send-button:hover { background:#2f855a; }
|
| 24 |
+
.clear-button { padding:8px 15px; background:#e53e3e; color:white; border:none; border-radius:20px; cursor:pointer; font-size:0.9em; margin-left:10px; }
|
| 25 |
+
.clear-button:hover { background:#c53030; }
|
| 26 |
+
.read-button { padding:8px 15px; background:#1a202c; color:white; border:none; border-radius:20px; cursor:pointer; font-size:0.9em; margin-left:10px; }
|
| 27 |
+
.read-button:hover { background:#2d3748; }
|
| 28 |
+
.messages-container::-webkit-scrollbar { width:6px; }
|
| 29 |
+
.messages-container::-webkit-scrollbar-track { background:#f1f1f1; }
|
| 30 |
+
.messages-container::-webkit-scrollbar-thumb { background:#cbd5e0; border-radius:3px; }
|
| 31 |
+
.messages-container::-webkit-scrollbar-thumb:hover { background:#a0aec0; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
</style>
|
| 33 |
</head>
|
|
|
|
| 34 |
<body>
|
| 35 |
<div class="chat-container">
|
| 36 |
<div class="chat-header">
|
|
|
|
| 187 |
</script>
|
| 188 |
</body>
|
| 189 |
</html>
|
| 190 |
+
|