iprofitx commited on
Commit
ea6e6ce
·
verified ·
1 Parent(s): 5f781eb

I cannot see the articles

Browse files
Files changed (6) hide show
  1. README.md +8 -5
  2. articles.html +89 -0
  3. components/navbar.js +75 -0
  4. index.html +117 -19
  5. script.js +43 -0
  6. style.css +23 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Helphub Knowledge Base Explorer
3
- emoji: 📈
4
- colorFrom: gray
5
- colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: HelpHub Knowledge Base Explorer 🔍
3
+ colorFrom: green
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
articles.html ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>All Articles - HelpHub</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script src="components/navbar.js"></script>
11
+ <script src="components/article-card.js"></script>
12
+ <script src="components/footer.js"></script>
13
+ </head>
14
+ <body class="bg-gray-50">
15
+ <custom-navbar></custom-navbar>
16
+
17
+ <main class="container mx-auto px-4 py-8">
18
+ <div class="flex justify-between items-center mb-8">
19
+ <h1 class="text-3xl font-bold text-gray-800">All Articles</h1>
20
+ <div class="relative w-64">
21
+ <input type="text" placeholder="Search articles..." class="w-full pl-4 pr-10 py-2 border border-gray-300 rounded-lg focus:ring-blue-500 focus:border-blue-500">
22
+ <i data-feather="search" class="absolute right-3 top-2.5 text-gray-400"></i>
23
+ </div>
24
+ </div>
25
+
26
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
27
+ <custom-article-card
28
+ title="How to reset your password"
29
+ excerpt="Step-by-step guide to resetting your account password"
30
+ category="Account"
31
+ date="2 days ago"
32
+ views="124">
33
+ </custom-article-card>
34
+ <custom-article-card
35
+ title="Understanding your invoice"
36
+ excerpt="Learn how to read and understand your billing statement"
37
+ category="Billing"
38
+ date="1 week ago"
39
+ views="89">
40
+ </custom-article-card>
41
+ <custom-article-card
42
+ title="Two-factor authentication setup"
43
+ excerpt="Secure your account with 2FA for added protection"
44
+ category="Security"
45
+ date="3 weeks ago"
46
+ views="215">
47
+ </custom-article-card>
48
+ <custom-article-card
49
+ title="Getting started with our platform"
50
+ excerpt="Complete beginner's guide to using our service"
51
+ category="Getting Started"
52
+ date="1 month ago"
53
+ views="342">
54
+ </custom-article-card>
55
+ <custom-article-card
56
+ title="Managing your subscription"
57
+ excerpt="How to upgrade, downgrade or cancel your plan"
58
+ category="Billing"
59
+ date="1 month ago"
60
+ views="187">
61
+ </custom-article-card>
62
+ <custom-article-card
63
+ title="Account security best practices"
64
+ excerpt="Tips to keep your account safe and secure"
65
+ category="Security"
66
+ date="2 months ago"
67
+ views="276">
68
+ </custom-article-card>
69
+ </div>
70
+
71
+ <div class="flex justify-center mt-10">
72
+ <nav class="inline-flex rounded-md shadow">
73
+ <a href="#" class="px-3 py-2 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-50">Previous</a>
74
+ <a href="#" class="px-3 py-2 border-t border-b border-gray-300 bg-blue-50 text-blue-600 font-medium">1</a>
75
+ <a href="#" class="px-3 py-2 border-t border-b border-gray-300 bg-white text-gray-500 hover:bg-gray-50">2</a>
76
+ <a href="#" class="px-3 py-2 border-t border-b border-gray-300 bg-white text-gray-500 hover:bg-gray-50">3</a>
77
+ <a href="#" class="px-3 py-2 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-50">Next</a>
78
+ </nav>
79
+ </div>
80
+ </main>
81
+
82
+ <custom-footer></custom-footer>
83
+
84
+ <script>
85
+ feather.replace();
86
+ </script>
87
+ <script src="script.js"></script>
88
+ </body>
89
+ </html>
components/navbar.js ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .navbar {
7
+ transition: all 0.3s ease;
8
+ }
9
+ .nav-link:hover {
10
+ color: #3b82f6;
11
+ }
12
+ .mobile-menu {
13
+ max-height: 0;
14
+ overflow: hidden;
15
+ transition: max-height 0.3s ease-out;
16
+ }
17
+ .mobile-menu.open {
18
+ max-height: 500px;
19
+ }
20
+ </style>
21
+ <nav class="navbar bg-white shadow-sm py-4">
22
+ <div class="container mx-auto px-4 flex justify-between items-center">
23
+ <a href="index.html" class="flex items-center">
24
+ <i data-feather="life-buoy" class="w-6 h-6 text-blue-600 mr-2"></i>
25
+ <span class="text-xl font-bold text-gray-800">HelpHub</span>
26
+ </a>
27
+
28
+ <div class="hidden md:flex space-x-8">
29
+ <a href="index.html" class="nav-link text-gray-600 hover:text-blue-600 font-medium">Home</a>
30
+ <a href="articles.html" class="nav-link text-blue-600 font-medium">Articles</a>
31
+ <a href="categories.html" class="nav-link text-gray-600 hover:text-blue-600 font-medium">Categories</a>
32
+ <a href="contact.html" class="nav-link text-gray-600 hover:text-blue-600 font-medium">Contact</a>
33
+ </div>
34
+
35
+ <div class="hidden md:flex items-center space-x-4">
36
+ <a href="login.html" class="text-gray-600 hover:text-blue-600 font-medium">Log In</a>
37
+ <a href="signup.html" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg font-medium">Sign Up</a>
38
+ </div>
39
+
40
+ <button id="mobile-menu-button" class="md:hidden text-gray-600">
41
+ <i data-feather="menu"></i>
42
+ </button>
43
+ </div>
44
+
45
+ <div id="mobile-menu" class="mobile-menu md:hidden bg-white px-4">
46
+ <div class="flex flex-col space-y-4 py-4">
47
+ <a href="index.html" class="text-gray-600 hover:text-blue-600 font-medium">Home</a>
48
+ <a href="articles.html" class="text-blue-600 font-medium">Articles</a>
49
+ <a href="categories.html" class="text-gray-600 hover:text-blue-600 font-medium">Categories</a>
50
+ <a href="contact.html" class="text-gray-600 hover:text-blue-600 font-medium">Contact</a>
51
+ <div class="border-t border-gray-200 pt-4 mt-2">
52
+ <a href="login.html" class="block text-gray-600 hover:text-blue-600 font-medium mb-3">Log In</a>
53
+ <a href="signup.html" class="block bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg font-medium text-center">Sign Up</a>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </nav>
58
+
59
+ <script>
60
+ feather.replace();
61
+ const mobileMenuButton = this.shadowRoot.getElementById('mobile-menu-button');
62
+ const mobileMenu = this.shadowRoot.getElementById('mobile-menu');
63
+
64
+ mobileMenuButton.addEventListener('click', () => {
65
+ mobileMenu.classList.toggle('open');
66
+ const icon = mobileMenuButton.querySelector('i');
67
+ if (mobileMenu.classList.contains('open')) {
68
+ icon.setAttribute('data-feather', 'x');
69
+ } else {
70
+ icon.setAttribute('data-feather', 'menu');
71
+ }
72
+ feather.replace();
73
+ });
74
+ </script>
75
+ `;
index.html CHANGED
@@ -1,19 +1,117 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>HelpHub - Self-Service Support</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="components/navbar.js"></script>
12
+ <script src="components/search.js"></script>
13
+ <script src="components/category-card.js"></script>
14
+ <script src="components/article-card.js"></script>
15
+ <script src="components/footer.js"></script>
16
+ </head>
17
+ <body class="bg-gray-50">
18
+ <custom-navbar></custom-navbar>
19
+
20
+ <main class="container mx-auto px-4 py-8">
21
+ <!-- Hero Section -->
22
+ <section class="text-center mb-12">
23
+ <h1 class="text-4xl font-bold text-gray-800 mb-4">How can we help you today?</h1>
24
+ <p class="text-xl text-gray-600 mb-8">Find answers to common questions or contact our support team</p>
25
+ <custom-search></custom-search>
26
+ </section>
27
+
28
+ <!-- Popular Categories -->
29
+ <section class="mb-12">
30
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6">Popular Categories</h2>
31
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
32
+ <custom-category-card
33
+ icon="settings"
34
+ title="Getting Started"
35
+ count="15 articles"
36
+ color="bg-blue-100"
37
+ text-color="text-blue-800">
38
+ </custom-category-card>
39
+ <custom-category-card
40
+ icon="credit-card"
41
+ title="Billing"
42
+ count="8 articles"
43
+ color="bg-green-100"
44
+ text-color="text-green-800">
45
+ </custom-category-card>
46
+ <custom-category-card
47
+ icon="user"
48
+ title="Account"
49
+ count="12 articles"
50
+ color="bg-purple-100"
51
+ text-color="text-purple-800">
52
+ </custom-category-card>
53
+ <custom-category-card
54
+ icon="lock"
55
+ title="Security"
56
+ count="5 articles"
57
+ color="bg-yellow-100"
58
+ text-color="text-yellow-800">
59
+ </custom-category-card>
60
+ </div>
61
+ </section>
62
+
63
+ <!-- Recent Articles -->
64
+ <section class="mb-12">
65
+ <div class="flex justify-between items-center mb-6">
66
+ <h2 class="text-2xl font-semibold text-gray-800">Recent Articles</h2>
67
+ <a href="articles.html" class="text-blue-600 hover:text-blue-800 flex items-center">
68
+ View all articles <i data-feather="chevron-right" class="ml-1 w-4 h-4"></i>
69
+ </a>
70
+ </div>
71
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
72
+ <custom-article-card
73
+ title="How to reset your password"
74
+ excerpt="Step-by-step guide to resetting your account password"
75
+ category="Account"
76
+ date="2 days ago"
77
+ views="124">
78
+ </custom-article-card>
79
+ <custom-article-card
80
+ title="Understanding your invoice"
81
+ excerpt="Learn how to read and understand your billing statement"
82
+ category="Billing"
83
+ date="1 week ago"
84
+ views="89">
85
+ </custom-article-card>
86
+ <custom-article-card
87
+ title="Two-factor authentication setup"
88
+ excerpt="Secure your account with 2FA for added protection"
89
+ category="Security"
90
+ date="3 weeks ago"
91
+ views="215">
92
+ </custom-article-card>
93
+ </div>
94
+ </section>
95
+
96
+ <!-- Contact Section -->
97
+ <section class="bg-white rounded-lg shadow-md p-8 mb-12">
98
+ <div class="text-center">
99
+ <i data-feather="mail" class="w-12 h-12 text-blue-600 mx-auto mb-4"></i>
100
+ <h2 class="text-2xl font-semibold text-gray-800 mb-2">Still need help?</h2>
101
+ <p class="text-gray-600 mb-6">Our support team is ready to assist you</p>
102
+ <a href="contact.html" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg inline-flex items-center">
103
+ Contact Support <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
104
+ </a>
105
+ </div>
106
+ </section>
107
+ </main>
108
+
109
+ <custom-footer></custom-footer>
110
+
111
+ <script>
112
+ feather.replace();
113
+ </script>
114
+ <script src="script.js"></script>
115
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
116
+ </body>
117
+ </html>
script.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Initialize tooltips
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ // Initialize any tooltips or popovers
4
+ const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
5
+ tooltipTriggerList.map(function (tooltipTriggerEl) {
6
+ return new bootstrap.Tooltip(tooltipTriggerEl);
7
+ });
8
+
9
+ // Smooth scrolling for anchor links
10
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
11
+ anchor.addEventListener('click', function (e) {
12
+ e.preventDefault();
13
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
14
+ behavior: 'smooth'
15
+ });
16
+ });
17
+ });
18
+ });
19
+
20
+ // Search functionality
21
+ function performSearch(query) {
22
+ console.log('Searching for:', query);
23
+ // In a real implementation, this would fetch search results from an API
24
+ // and update the DOM with the results
25
+ }
26
+ // Load articles from API
27
+ async function loadArticles() {
28
+ try {
29
+ // In a real implementation, this would fetch from your API
30
+ const response = await fetch('https://jsonplaceholder.typicode.com/posts?_limit=6');
31
+ if (!response.ok) throw new Error('Failed to fetch articles');
32
+ return await response.json();
33
+ } catch (error) {
34
+ console.error('Error loading articles:', error);
35
+ return [];
36
+ }
37
+ }
38
+
39
+ // Article view tracking
40
+ function trackArticleView(articleId) {
41
+ console.log('Tracking view for article:', articleId);
42
+ // In a real implementation, this would send analytics data
43
+ }
style.css CHANGED
@@ -1,28 +1,33 @@
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
 
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
  }
 
 
 
 
 
 
 
 
 
 
1
+ /* Base styles */
2
  body {
3
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
4
+ line-height: 1.6;
5
  }
6
 
7
+ /* Animation for cards */
8
+ @keyframes fadeIn {
9
+ from { opacity: 0; transform: translateY(10px); }
10
+ to { opacity: 1; transform: translateY(0); }
11
  }
12
 
13
+ .animate-fade-in {
14
+ animation: fadeIn 0.3s ease-out forwards;
 
 
 
15
  }
16
 
17
+ /* Custom scrollbar */
18
+ ::-webkit-scrollbar {
19
+ width: 8px;
 
 
 
20
  }
21
 
22
+ ::-webkit-scrollbar-track {
23
+ background: #f1f1f1;
24
  }
25
+
26
+ ::-webkit-scrollbar-thumb {
27
+ background: #888;
28
+ border-radius: 4px;
29
+ }
30
+
31
+ ::-webkit-scrollbar-thumb:hover {
32
+ background: #555;
33
+ }