-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html
More file actions
105 lines (92 loc) · 6 KB
/
Copy pathpost.html
File metadata and controls
105 lines (92 loc) · 6 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create Post | AI Dream Chat</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
// Customizing the Tailwind color for the main brand color
tailwind.config = {
theme: {
extend: {
colors: {
// Define your primary brand color
'brand-primary': '#68074C',
'brand-hover': '#4a0535',
}
}
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
<body class="bg-gray-50 min-h-screen antialiased">
<nav class="sticky top-0 z-50 bg-white shadow-lg">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center">
<svg class="w-8 h-8 text-brand-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m-8-4v10l8 4m8-4V7m-8 4v10m0-10l-8 4m8-4v4"></path></svg>
<p class="ml-2 text-xl font-bold text-gray-900">AI Dream Chat</p>
</div>
<div class="hidden md:flex space-x-6 text-base font-medium">
<a href="dashboard.html" class="text-gray-600 hover:text-brand-primary transition duration-150">Dashboard</a>
<a href="#" class="text-gray-600 hover:text-brand-primary transition duration-150">Profile</a>
<a href="groups.html" class="text-gray-600 hover:text-brand-primary transition duration-150">Group</a>
<button onclick="logout()" class="text-sm text-gray-500 hover:text-red-600 transition duration-150 ease-in-out py-1 px-3 border border-gray-300 rounded-md ml-4">
Logout
</button>
</div>
<div class="flex md:hidden">
<button id="mobile-menu-button" type="button" class="text-gray-600 hover:text-brand-primary focus:outline-none" aria-controls="mobile-menu" aria-expanded="false">
<svg id="menu-icon" class="w-6 h-6 block" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg>
<svg id="close-icon" class="w-6 h-6 hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
</button>
</div>
</div>
</div>
<div id="mobile-menu" class="hidden md:hidden">
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3 border-t border-gray-100">
<a href="dashboard.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-brand-primary transition duration-150">Dashboard</a>
<a href="#" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-brand-primary transition duration-150">Profile</a>
<a href="#" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-brand-primary transition duration-150">Group</a>
<button onclick="logout()" class="w-full text-left block px-3 py-2 rounded-md text-base font-medium text-red-600 hover:bg-red-50 transition duration-150">
Logout
</button>
</div>
</div>
</nav>
<main class="py-12 px-4 sm:px-6 lg:px-8">
<div class="max-w-xl mx-auto">
<div class="bg-white shadow-2xl rounded-xl p-6 sm:p-8 border border-gray-100">
<h2 class="text-3xl font-extrabold text-center text-gray-900 mb-8">Tell us about your dream</h2>
<form id="postForm" class="space-y-6">
<label for="title" class="block text-sm font-medium text-gray-700 sr-only">Post Title</label>
<input id="title" type="text" placeholder="A catchy post title..."
class="w-full p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-brand-primary focus:border-brand-primary transition duration-150 ease-in-out shadow-sm placeholder-gray-500 text-lg"
required>
<label for="content" class="block text-sm font-medium text-gray-700 sr-only">Post Content</label>
<textarea id="content" placeholder="Share your dream or thoughts here..."
class="w-full p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-brand-primary focus:border-brand-primary transition duration-150 ease-in-out shadow-sm placeholder-gray-500 text-lg resize-y"
rows="8"
required></textarea>
<button type="submit"
class="w-full bg-brand-primary hover:bg-brand-hover text-white font-semibold py-4 rounded-lg text-lg tracking-wider transition duration-300 ease-in-out transform hover:scale-[1.01] shadow-lg hover:shadow-xl">
Publish Post
</button>
</form>
<div class="mt-6 space-y-3">
<p id="error" class="text-red-600 text-center font-medium"></p>
<p id="success" class="text-green-600 text-center font-medium"></p>
</div>
</div>
<div class="text-center mt-6 md:hidden">
<button onclick="logout()" class="text-base text-gray-500 hover:text-red-600 font-medium transition duration-150">
Logout
</button>
</div>
</div>
</main>
<script src="post.js"></script>
</body>
</html>