-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvotecreatenewtopic.html
283 lines (246 loc) · 10.8 KB
/
votecreatenewtopic.html
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Topic Voting - Zig Programming Tutorials Blog</title>
<!-- Include Tailwind CSS -->
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<style>
/* Override default background color */
body {
background-color: #f7f7f7; /* Light gray background */
font-family: 'sans-serif';
}
/* Update text color for better readability */
.text-dark {
color: #333; /* Dark gray text color */
}
/* Update the color of the header text */
.header-text {
color: #1a202c; /* Darker text color for the header */
}
/* Update the color of the navigation links */
.nav-link {
color: #1a202c; /* Darker text color for navigation links */
}
/* Update the color of the search bar text */
.search-bar::placeholder,
.search-bar {
color: #4a5568; /* Dark gray text color for search bar */
}
/* Update the color of the search button */
.search-button {
background-color: #f7a41d; /* Zig logo color for search button */
color: #fff; /* White text color for search button */
}
/* Update the color of the read more button */
.read-more-button {
background-color: #f7a41d; /* Zig logo color for read more button */
color: #fff; /* White text color for read more button */
}
/* Style the sidebar */
.sidebar {
width: 25%; /* Adjust the width as needed */
min-width: 200px; /* Set a minimum width */
border-left: 1px solid #ccc; /* Add a border on the left */
padding: 20px;
}
.main-content {
width: 50%; /* Adjust the width accordingly */
}
.create-post-form {
width: 25%;
padding: 20px;
}
.sidebar-heading {
color: #4a5568; /* Dark gray heading text color */
}
.sidebar-category {
color: #1e40af; /* Blue category text color */
}
.sidebar-category:hover {
color: #1a202c; /* Darker category text color on hover */
}
.create-post-button {
background-color: #f7a41d; /* Zig logo color for button */
color: #fff; /* White text color for button */
}
/* Change the button color when hovered */
.create-post-button:hover {
background-color: #f7a41d; /* Zig logo color for button (keep it the same) */
color: #fff; /* White text color for button (keep it the same) */
}
/* Voting Page Styles */
.vote-container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.topic {
border: 1px solid #e2e8f0;
margin-bottom: 10px;
padding: 15px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.topic span {
flex-grow: 1;
}
.vote-btn {
background-color: #f7a41d;
color: #fff;
padding: 8px 15px;
border: none;
cursor: pointer;
border-radius: 4px;
transition: background-color 0.3s;
}
.vote-btn:hover {
background-color: #e29100;
}
/* Custom Styles for Responsive Design */
@media (max-width: 767px) {
.lg\:hidden {
display: none !important;
}
}
@media (min-width: 768px) {
.hidden\:lg {
display: none !important;
}
}
</style>
</head>
<body class="font-sans antialiased flex flex-col min-h-screen">
<!-- Navbar -->
<nav class="bg-f7a41d text-white p-4">
<div class="container mx-auto flex justify-between items-center">
<div class="text-2xl font-bold header-text">Zig Tutorials</div>
<!-- Navigation Links -->
<ul class="hidden lg:flex space-x-4">
<li><a href="profile.html" class="nav-link hover:text-gray-300">Home</a></li>
<li><a href="#" class="nav-link hover:text-gray-300">Tutorials</a></li>
<li><a href="#" class="nav-link hover:text-gray-300">About</a></li>
<li><a href="signup.html" class="nav-link hover:text-gray-300">Sign Up</a></li>
<li><a href="login.html" class="nav-link hover:text-gray-300">Login</a></li>
<!-- Additional navigation links can be added here -->
</ul>
<!-- Hamburger Menu for Mobile -->
<div class="block lg:hidden">
<button id="mobile-menu-button" class="flex items-center px-3 py-2 border rounded text-f7a41d border-white hover:text-white hover:border-white">
<svg class="h-4 w-4 fill-current" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<title>Menu</title>
<path fill-rule="evenodd" d="M20 3H0V1h20v2zm0 6H0V7h20v2zm0 6H0v-2h20v2z" clip-rule="evenodd"></path>
</svg>
</button>
</div>
</div>
</nav>
<!-- Mobile Menu -->
<div class="hidden lg:hidden" id="mobile-menu">
<ul class="flex flex-col items-center mt-4">
<li><a href="profile.html" class="nav-link hover:text-gray-300">Home</a></li>
<li><a href="#" class="nav-link hover:text-gray-300">Tutorials</a></li>
<li><a href="#" class="nav-link hover:text-gray-300">About</a></li>
<li><a href="signup.html" class="nav-link hover:text-gray-300">Sign Up</a></li>
<li><a href="login.html" class="nav-link hover:text-gray-300">Login</a></li>
<!-- Additional navigation links can be added here -->
</ul>
</div>
<div class="flex-grow container mx-auto py-8 flex justify-between">
<!-- Sidebar with User Picture -->
<aside class="sidebar">
<div class="bg-white rounded shadow-md overflow-hidden mb-6">
<!-- Placeholder for user picture -->
<img src="images/defaultuserimage.png" alt="User Picture" class="w-full h-auto object-cover">
</div>
<!-- Section for Links and Progress -->
<div class="bg-white rounded shadow-md p-4 mb-6">
<!-- Links Section -->
<div class="mb-4">
<h2 class="text-xl font-bold mb-2">My Links</h2>
<ul class="text-gray-600">
<li><a href="createpost.html" class="block py-1">Create Posts</a></li>
<li><a href="#" class="block py-1">My Posts</a></li>
<li><a href="#" class="block py-1">My Favorites</a></li>
</ul>
</div>
<!-- Progress Bar for Zig Learning Pathway -->
<div class="mb-4">
<h2 class="text-xl font-bold mb-2">Zig Learning Pathway</h2>
<p class="text-gray-600 mb-2">Your Progress:</p>
<!-- Replace the width percentage with actual progress -->
<div class="bg-gray-300 h-4 rounded-md overflow-hidden">
<div class="bg-yellow-500 h-full" style="width: 50%;"></div>
</div>
<a href="pathway.html" class="block text-yellow-500 mt-2">Continue Learning</a>
</div>
</div>
</aside>
<!-- Main Content -->
<main class="main-content">
<div class="vote-container">
<h1 class="text-3xl font-bold mb-4 header-text text-center">Vote and Create Topics</h1>
<!-- Sample Topic -->
<div class="topic">
<span>Create a CLI Tool</span>
<button class="vote-btn">Vote</button>
</div>
<!-- Sample Topic -->
<div class="topic">
<span>Create a Web Backend</span>
<button class="vote-btn">Vote</button>
</div>
</main>
<!-- Sidebar for Create New Topic -->
<aside class="create-post-form">
<form class="bg-white rounded shadow-md p-4" action="#" method="POST">
<h2 class="text-xl font-bold mb-4">Create New Topic</h2>
<!-- Title input -->
<div class="mb-4">
<label for="newTopicTitle" class="block mb-2">Title:</label>
<input type="text" id="newTopicTitle" name="newTopicTitle" class="w-full border rounded px-3 py-2" placeholder="Enter the title of your topic" required>
</div>
<!-- Description input -->
<div class="mb-4">
<label for="newTopicDescription" class="block mb-2">Description:</label>
<textarea id="newTopicDescription" name="newTopicDescription" class="w-full border rounded px-3 py-2" placeholder="Enter a brief description of your topic" rows="4" required></textarea>
</div>
<!-- Category Selection -->
<div class="mb-4">
<label for="newTopicCategory" class="block mb-2">Select Category:</label>
<select id="newTopicCategory" name="newTopicCategory" class="w-full border rounded px-3 py-2" required>
<option value="cli">CLI Tools</option>
<option value="web">Web Development</option>
<!-- Add more categories as needed -->
</select>
</div>
<!-- Submit Topic Button -->
<div class="mb-4">
<button type="submit" class="w-full inline-block px-4 py-2 rounded hover:bg-yellow-500 transition duration-300 create-post-button">Submit Topic</button>
</div>
</form>
</aside>
</div>
<!-- Footer -->
<footer class="bg-gray-900 text-white text-center py-4 mt-auto">
<p>© 2024 Zig Tutorials Blog. All rights reserved.</p>
</footer>
<!-- Script to Toggle Mobile Menu -->
<script>
document.getElementById('mobile-menu-button').onclick = function () {
var mobileMenu = document.getElementById('mobile-menu');
if (mobileMenu.style.display === 'block') {
mobileMenu.style.display = 'none';
} else {
mobileMenu.style.display = 'block';
}
};
</script>
</body>
</html>