Spaces:
Running
Running
Upload 2 files
Browse files- index.html +47 -26
index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 7 |
-
<title>Chat Animator
|
| 8 |
<style>
|
| 9 |
html, body {
|
| 10 |
margin: 0;
|
|
@@ -18,11 +18,27 @@
|
|
| 18 |
background: #f0f2f5;
|
| 19 |
width: 100%;
|
| 20 |
max-width: 360px;
|
| 21 |
-
height:
|
| 22 |
margin: auto;
|
| 23 |
padding: 10px;
|
| 24 |
font-family: sans-serif;
|
| 25 |
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
| 27 |
.character, .message {
|
| 28 |
display: flex;
|
|
@@ -39,41 +55,46 @@
|
|
| 39 |
padding: 10px 14px;
|
| 40 |
border-radius: 20px;
|
| 41 |
max-width: 70%;
|
| 42 |
-
|
| 43 |
opacity: 0;
|
| 44 |
animation: fadeIn 1s forwards;
|
| 45 |
}
|
| 46 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
width: 100%;
|
| 48 |
-
margin-top: 10px;
|
| 49 |
}
|
| 50 |
-
input, select, button {
|
| 51 |
padding: 6px;
|
| 52 |
-
margin: 4px 0;
|
| 53 |
width: 100%;
|
| 54 |
-
|
| 55 |
-
@keyframes fadeIn {
|
| 56 |
-
to {
|
| 57 |
-
opacity: 1;
|
| 58 |
-
}
|
| 59 |
-
}
|
| 60 |
-
.typing {
|
| 61 |
-
font-style: italic;
|
| 62 |
-
opacity: 0.6;
|
| 63 |
-
animation: fadeIn 0.8s forwards;
|
| 64 |
-
}
|
| 65 |
-
#recordArea {
|
| 66 |
-
background: white;
|
| 67 |
-
padding: 10px;
|
| 68 |
-
border-radius: 12px;
|
| 69 |
-
width: 360px;
|
| 70 |
-
height: 640px;
|
| 71 |
-
overflow-y: auto;
|
| 72 |
}
|
| 73 |
</style>
|
| 74 |
</head>
|
| 75 |
<body>
|
| 76 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
<script type="module" src="main.js"></script>
|
| 78 |
</body>
|
| 79 |
</html>
|
|
|
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 7 |
+
<title>Chat Animator Enhanced</title>
|
| 8 |
<style>
|
| 9 |
html, body {
|
| 10 |
margin: 0;
|
|
|
|
| 18 |
background: #f0f2f5;
|
| 19 |
width: 100%;
|
| 20 |
max-width: 360px;
|
| 21 |
+
height: 720px;
|
| 22 |
margin: auto;
|
| 23 |
padding: 10px;
|
| 24 |
font-family: sans-serif;
|
| 25 |
box-sizing: border-box;
|
| 26 |
+
position: relative;
|
| 27 |
+
}
|
| 28 |
+
video#bg {
|
| 29 |
+
position: absolute;
|
| 30 |
+
width: 100%;
|
| 31 |
+
height: 100%;
|
| 32 |
+
object-fit: cover;
|
| 33 |
+
z-index: 0;
|
| 34 |
+
}
|
| 35 |
+
.chat {
|
| 36 |
+
position: relative;
|
| 37 |
+
z-index: 2;
|
| 38 |
+
flex: 1;
|
| 39 |
+
overflow-y: auto;
|
| 40 |
+
width: 100%;
|
| 41 |
+
margin-top: 10px;
|
| 42 |
}
|
| 43 |
.character, .message {
|
| 44 |
display: flex;
|
|
|
|
| 55 |
padding: 10px 14px;
|
| 56 |
border-radius: 20px;
|
| 57 |
max-width: 70%;
|
| 58 |
+
font-size: 14px;
|
| 59 |
opacity: 0;
|
| 60 |
animation: fadeIn 1s forwards;
|
| 61 |
}
|
| 62 |
+
.left .bubble { background: #eee; color: #000; }
|
| 63 |
+
.right .bubble { background: #007aff; color: #fff; }
|
| 64 |
+
.whatsapp .left .bubble { background: #dcf8c6; }
|
| 65 |
+
.imessage .right .bubble { background: #007aff; }
|
| 66 |
+
.reddit .bubble { background: #f6f7f8; border-left: 4px solid #ff4500; }
|
| 67 |
+
.instagram .bubble { background: #fff0f5; }
|
| 68 |
+
@keyframes fadeIn {
|
| 69 |
+
to { opacity: 1; }
|
| 70 |
+
}
|
| 71 |
+
.controls {
|
| 72 |
+
position: relative;
|
| 73 |
+
z-index: 3;
|
| 74 |
width: 100%;
|
|
|
|
| 75 |
}
|
| 76 |
+
.controls input, .controls select, .controls button {
|
| 77 |
padding: 6px;
|
|
|
|
| 78 |
width: 100%;
|
| 79 |
+
margin-top: 6px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
</style>
|
| 82 |
</head>
|
| 83 |
<body>
|
| 84 |
+
<div class="app">
|
| 85 |
+
<video id="bg" autoplay muted loop></video>
|
| 86 |
+
<div class="controls">
|
| 87 |
+
<input type="file" accept="video/mp4" onchange="setBg(event)">
|
| 88 |
+
<select id="styleSelect" onchange="setStyle()">
|
| 89 |
+
<option value="whatsapp">WhatsApp</option>
|
| 90 |
+
<option value="imessage">iMessage</option>
|
| 91 |
+
<option value="reddit">Reddit</option>
|
| 92 |
+
<option value="instagram">Instagram</option>
|
| 93 |
+
</select>
|
| 94 |
+
<button id="recordBtn">🎬 Export MP4</button>
|
| 95 |
+
</div>
|
| 96 |
+
<div id="chat" class="chat whatsapp"></div>
|
| 97 |
+
</div>
|
| 98 |
<script type="module" src="main.js"></script>
|
| 99 |
</body>
|
| 100 |
</html>
|