Go back to the all uqestions panel and new post template
Browse files- index.html +13 -18
- script.js +4 -5
index.html
CHANGED
|
@@ -40,26 +40,21 @@
|
|
| 40 |
<i data-feather="inbox" class="w-4 h-4"></i>
|
| 41 |
<span>All Questions</span>
|
| 42 |
</a>
|
| 43 |
-
<a href="#" class="nav-subitem ml-8" id="unanswered-link">
|
| 44 |
<i data-feather="help-circle" class="w-4 h-4"></i>
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
</li>
|
| 48 |
<li>
|
| 49 |
-
<a href="#" class="nav-item
|
| 50 |
-
|
| 51 |
<span>My Posts</span>
|
| 52 |
</a>
|
| 53 |
</li>
|
| 54 |
-
<
|
| 55 |
-
<a href="#" class="nav-item" id="recent-link">
|
| 56 |
-
<i data-feather="clock" class="w-4 h-4"></i>
|
| 57 |
-
<span>Recent</span>
|
| 58 |
-
</a>
|
| 59 |
-
</li>
|
| 60 |
-
<li>
|
| 61 |
-
<a href="#" class="nav-item" id="following-link">
|
| 62 |
-
<i data-feather="bookmark" class="w-4 h-4"></i>
|
| 63 |
<span>Following</span>
|
| 64 |
</a>
|
| 65 |
</li>
|
|
@@ -80,8 +75,8 @@
|
|
| 80 |
<!-- Main Content Area -->
|
| 81 |
<main class="flex-1" id="main-content">
|
| 82 |
<!-- Panel 1: Default View & Post Creation -->
|
| 83 |
-
<div id="panel-1"
|
| 84 |
-
|
| 85 |
<input type="text" placeholder="Search Questions..." class="search-input">
|
| 86 |
<i data-feather="search" class="search-icon"></i>
|
| 87 |
<div class="absolute right-4 top-1/2 transform -translate-y-1/2 flex items-center">
|
|
@@ -129,8 +124,8 @@
|
|
| 129 |
<!-- Posts will be inserted here by JavaScript -->
|
| 130 |
</ul>
|
| 131 |
</div>
|
| 132 |
-
<!-- Panel 3: Viewing Responses
|
| 133 |
-
<div id="panel-3">
|
| 134 |
<div class="flex gap-6">
|
| 135 |
<!-- Master Column -->
|
| 136 |
<div class="w-1/3">
|
|
|
|
| 40 |
<i data-feather="inbox" class="w-4 h-4"></i>
|
| 41 |
<span>All Questions</span>
|
| 42 |
</a>
|
|
|
|
| 43 |
<i data-feather="help-circle" class="w-4 h-4"></i>
|
| 44 |
+
</li>
|
| 45 |
+
<li>
|
| 46 |
+
<a href="#" class="nav-item active" id="all-questions-link">
|
| 47 |
+
<i data-feather="user" class="w-4 h-4"></i>
|
| 48 |
+
<span>All Questions</span>
|
| 49 |
+
</a>
|
| 50 |
</li>
|
| 51 |
<li>
|
| 52 |
+
<a href="#" class="nav-item" id="my-posts-link">
|
| 53 |
+
<i data-feather="clock" class="w-4 h-4"></i>
|
| 54 |
<span>My Posts</span>
|
| 55 |
</a>
|
| 56 |
</li>
|
| 57 |
+
<i data-feather="bookmark" class="w-4 h-4"></i>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
<span>Following</span>
|
| 59 |
</a>
|
| 60 |
</li>
|
|
|
|
| 75 |
<!-- Main Content Area -->
|
| 76 |
<main class="flex-1" id="main-content">
|
| 77 |
<!-- Panel 1: Default View & Post Creation -->
|
| 78 |
+
<div id="panel-1">
|
| 79 |
+
<div class="search-container mb-6 relative">
|
| 80 |
<input type="text" placeholder="Search Questions..." class="search-input">
|
| 81 |
<i data-feather="search" class="search-icon"></i>
|
| 82 |
<div class="absolute right-4 top-1/2 transform -translate-y-1/2 flex items-center">
|
|
|
|
| 124 |
<!-- Posts will be inserted here by JavaScript -->
|
| 125 |
</ul>
|
| 126 |
</div>
|
| 127 |
+
<!-- Panel 3: Viewing Responses -->
|
| 128 |
+
<div id="panel-3" class="hidden">
|
| 129 |
<div class="flex gap-6">
|
| 130 |
<!-- Master Column -->
|
| 131 |
<div class="w-1/3">
|
script.js
CHANGED
|
@@ -66,13 +66,12 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 66 |
// Reset form
|
| 67 |
postForm.reset();
|
| 68 |
});
|
| 69 |
-
// Initialize with
|
| 70 |
document.addEventListener('DOMContentLoaded', function() {
|
| 71 |
-
setActiveNav(
|
| 72 |
-
|
| 73 |
updateUnansweredCount();
|
| 74 |
-
|
| 75 |
-
// Store sample posts for later use
|
| 76 |
window.placeholderPosts = [
|
| 77 |
{
|
| 78 |
title: "Binary Search Tree Implementation",
|
|
|
|
| 66 |
// Reset form
|
| 67 |
postForm.reset();
|
| 68 |
});
|
| 69 |
+
// Initialize with All Questions panel by default
|
| 70 |
document.addEventListener('DOMContentLoaded', function() {
|
| 71 |
+
setActiveNav(allQuestionsLink);
|
| 72 |
+
showPanel1();
|
| 73 |
updateUnansweredCount();
|
| 74 |
+
// Store sample posts for later use
|
|
|
|
| 75 |
window.placeholderPosts = [
|
| 76 |
{
|
| 77 |
title: "Binary Search Tree Implementation",
|