shimanta420 commited on
Commit
abc8a56
·
verified ·
1 Parent(s): 6240710

Create a fully functional 50+ online tools website

Browse files
Files changed (8) hide show
  1. README.md +8 -5
  2. components/footer.js +53 -0
  3. components/header.js +43 -0
  4. components/search.js +31 -0
  5. components/tool-card.js +35 -0
  6. index.html +68 -19
  7. script.js +30 -0
  8. style.css +23 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Tooltopia Hub
3
- emoji: 👁
4
- colorFrom: red
5
- colorTo: gray
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: Tooltopia Hub
3
+ colorFrom: blue
4
+ colorTo: pink
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).
components/footer.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class FooterComponent extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .footer-link:hover {
7
+ color: var(--primary-500);
8
+ }
9
+ </style>
10
+ <footer class="bg-gray-800/50 border-t border-gray-800 mt-16">
11
+ <div class="container mx-auto px-6 py-12">
12
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
13
+ <div>
14
+ <h3 class="text-lg font-semibold mb-4">Tooltopia Hub</h3>
15
+ <p class="text-gray-400">Your one-stop destination for all online tools. Free, fast, and easy to use.</p>
16
+ </div>
17
+ <div>
18
+ <h4 class="text-md font-semibold mb-4">Categories</h4>
19
+ <ul class="space-y-2">
20
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">Developer Tools</a></li>
21
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">Media Tools</a></li>
22
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">Document Tools</a></li>
23
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">Web Tools</a></li>
24
+ </ul>
25
+ </div>
26
+ <div>
27
+ <h4 class="text-md font-semibold mb-4">Company</h4>
28
+ <ul class="space-y-2">
29
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">About Us</a></li>
30
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">Contact</a></li>
31
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">Privacy Policy</a></li>
32
+ <li><a href="#" class="footer-link text-gray-400 hover:text-primary-500">Terms of Service</a></li>
33
+ </ul>
34
+ </div>
35
+ <div>
36
+ <h4 class="text-md font-semibold mb-4">Connect</h4>
37
+ <div class="flex space-x-4">
38
+ <a href="#" class="text-gray-400 hover:text-primary-500"><i data-feather="twitter"></i></a>
39
+ <a href="#" class="text-gray-400 hover:text-primary-500"><i data-feather="github"></i></a>
40
+ <a href="#" class="text-gray-400 hover:text-primary-500"><i data-feather="linkedin"></i></a>
41
+ <a href="#" class="text-gray-400 hover:text-primary-500"><i data-feather="facebook"></i></a>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500 text-sm">
46
+ © ${new Date().getFullYear()} Tooltopia Hub. All rights reserved.
47
+ </div>
48
+ </div>
49
+ </footer>
50
+ `;
51
+ }
52
+ }
53
+ customElements.define('footer-component', FooterComponent);
components/header.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class HeaderComponent extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ backdrop-filter: blur(10px);
8
+ }
9
+ .nav-link:hover {
10
+ color: var(--primary-500);
11
+ }
12
+ </style>
13
+ <header class="sticky top-0 z-50 border-b border-gray-800">
14
+ <nav class="bg-gray-900/80 py-4 px-6">
15
+ <div class="container mx-auto flex justify-between items-center">
16
+ <a href="/" class="flex items-center space-x-2">
17
+ <i data-feather="tool" class="text-primary-500"></i>
18
+ <span class="text-xl font-bold">Tooltopia Hub</span>
19
+ </a>
20
+
21
+ <div class="hidden md:flex items-center space-x-8">
22
+ <a href="#" class="nav-link text-gray-300 hover:text-primary-500">All Tools</a>
23
+ <a href="#" class="nav-link text-gray-300 hover:text-primary-500">Categories</a>
24
+ <a href="#" class="nav-link text-gray-300 hover:text-primary-500">Favorites</a>
25
+ <a href="#" class="nav-link text-gray-300 hover:text-primary-500">About</a>
26
+ </div>
27
+
28
+ <div class="flex items-center space-x-4">
29
+ <button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-800">
30
+ <i data-feather="moon" class="hidden dark:block"></i>
31
+ <i data-feather="sun" class="block dark:hidden"></i>
32
+ </button>
33
+ <button class="md:hidden p-2 rounded-full hover:bg-gray-800">
34
+ <i data-feather="menu"></i>
35
+ </button>
36
+ </div>
37
+ </div>
38
+ </nav>
39
+ </header>
40
+ `;
41
+ }
42
+ }
43
+ customElements.define('header-component', HeaderComponent);
components/search.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class SearchComponent extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .search-input:focus {
7
+ outline: 2px solid var(--primary-500);
8
+ outline-offset: 2px;
9
+ }
10
+ </style>
11
+ <div class="mb-12 max-w-2xl mx-auto">
12
+ <div class="relative">
13
+ <input
14
+ type="text"
15
+ placeholder="Search for tools..."
16
+ class="search-input w-full bg-gray-800 border border-gray-700 rounded-full py-3 px-6 pl-12 text-gray-200 focus:border-primary-500 focus:ring-0"
17
+ >
18
+ <i data-feather="search" class="absolute left-4 top-3.5 text-gray-500"></i>
19
+ </div>
20
+ <div class="flex flex-wrap justify-center mt-4 gap-2">
21
+ <button class="px-4 py-1.5 rounded-full bg-gray-800 hover:bg-gray-700 text-sm">All</button>
22
+ <button class="px-4 py-1.5 rounded-full bg-gray-800 hover:bg-gray-700 text-sm">Developer</button>
23
+ <button class="px-4 py-1.5 rounded-full bg-gray-800 hover:bg-gray-700 text-sm">Media</button>
24
+ <button class="px-4 py-1.5 rounded-full bg-gray-800 hover:bg-gray-700 text-sm">Documents</button>
25
+ <button class="px-4 py-1.5 rounded-full bg-gray-800 hover:bg-gray-700 text-sm">Utilities</button>
26
+ </div>
27
+ </div>
28
+ `;
29
+ }
30
+ }
31
+ customElements.define('search-component', SearchComponent);
components/tool-card.js ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class ToolCard extends HTMLElement {
2
+ connectedCallback() {
3
+ const icon = this.getAttribute('icon') || 'tool';
4
+ const title = this.getAttribute('title') || 'Tool';
5
+ const category = this.getAttribute('category') || 'General';
6
+
7
+ this.attachShadow({ mode: 'open' });
8
+ this.shadowRoot.innerHTML = `
9
+ <style>
10
+ .tool-card {
11
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
12
+ }
13
+ .tool-icon {
14
+ background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
15
+ }
16
+ </style>
17
+ <a href="#" class="tool-card block bg-gray-800 rounded-xl p-6 hover:shadow-lg">
18
+ <div class="flex items-center mb-4">
19
+ <div class="tool-icon rounded-lg p-3 mr-4">
20
+ <i data-feather="${icon}" class="text-white"></i>
21
+ </div>
22
+ <h3 class="text-xl font-semibold">${title}</h3>
23
+ </div>
24
+ <p class="text-gray-400 mb-4">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
25
+ <div class="flex justify-between items-center">
26
+ <span class="text-xs px-3 py-1 rounded-full bg-gray-700 text-gray-300">${category}</span>
27
+ <button class="text-primary-500 hover:text-primary-400">
28
+ <i data-feather="arrow-right"></i>
29
+ </button>
30
+ </div>
31
+ </a>
32
+ `;
33
+ }
34
+ }
35
+ customElements.define('tool-card', ToolCard);
index.html CHANGED
@@ -1,19 +1,68 @@
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" class="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Tooltopia Hub - 50+ Online Tools</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>
12
+ tailwind.config = {
13
+ darkMode: 'class',
14
+ theme: {
15
+ extend: {
16
+ colors: {
17
+ primary: {
18
+ 500: '#6366f1',
19
+ },
20
+ secondary: {
21
+ 500: '#10b981',
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ </script>
28
+ </head>
29
+ <body class="bg-gray-900 text-gray-100 min-h-screen">
30
+ <header-component></header-component>
31
+
32
+ <main class="container mx-auto px-4 py-8">
33
+ <section class="mb-12">
34
+ <h1 class="text-4xl font-bold mb-6 text-center">50+ Powerful Online Tools</h1>
35
+ <p class="text-xl text-gray-400 text-center max-w-3xl mx-auto">All your essential tools in one place - free, fast, and easy to use!</p>
36
+ </section>
37
+
38
+ <search-component></search-component>
39
+
40
+ <section class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
41
+ <tool-card icon="code" title="HTML Formatter" category="Developer"></tool-card>
42
+ <tool-card icon="image" title="Image Compressor" category="Media"></tool-card>
43
+ <tool-card icon="file-text" title="PDF to Word" category="Documents"></tool-card>
44
+ <tool-card icon="link" title="URL Shortener" category="Web"></tool-card>
45
+ <tool-card icon="lock" title="Password Generator" category="Security"></tool-card>
46
+ <tool-card icon="hash" title="Base64 Encoder" category="Developer"></tool-card>
47
+ <tool-card icon="calendar" title="Date Calculator" category="Utilities"></tool-card>
48
+ <tool-card icon="dollar-sign" title="Currency Converter" category="Finance"></tool-card>
49
+ </section>
50
+
51
+ <div class="mt-12 text-center">
52
+ <button class="bg-primary-500 hover:bg-primary-600 text-white font-bold py-3 px-6 rounded-full transition-all">
53
+ Load More Tools
54
+ </button>
55
+ </div>
56
+ </main>
57
+
58
+ <footer-component></footer-component>
59
+
60
+ <script src="components/header.js"></script>
61
+ <script src="components/search.js"></script>
62
+ <script src="components/tool-card.js"></script>
63
+ <script src="components/footer.js"></script>
64
+ <script src="script.js"></script>
65
+ <script>feather.replace();</script>
66
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
67
+ </body>
68
+ </html>
script.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ // Initialize tool data
3
+ const tools = [
4
+ { icon: 'code', title: 'HTML Formatter', category: 'Developer' },
5
+ { icon: 'image', title: 'Image Compressor', category: 'Media' },
6
+ { icon: 'file-text', title: 'PDF to Word', category: 'Documents' },
7
+ { icon: 'link', title: 'URL Shortener', category: 'Web' },
8
+ { icon: 'lock', title: 'Password Generator', category: 'Security' },
9
+ { icon: 'hash', title: 'Base64 Encoder', category: 'Developer' },
10
+ { icon: 'calendar', title: 'Date Calculator', category: 'Utilities' },
11
+ { icon: 'dollar-sign', title: 'Currency Converter', category: 'Finance' },
12
+ // Add more tools as needed
13
+ ];
14
+
15
+ // Theme toggle functionality
16
+ const themeToggle = document.getElementById('theme-toggle');
17
+ if (themeToggle) {
18
+ themeToggle.addEventListener('click', () => {
19
+ document.documentElement.classList.toggle('dark');
20
+ localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light');
21
+ });
22
+ }
23
+
24
+ // Check for saved theme preference
25
+ if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
26
+ document.documentElement.classList.add('dark');
27
+ } else {
28
+ document.documentElement.classList.remove('dark');
29
+ }
30
+ });
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
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+
3
  body {
4
+ font-family: 'Inter', sans-serif;
5
+ }
6
+
7
+ .tool-card:hover {
8
+ transform: translateY(-5px);
9
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
10
  }
11
 
12
+ /* Smooth transitions */
13
+ * {
14
+ transition: all 0.2s ease;
15
  }
16
 
17
+ /* Custom scrollbar */
18
+ ::-webkit-scrollbar {
19
+ width: 8px;
 
 
20
  }
21
 
22
+ ::-webkit-scrollbar-track {
23
+ background: #1e293b;
 
 
 
 
24
  }
25
 
26
+ ::-webkit-scrollbar-thumb {
27
+ background: #4b5563;
28
+ border-radius: 4px;
29
  }
30
+
31
+ ::-webkit-scrollbar-thumb:hover {
32
+ background: #6b7280;
33
+ }