File size: 7,392 Bytes
819efbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en" class="h-full">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Chatty McChatFace</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: {
                            50: '#f0f9ff',
                            100: '#e0f2fe',
                            200: '#bae6fd',
                            300: '#7dd3fc',
                            400: '#38bdf8',
                            500: '#0ea5e9',
                            600: '#0284c7',
                            700: '#0369a1',
                            800: '#075985',
                            900: '#0c4a6e',
                        },
                        secondary: {
                            50: '#f5f3ff',
                            100: '#ede9fe',
                            200: '#ddd6fe',
                            300: '#c4b5fd',
                            400: '#a78bfa',
                            500: '#8b5cf6',
                            600: '#7c3aed',
                            700: '#6d28d9',
                            800: '#5b21b6',
                            900: '#4c1d95',
                        }
                    }
                }
            }
        }
    </script>
</head>
<body class="bg-gray-50 h-full flex flex-col">
    <div class="flex flex-col h-full">
        <!-- Sidebar -->
        <div class="hidden md:flex md:w-64 md:flex-col fixed inset-y-0">
            <div class="flex flex-col h-full bg-gray-900 text-white">
                <div class="flex items-center justify-between p-4 border-b border-gray-700">
                    <button class="rounded-lg p-2 hover:bg-gray-700">
                        <i data-feather="plus"></i>
                    </button>
                    <button class="rounded-lg p-2 hover:bg-gray-700">
                        <i data-feather="menu"></i>
                    </button>
                </div>
                <div class="flex-1 overflow-y-auto">
                    <div class="p-4 space-y-2">
                        <button class="w-full text-left p-2 rounded-md hover:bg-gray-700 flex items-center">
                            <i data-feather="message-square" class="mr-2 w-4 h-4"></i>
                            <span class="truncate">New Conversation</span>
                        </button>
                        <div class="text-xs text-gray-400 mt-4 mb-2 px-2">Today</div>
                        <button class="w-full text-left p-2 rounded-md hover:bg-gray-700 flex items-center">
                            <i data-feather="message-square" class="mr-2 w-4 h-4"></i>
                            <span class="truncate">How to center a div?</span>
                        </button>
                    </div>
                </div>
                <div class="p-4 border-t border-gray-700">
                    <button class="w-full flex items-center p-2 rounded-md hover:bg-gray-700">
                        <div class="w-8 h-8 rounded-full bg-primary-500 flex items-center justify-center mr-2">
                            <i data-feather="user" class="w-4 h-4 text-white"></i>
                        </div>
                        <span class="truncate">User Account</span>
                    </button>
                </div>
            </div>
        </div>

        <!-- Main Content -->
        <div class="flex-1 md:ml-64">
            <!-- Chat Area -->
            <div class="flex flex-col h-full">
                <!-- Messages -->
                <div class="flex-1 overflow-y-auto p-4 space-y-6">
                    <div class="max-w-3xl mx-auto">
                        <div class="flex items-start space-x-4">
                            <div class="w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center">
                                <i data-feather="user" class="text-gray-600"></i>
                            </div>
                            <div class="flex-1">
                                <div class="bg-white p-4 rounded-lg shadow-sm">
                                    <p>How can I center a div horizontally and vertically?</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="max-w-3xl mx-auto">
                        <div class="flex items-start space-x-4">
                            <div class="w-10 h-10 rounded-full bg-primary-500 flex items-center justify-center">
                                <i data-feather="cpu" class="text-white"></i>
                            </div>
                            <div class="flex-1">
                                <div class="bg-gray-50 p-4 rounded-lg shadow-sm">
                                    <p>You can center a div using CSS Flexbox or CSS Grid. Here are examples for both methods:</p>
                                    <div class="mt-4 bg-gray-100 p-3 rounded-md">
                                        <pre class="text-sm text-gray-800">/* Flexbox method */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}</pre>
                                    </div>
                                    <div class="mt-4 bg-gray-100 p-3 rounded-md">
                                        <pre class="text-sm text-gray-800">/* Grid method */
.container {
    display: grid;
    place-items: center;
    height: 100vh;
}</pre>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Input Area -->
                <div class="border-t border-gray-200 p-4">
                    <div class="max-w-3xl mx-auto">
                        <div class="relative">
                            <textarea 
                                class="w-full p-4 pr-16 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent resize-none" 
                                rows="1" 
                                placeholder="Message Chatty McChatFace..."
                                style="min-height: 60px;"></textarea>
                            <button class="absolute right-3 bottom-3 p-2 rounded-md bg-primary-500 text-white hover:bg-primary-600">
                                <i data-feather="send"></i>
                            </button>
                        </div>
                        <p class="text-xs text-gray-500 mt-2 text-center">
                            Chatty McChatFace can make mistakes. Consider checking important information.
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="script.js"></script>
    <script>
        feather.replace();
    </script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>