Muso98 commited on
Commit
23e9d56
·
verified ·
1 Parent(s): 486ff41

sen faqat frontend yaratolasanmi?

Browse files
Files changed (6) hide show
  1. README.md +8 -5
  2. components/footer.js +113 -0
  3. components/navbar.js +110 -0
  4. index.html +65 -19
  5. script.js +20 -0
  6. style.css +19 -21
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Purefront Wizardry
3
- emoji: 🌖
4
- colorFrom: pink
5
- colorTo: pink
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: PureFront Wizardry
3
+ colorFrom: purple
4
+ colorTo: yellow
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://deepsite.hf.co).
components/footer.js ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ footer {
7
+ background: #1F2937;
8
+ color: white;
9
+ padding: 3rem 2rem;
10
+ text-align: center;
11
+ margin-top: auto;
12
+ }
13
+ .footer-content {
14
+ max-width: 1200px;
15
+ margin: 0 auto;
16
+ display: grid;
17
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
18
+ gap: 2rem;
19
+ text-align: left;
20
+ }
21
+ .footer-title {
22
+ font-weight: 600;
23
+ font-size: 1.1rem;
24
+ margin-bottom: 1rem;
25
+ color: #E5E7EB;
26
+ }
27
+ .footer-links {
28
+ list-style: none;
29
+ padding: 0;
30
+ margin: 0;
31
+ }
32
+ .footer-links li {
33
+ margin-bottom: 0.5rem;
34
+ }
35
+ .footer-links a {
36
+ color: #9CA3AF;
37
+ text-decoration: none;
38
+ transition: color 0.2s;
39
+ }
40
+ .footer-links a:hover {
41
+ color: white;
42
+ }
43
+ .social-links {
44
+ display: flex;
45
+ gap: 1rem;
46
+ margin-top: 1rem;
47
+ }
48
+ .social-links a {
49
+ color: white;
50
+ background: #4B5563;
51
+ width: 36px;
52
+ height: 36px;
53
+ border-radius: 50%;
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ transition: background 0.2s;
58
+ }
59
+ .social-links a:hover {
60
+ background: #3B82F6;
61
+ }
62
+ .copyright {
63
+ margin-top: 3rem;
64
+ padding-top: 1.5rem;
65
+ border-top: 1px solid #374151;
66
+ color: #9CA3AF;
67
+ }
68
+ @media (max-width: 768px) {
69
+ .footer-content {
70
+ grid-template-columns: 1fr;
71
+ text-align: center;
72
+ }
73
+ .social-links {
74
+ justify-content: center;
75
+ }
76
+ }
77
+ </style>
78
+ <footer>
79
+ <div class="footer-content">
80
+ <div>
81
+ <h3 class="footer-title">PureFront</h3>
82
+ <p class="text-gray-400">Creating beautiful frontend experiences with pure HTML, CSS and JavaScript.</p>
83
+ </div>
84
+
85
+ <div>
86
+ <h3 class="footer-title">Quick Links</h3>
87
+ <ul class="footer-links">
88
+ <li><a href="/">Home</a></li>
89
+ <li><a href="#features">Features</a></li>
90
+ <li><a href="#about">About</a></li>
91
+ <li><a href="#contact">Contact</a></li>
92
+ </ul>
93
+ </div>
94
+
95
+ <div>
96
+ <h3 class="footer-title">Connect</h3>
97
+ <div class="social-links">
98
+ <a href="#"><i data-feather="twitter"></i></a>
99
+ <a href="#"><i data-feather="github"></i></a>
100
+ <a href="#"><i data-feather="linkedin"></i></a>
101
+ <a href="#"><i data-feather="instagram"></i></a>
102
+ </div>
103
+ </div>
104
+ </div>
105
+
106
+ <div class="copyright">
107
+ <p>&copy; <span id="current-year"></span> PureFront. All rights reserved.</p>
108
+ </div>
109
+ </footer>
110
+ `;
111
+ }
112
+ }
113
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ background: white;
8
+ padding: 1rem 2rem;
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
13
+ position: sticky;
14
+ top: 0;
15
+ z-index: 100;
16
+ }
17
+ .logo {
18
+ font-weight: 800;
19
+ font-size: 1.5rem;
20
+ background: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 100%);
21
+ -webkit-background-clip: text;
22
+ background-clip: text;
23
+ color: transparent;
24
+ display: flex;
25
+ align-items: center;
26
+ gap: 0.5rem;
27
+ }
28
+ .nav-links {
29
+ display: flex;
30
+ gap: 1.5rem;
31
+ list-style: none;
32
+ margin: 0;
33
+ padding: 0;
34
+ }
35
+ .nav-links a {
36
+ color: #4B5563;
37
+ text-decoration: none;
38
+ font-weight: 500;
39
+ transition: color 0.2s;
40
+ display: flex;
41
+ align-items: center;
42
+ gap: 0.3rem;
43
+ }
44
+ .nav-links a:hover {
45
+ color: #3B82F6;
46
+ }
47
+ .mobile-menu-btn {
48
+ display: none;
49
+ background: none;
50
+ border: none;
51
+ color: #4B5563;
52
+ font-size: 1.5rem;
53
+ cursor: pointer;
54
+ }
55
+ @media (max-width: 768px) {
56
+ .mobile-menu-btn {
57
+ display: block;
58
+ }
59
+ .nav-links {
60
+ display: none;
61
+ position: absolute;
62
+ top: 100%;
63
+ left: 0;
64
+ right: 0;
65
+ background: white;
66
+ flex-direction: column;
67
+ padding: 1rem;
68
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
69
+ }
70
+ .nav-links.show {
71
+ display: flex;
72
+ }
73
+ }
74
+ </style>
75
+ <nav>
76
+ <a href="/" class="logo">
77
+ <span>PureFront</span>
78
+ <i data-feather="zap"></i>
79
+ </a>
80
+
81
+ <button class="mobile-menu-btn">
82
+ <i data-feather="menu"></i>
83
+ </button>
84
+
85
+ <ul class="nav-links">
86
+ <li><a href="/"><i data-feather="home"></i> Home</a></li>
87
+ <li><a href="#features"><i data-feather="star"></i> Features</a></li>
88
+ <li><a href="#about"><i data-feather="info"></i> About</a></li>
89
+ <li><a href="#contact"><i data-feather="mail"></i> Contact</a></li>
90
+ </ul>
91
+ </nav>
92
+ `;
93
+
94
+ // Mobile menu toggle functionality
95
+ const mobileBtn = this.shadowRoot.querySelector('.mobile-menu-btn');
96
+ const navLinks = this.shadowRoot.querySelector('.nav-links');
97
+
98
+ mobileBtn.addEventListener('click', () => {
99
+ navLinks.classList.toggle('show');
100
+ const icon = mobileBtn.querySelector('i');
101
+ if (navLinks.classList.contains('show')) {
102
+ icon.setAttribute('data-feather', 'x');
103
+ } else {
104
+ icon.setAttribute('data-feather', 'menu');
105
+ }
106
+ feather.replace();
107
+ });
108
+ }
109
+ }
110
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,65 @@
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>PureFront | Frontend Wizardry</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <link rel="stylesheet" href="style.css">
11
+ <style type="text/tailwindcss">
12
+ @layer utilities {
13
+ .text-shadow {
14
+ text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
15
+ }
16
+ }
17
+ </style>
18
+ </head>
19
+ <body class="bg-gray-50 min-h-screen flex flex-col">
20
+ <custom-navbar></custom-navbar>
21
+
22
+ <main class="flex-grow container mx-auto px-4 py-12">
23
+ <div class="max-w-4xl mx-auto text-center">
24
+ <h1 class="text-5xl font-bold text-gray-800 mb-6 text-shadow">Frontend Wizardry ✨</h1>
25
+ <p class="text-xl text-gray-600 mb-8">Pure frontend magic without backend constraints</p>
26
+
27
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-12">
28
+ <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-shadow">
29
+ <i data-feather="code" class="w-12 h-12 text-blue-500 mb-4 mx-auto"></i>
30
+ <h3 class="text-xl font-semibold mb-2">HTML5</h3>
31
+ <p class="text-gray-600">Semantic markup that search engines love</p>
32
+ </div>
33
+
34
+ <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-shadow">
35
+ <i data-feather="feather" class="w-12 h-12 text-purple-500 mb-4 mx-auto"></i>
36
+ <h3 class="text-xl font-semibold mb-2">CSS3</h3>
37
+ <p class="text-gray-600">Beautiful designs with modern styling</p>
38
+ </div>
39
+
40
+ <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-shadow">
41
+ <i data-feather="zap" class="w-12 h-12 text-yellow-500 mb-4 mx-auto"></i>
42
+ <h3 class="text-xl font-semibold mb-2">JavaScript</h3>
43
+ <p class="text-gray-600">Interactive experiences that delight users</p>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="bg-gradient-to-r from-blue-500 to-purple-600 text-white p-8 rounded-xl shadow-lg max-w-2xl mx-auto">
48
+ <h2 class="text-3xl font-bold mb-4">100% Frontend Solutions</h2>
49
+ <p class="text-lg mb-6">Create stunning interfaces with just HTML, CSS and JavaScript. No backend required!</p>
50
+ <button class="bg-white text-blue-600 font-semibold px-6 py-3 rounded-lg hover:bg-gray-100 transition-colors">
51
+ Start Crafting
52
+ </button>
53
+ </div>
54
+ </div>
55
+ </main>
56
+
57
+ <custom-footer></custom-footer>
58
+
59
+ <script src="components/navbar.js"></script>
60
+ <script src="components/footer.js"></script>
61
+ <script src="script.js"></script>
62
+ <script>feather.replace();</script>
63
+ <script src="https://deepsite.hf.co/deepsite-badge.js"></script>
64
+ </body>
65
+ </html>
script.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Document ready function
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ console.log('Frontend magic is happening! 🎩✨');
4
+
5
+ // Example of dynamic year in footer
6
+ const yearSpan = document.getElementById('current-year');
7
+ if (yearSpan) {
8
+ yearSpan.textContent = new Date().getFullYear();
9
+ }
10
+
11
+ // Simple scroll animation for all anchor links
12
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
13
+ anchor.addEventListener('click', function(e) {
14
+ e.preventDefault();
15
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
16
+ behavior: 'smooth'
17
+ });
18
+ });
19
+ });
20
+ });
style.css CHANGED
@@ -1,28 +1,26 @@
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
+ /* Custom styles that enhance Tailwind */
2
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
 
 
3
 
4
+ body {
5
+ font-family: 'Inter', sans-serif;
6
+ line-height: 1.6;
7
  }
8
 
9
+ /* Smooth scrolling */
10
+ html {
11
+ scroll-behavior: smooth;
 
 
12
  }
13
 
14
+ /* Custom animation for cards */
15
+ @keyframes float {
16
+ 0%, 100% {
17
+ transform: translateY(0);
18
+ }
19
+ 50% {
20
+ transform: translateY(-10px);
21
+ }
22
  }
23
 
24
+ .float-card:hover {
25
+ animation: float 3s ease-in-out infinite;
26
+ }