Spaces:
Running

File size: 1,920 Bytes
b7c8dfe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Let Talk</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <style>
    body {
      margin: 0;
      font-family: Arial;
      background: #0f0f0f;
      color: white;
    }

    header {
      background: #ff1a1a;
      padding: 15px;
      text-align: center;
      font-size: 24px;
      font-weight: bold;
    }

    .container {
      padding: 20px;
    }

    .post-box {
      background: #1c1c1c;
      padding: 15px;
      border-radius: 10px;
      margin-bottom: 20px;
    }

    input, textarea {
      width: 100%;
      padding: 10px;
      margin-top: 10px;
      border-radius: 5px;
      border: none;
    }

    button {
      margin-top: 10px;
      padding: 10px;
      background: #ff1a1a;
      color: white;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }

    .post {
      background: #262626;
      padding: 10px;
      border-radius: 8px;
      margin-top: 10px;
    }
  </style>
</head>

<body>

<header>🔥 Let Talk</header>

<div class="container">

  <div class="post-box">
    <h3>Create Post</h3>
    <input type="text" id="username" placeholder="Your name">
    <textarea id="content" placeholder="What's on your mind?"></textarea>
    <button onclick="addPost()">Post</button>
  </div>

  <div id="feed"></div>

</div>

<script>
  function addPost() {
    const username = document.getElementById("username").value;
    const content = document.getElementById("content").value;

    if (!username || !content) {
      alert("Fill all fields!");
      return;
    }

    const post = document.createElement("div");
    post.className = "post";
    post.innerHTML = "<b>" + username + "</b><p>" + content + "</p>";

    document.getElementById("feed").prepend(post);

    document.getElementById("content").value = "";
  }
</script>

</body>
</html>