mailbyphase commited on
Commit
8377477
·
verified ·
1 Parent(s): 42cda79

design same site

Browse files
Files changed (6) hide show
  1. README.md +7 -4
  2. components/footer.js +77 -0
  3. components/navbar.js +79 -0
  4. index.html +83 -19
  5. script.js +23 -0
  6. style.css +22 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Darkelegance
3
- emoji: 📚
4
- colorFrom: pink
5
  colorTo: green
 
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: DarkElegance ✨
3
+ colorFrom: blue
 
4
  colorTo: green
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,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .footer-link:hover {
7
+ color: #ffffff !important;
8
+ }
9
+ </style>
10
+ <footer class="bg-dark-400 text-gray-400 py-12">
11
+ <div class="container mx-auto px-4">
12
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
13
+ <div>
14
+ <h3 class="text-white text-xl font-bold mb-4 flex items-center">
15
+ <i data-feather="moon" class="mr-2"></i>
16
+ DarkElegance
17
+ </h3>
18
+ <p class="mb-4">A sophisticated dark theme experience designed for modern web applications.</p>
19
+ <div class="flex space-x-4">
20
+ <a href="#" class="text-gray-400 hover:text-white transition-all">
21
+ <i data-feather="twitter"></i>
22
+ </a>
23
+ <a href="#" class="text-gray-400 hover:text-white transition-all">
24
+ <i data-feather="instagram"></i>
25
+ </a>
26
+ <a href="#" class="text-gray-400 hover:text-white transition-all">
27
+ <i data-feather="github"></i>
28
+ </a>
29
+ <a href="#" class="text-gray-400 hover:text-white transition-all">
30
+ <i data-feather="linkedin"></i>
31
+ </a>
32
+ </div>
33
+ </div>
34
+
35
+ <div>
36
+ <h4 class="text-white text-lg font-semibold mb-4">Product</h4>
37
+ <ul class="space-y-2">
38
+ <li><a href="#" class="footer-link transition-all">Features</a></li>
39
+ <li><a href="#" class="footer-link transition-all">Pricing</a></li>
40
+ <li><a href="#" class="footer-link transition-all">Documentation</a></li>
41
+ <li><a href="#" class="footer-link transition-all">Releases</a></li>
42
+ </ul>
43
+ </div>
44
+
45
+ <div>
46
+ <h4 class="text-white text-lg font-semibold mb-4">Company</h4>
47
+ <ul class="space-y-2">
48
+ <li><a href="#" class="footer-link transition-all">About</a></li>
49
+ <li><a href="#" class="footer-link transition-all">Blog</a></li>
50
+ <li><a href="#" class="footer-link transition-all">Careers</a></li>
51
+ <li><a href="#" class="footer-link transition-all">Contact</a></li>
52
+ </ul>
53
+ </div>
54
+
55
+ <div>
56
+ <h4 class="text-white text-lg font-semibold mb-4">Legal</h4>
57
+ <ul class="space-y-2">
58
+ <li><a href="#" class="footer-link transition-all">Privacy</a></li>
59
+ <li><a href="#" class="footer-link transition-all">Terms</a></li>
60
+ <li><a href="#" class="footer-link transition-all">Cookies</a></li>
61
+ </ul>
62
+ </div>
63
+ </div>
64
+
65
+ <div class="border-t border-dark-300 mt-8 pt-8 text-center">
66
+ <p>© 2023 DarkElegance. All rights reserved.</p>
67
+ </div>
68
+ </div>
69
+ </footer>
70
+ <script>
71
+ feather.replace();
72
+ </script>
73
+ `;
74
+ }
75
+ }
76
+
77
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ .navbar-link:hover {
10
+ color: #ffffff !important;
11
+ transform: translateY(-2px);
12
+ }
13
+ .mobile-menu {
14
+ max-height: 0;
15
+ overflow: hidden;
16
+ transition: max-height 0.3s ease-out;
17
+ }
18
+ .mobile-menu.open {
19
+ max-height: 500px;
20
+ }
21
+ </style>
22
+ <nav class="navbar bg-dark-500 text-white border-b border-dark-300">
23
+ <div class="container mx-auto px-4 py-4">
24
+ <div class="flex justify-between items-center">
25
+ <a href="/" class="text-2xl font-bold flex items-center">
26
+ <i data-feather="moon" class="mr-2"></i>
27
+ DarkElegance
28
+ </a>
29
+
30
+ <div class="hidden md:flex items-center space-x-8">
31
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all">Home</a>
32
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all">Features</a>
33
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all">Pricing</a>
34
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all">Contact</a>
35
+ <button class="bg-white text-dark-500 px-4 py-2 rounded-lg font-medium hover:bg-gray-200 transition-all">
36
+ Get Started
37
+ </button>
38
+ </div>
39
+
40
+ <button id="mobile-menu-button" class="md:hidden focus:outline-none">
41
+ <i data-feather="menu" class="w-6 h-6"></i>
42
+ </button>
43
+ </div>
44
+
45
+ <div id="mobile-menu" class="mobile-menu md:hidden">
46
+ <div class="pt-4 pb-2 space-y-2 flex flex-col">
47
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all px-2 py-1">Home</a>
48
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all px-2 py-1">Features</a>
49
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all px-2 py-1">Pricing</a>
50
+ <a href="#" class="navbar-link text-gray-300 hover:text-white transition-all px-2 py-1">Contact</a>
51
+ <button class="bg-white text-dark-500 px-4 py-2 rounded-lg font-medium hover:bg-gray-200 transition-all mt-2">
52
+ Get Started
53
+ </button>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </nav>
58
+ <script>
59
+ feather.replace();
60
+ </script>
61
+ `;
62
+
63
+ const mobileMenuButton = this.shadowRoot.getElementById('mobile-menu-button');
64
+ const mobileMenu = this.shadowRoot.getElementById('mobile-menu');
65
+
66
+ mobileMenuButton.addEventListener('click', () => {
67
+ mobileMenu.classList.toggle('open');
68
+ const icon = mobileMenuButton.querySelector('i');
69
+ if (mobileMenu.classList.contains('open')) {
70
+ icon.setAttribute('data-feather', 'x');
71
+ } else {
72
+ icon.setAttribute('data-feather', 'menu');
73
+ }
74
+ feather.replace();
75
+ });
76
+ }
77
+ }
78
+
79
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,83 @@
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>DarkElegance</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script>
10
+ tailwind.config = {
11
+ darkMode: 'class',
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ dark: {
16
+ 100: '#1a1a1a',
17
+ 200: '#121212',
18
+ 300: '#0a0a0a',
19
+ 400: '#050505',
20
+ 500: '#000000',
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ </script>
27
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
28
+ <script src="https://unpkg.com/feather-icons"></script>
29
+ </head>
30
+ <body class="bg-dark-500 text-white min-h-screen">
31
+ <custom-navbar></custom-navbar>
32
+
33
+ <main class="container mx-auto px-4 py-12">
34
+ <section class="grid grid-cols-1 md:grid-cols-2 gap-8 items-center">
35
+ <div>
36
+ <h1 class="text-4xl md:text-6xl font-bold mb-6">Embrace the <span class="text-white-500">Dark Side</span></h1>
37
+ <p class="text-gray-300 text-lg mb-8">A sophisticated dark theme experience with elegant contrasts and smooth transitions.</p>
38
+ <div class="flex gap-4">
39
+ <a href="#" class="bg-white text-dark-500 px-6 py-3 rounded-lg font-medium hover:bg-gray-200 transition-all">Get Started</a>
40
+ <a href="#" class="border border-white px-6 py-3 rounded-lg font-medium hover:bg-white hover:text-dark-500 transition-all">Learn More</a>
41
+ </div>
42
+ </div>
43
+ <div class="relative">
44
+ <div class="absolute -top-4 -right-4 w-64 h-64 bg-white-500 rounded-full mix-blend-overlay opacity-20"></div>
45
+ <div class="relative">
46
+ <img src="http://static.photos/minimal/1024x576/42" alt="Dark theme illustration" class="rounded-2xl shadow-2xl">
47
+ </div>
48
+ </div>
49
+ </section>
50
+
51
+ <section class="mt-32">
52
+ <h2 class="text-3xl font-bold mb-12 text-center">Features</h2>
53
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
54
+ <div class="bg-dark-300 p-8 rounded-2xl hover:bg-dark-400 transition-all">
55
+ <i data-feather="moon" class="w-12 h-12 mb-4 text-white-500"></i>
56
+ <h3 class="text-xl font-bold mb-3">Dark Mode</h3>
57
+ <p class="text-gray-400">Elegant dark interface that's easy on the eyes and reduces eye strain.</p>
58
+ </div>
59
+ <div class="bg-dark-300 p-8 rounded-2xl hover:bg-dark-400 transition-all">
60
+ <i data-feather="eye" class="w-12 h-12 mb-4 text-white-500"></i>
61
+ <h3 class="text-xl font-bold mb-3">High Contrast</h3>
62
+ <p class="text-gray-400">Carefully selected colors for maximum readability and visual appeal.</p>
63
+ </div>
64
+ <div class="bg-dark-300 p-8 rounded-2xl hover:bg-dark-400 transition-all">
65
+ <i data-feather="sliders" class="w-12 h-12 mb-4 text-white-500"></i>
66
+ <h3 class="text-xl font-bold mb-3">Customizable</h3>
67
+ <p class="text-gray-400">Adjust brightness and contrast to match your personal preference.</p>
68
+ </div>
69
+ </div>
70
+ </section>
71
+ </main>
72
+
73
+ <custom-footer></custom-footer>
74
+
75
+ <script src="components/navbar.js"></script>
76
+ <script src="components/footer.js"></script>
77
+ <script src="script.js"></script>
78
+ <script>
79
+ feather.replace();
80
+ </script>
81
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
82
+ </body>
83
+ </html>
script.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Theme toggle functionality
2
+ document.addEventListener('DOMContentLoaded', () => {
3
+ // Smooth scroll for anchor links
4
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
5
+ anchor.addEventListener('click', function (e) {
6
+ e.preventDefault();
7
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
8
+ behavior: 'smooth'
9
+ });
10
+ });
11
+ });
12
+
13
+ // Add hover effect to all buttons
14
+ const buttons = document.querySelectorAll('button, .btn');
15
+ buttons.forEach(button => {
16
+ button.addEventListener('mouseenter', () => {
17
+ button.classList.add('transform', 'scale-105');
18
+ });
19
+ button.addEventListener('mouseleave', () => {
20
+ button.classList.remove('transform', 'scale-105');
21
+ });
22
+ });
23
+ });
style.css CHANGED
@@ -1,28 +1,32 @@
 
 
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
+ transition: background-color 0.3s ease, color 0.3s ease;
6
+ }
7
+
8
+ ::-webkit-scrollbar {
9
+ width: 8px;
10
+ height: 8px;
11
  }
12
 
13
+ ::-webkit-scrollbar-track {
14
+ background: rgba(255, 255, 255, 0.05);
 
15
  }
16
 
17
+ ::-webkit-scrollbar-thumb {
18
+ background: rgba(255, 255, 255, 0.2);
19
+ border-radius: 4px;
 
 
20
  }
21
 
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: rgba(255, 255, 255, 0.3);
 
 
 
 
24
  }
25
 
26
+ .glow-text {
27
+ text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
28
  }
29
+
30
+ .hover-glow:hover {
31
+ box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
32
+ }