bigpappic commited on
Commit
1f36718
Β·
verified Β·
1 Parent(s): 2db1da7

Let's deploy this

Browse files
Files changed (7) hide show
  1. components/auth-modal.js +83 -0
  2. components/footer.js +7 -17
  3. components/navbar.js +5 -5
  4. index.html +14 -12
  5. projects.html +2 -2
  6. script.js +24 -11
  7. style.css +11 -2
components/auth-modal.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class AuthModal extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .modal {
7
+ position: fixed;
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ background: rgba(0,0,0,0.5);
13
+ display: none;
14
+ justify-content: center;
15
+ align-items: center;
16
+ z-index: 1000;
17
+ }
18
+ .modal-content {
19
+ background: white;
20
+ padding: 2rem;
21
+ border-radius: 0.5rem;
22
+ width: 100%;
23
+ max-width: 400px;
24
+ }
25
+ .close-btn {
26
+ float: right;
27
+ cursor: pointer;
28
+ }
29
+ form {
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: 1rem;
33
+ }
34
+ input {
35
+ padding: 0.5rem;
36
+ border: 1px solid #ccc;
37
+ border-radius: 0.25rem;
38
+ }
39
+ button {
40
+ padding: 0.5rem;
41
+ background: #4299e1;
42
+ color: white;
43
+ border: none;
44
+ border-radius: 0.25rem;
45
+ cursor: pointer;
46
+ }
47
+ </style>
48
+ <div class="modal" id="authModal">
49
+ <div class="modal-content">
50
+ <span class="close-btn" id="closeModal">&times;</span>
51
+ <h2>Sign In</h2>
52
+ <form id="authForm">
53
+ <input type="email" placeholder="Email" required>
54
+ <input type="password" placeholder="Password" required>
55
+ <button type="submit">Sign In</button>
56
+ </form>
57
+ </div>
58
+ </div>
59
+ `;
60
+
61
+ const modal = this.shadowRoot.getElementById('authModal');
62
+ const closeBtn = this.shadowRoot.getElementById('closeModal');
63
+ const authForm = this.shadowRoot.getElementById('authForm');
64
+
65
+ // Show modal when auth is required
66
+ document.addEventListener('auth-required', () => {
67
+ modal.style.display = 'flex';
68
+ });
69
+
70
+ closeBtn.addEventListener('click', () => {
71
+ modal.style.display = 'none';
72
+ });
73
+
74
+ authForm.addEventListener('submit', (e) => {
75
+ e.preventDefault();
76
+ // Handle auth logic here
77
+ modal.style.display = 'none';
78
+ document.dispatchEvent(new CustomEvent('auth-success'));
79
+ });
80
+ }
81
+ }
82
+
83
+ customElements.define('auth-modal', AuthModal);
components/footer.js CHANGED
@@ -71,29 +71,19 @@ class CustomFooter extends HTMLElement {
71
  <footer>
72
  <div class="footer-content">
73
  <div class="footer-section">
74
- <h3>Blank Canvas</h3>
75
- <p>Unleash your creativity with our platform. The possibilities are endless.</p>
76
  </div>
77
  <div class="footer-section">
78
- <h3>Resources</h3>
79
  <ul>
80
- <li><a href="#">Documentation</a></li>
81
- <li><a href="#">Tutorials</a></li>
82
- <li><a href="#">API</a></li>
83
- <li><a href="#">Community</a></li>
84
- </ul>
85
- </div>
86
- <div class="footer-section">
87
- <h3>Company</h3>
88
- <ul>
89
- <li><a href="#">About</a></li>
90
- <li><a href="#">Careers</a></li>
91
- <li><a href="#">Privacy</a></li>
92
- <li><a href="#">Terms</a></li>
93
  </ul>
94
  </div>
95
  </div>
96
- <div class="social-links">
97
  <a href="#"><i data-feather="twitter"></i></a>
98
  <a href="#"><i data-feather="instagram"></i></a>
99
  <a href="#"><i data-feather="facebook"></i></a>
 
71
  <footer>
72
  <div class="footer-content">
73
  <div class="footer-section">
74
+ <h3>Simple Canvas</h3>
75
+ <p>Easy-to-use interface for your creative work.</p>
76
  </div>
77
  <div class="footer-section">
78
+ <h3>Quick Links</h3>
79
  <ul>
80
+ <li><a href="/create.html">New Project</a></li>
81
+ <li><a href="/projects.html">Recent Projects</a></li>
82
+ <li><a href="/help.html">Help Center</a></li>
 
 
 
 
 
 
 
 
 
 
83
  </ul>
84
  </div>
85
  </div>
86
+ <div class="social-links">
87
  <a href="#"><i data-feather="twitter"></i></a>
88
  <a href="#"><i data-feather="instagram"></i></a>
89
  <a href="#"><i data-feather="facebook"></i></a>
components/navbar.js CHANGED
@@ -71,11 +71,11 @@ ul {
71
  <span>Staff Portal</span>
72
  </a>
73
  <ul>
74
- <li><a href="/" class="active"><i data-feather="home"></i> Home</a></li>
75
- <li><a href="/free.html"><i data-feather="globe"></i> Free Website</a></li>
76
- <li><a href="#"><i data-feather="download"></i> Download</a></li>
77
- <li><a href="#"><i data-feather="help-circle"></i> Support</a></li>
78
- <li><a href="#"><i data-feather="user"></i> Account</a></li>
79
  </ul>
80
  </nav>
81
  `;
 
71
  <span>Staff Portal</span>
72
  </a>
73
  <ul>
74
+ <li><a href="/" class="active"><i data-feather="home"></i> Dashboard</a></li>
75
+ <li><a href="/tasks"><i data-feather="check-square"></i> Tasks</a></li>
76
+ <li><a href="/messages"><i data-feather="mail"></i> Messages</a></li>
77
+ <li><a href="/team"><i data-feather="users"></i> Team</a></li>
78
+ <li><a href="/calendar"><i data-feather="calendar"></i> Calendar</a></li>
79
  </ul>
80
  </nav>
81
  `;
index.html CHANGED
@@ -14,17 +14,17 @@
14
  <custom-navbar></custom-navbar>
15
 
16
  <main class="flex-grow flex items-center justify-center" id="vanta-bg">
17
- <div class="text-center p-8 bg-white bg-opacity-90 rounded-xl shadow-2xl max-w-2xl mx-4">
18
- <h1 class="text-5xl font-bold mb-6 text-gray-800">The Ultimate Blank Canvas</h1>
19
- <p class="text-xl text-gray-600 mb-8">
20
- Your imagination is the limit. Start creating something amazing today!
21
- </p>
22
- <div class="flex justify-center gap-4">
23
- <a href="/free.html" class="px-6 py-3 bg-black text-white rounded-lg hover:bg-gray-800 transition flex items-center gap-2">
24
- <i data-feather="globe"></i> Free Website
25
  </a>
26
- <a href="#" class="px-6 py-3 border border-black text-black rounded-lg hover:bg-gray-100 transition flex items-center gap-2">
27
- <i data-feather="download"></i> Download App
 
 
 
28
  </a>
29
  </div>
30
  </div>
@@ -34,8 +34,10 @@
34
 
35
  <script src="components/navbar.js"></script>
36
  <script src="components/footer.js"></script>
 
37
  <script src="script.js"></script>
38
- <script>
 
39
  feather.replace();
40
  VANTA.WAVES({
41
  el: "#vanta-bg",
@@ -49,6 +51,6 @@
49
  color: 0x0
50
  })
51
  </script>
52
- <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
53
  </body>
54
  </html>
 
14
  <custom-navbar></custom-navbar>
15
 
16
  <main class="flex-grow flex items-center justify-center" id="vanta-bg">
17
+ <div class="text-center p-6 bg-white rounded-lg shadow-md max-w-md mx-4">
18
+ <h1 class="text-3xl font-bold mb-4 text-gray-800">Simple Canvas</h1>
19
+ <div class="flex flex-col gap-3">
20
+ <a href="/create.html" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition">
21
+ New Project
 
 
 
22
  </a>
23
+ <a href="/projects.html" class="px-4 py-2 bg-gray-100 text-gray-800 rounded hover:bg-gray-200 transition">
24
+ My Projects
25
+ </a>
26
+ <a href="/help.html" class="px-4 py-2 text-blue-600 hover:underline">
27
+ Quick Help
28
  </a>
29
  </div>
30
  </div>
 
34
 
35
  <script src="components/navbar.js"></script>
36
  <script src="components/footer.js"></script>
37
+ <script src="components/auth-modal.js"></script>
38
  <script src="script.js"></script>
39
+ <auth-modal></auth-modal>
40
+ <script>
41
  feather.replace();
42
  VANTA.WAVES({
43
  el: "#vanta-bg",
 
51
  color: 0x0
52
  })
53
  </script>
54
+ <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
55
  </body>
56
  </html>
projects.html CHANGED
@@ -13,8 +13,8 @@
13
  <main class="flex-grow p-6">
14
  <div class="max-w-3xl mx-auto">
15
  <h1 class="text-2xl font-bold mb-6">My Projects</h1>
16
- <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
17
- <div class="bg-white p-4 rounded-lg shadow border hover:shadow-md transition">
18
  <h3 class="font-medium mb-2">Project 1</h3>
19
  <p class="text-sm text-gray-600 mb-2">Last edited: Today</p>
20
  <a href="#" class="text-blue-600 text-sm">Open β†’</a>
 
13
  <main class="flex-grow p-6">
14
  <div class="max-w-3xl mx-auto">
15
  <h1 class="text-2xl font-bold mb-6">My Projects</h1>
16
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4" id="projects-container">
17
+ <div class="bg-white p-4 rounded-lg shadow border hover:shadow-md transition">
18
  <h3 class="font-medium mb-2">Project 1</h3>
19
  <p class="text-sm text-gray-600 mb-2">Last edited: Today</p>
20
  <a href="#" class="text-blue-600 text-sm">Open β†’</a>
script.js CHANGED
@@ -1,21 +1,34 @@
 
1
  // Initialize tooltips
2
  document.addEventListener('DOMContentLoaded', function() {
3
  // Any shared JavaScript functionality can go here
4
  console.log('The Ultimate Blank Canvas App is ready!');
5
- // Add fade-in animation
 
6
  document.body.style.opacity = '0';
7
  setTimeout(() => {
8
  document.body.style.transition = 'opacity 0.5s ease-in';
9
  document.body.style.opacity = '1';
10
  }, 100);
11
 
12
- // Download button functionality
13
- document.addEventListener('click', (e) => {
14
- if (e.target.closest('[data-download]')) {
15
- e.preventDefault();
16
- alert('Downloading the app...');
17
- // In a real implementation, this would trigger the actual download
18
- window.location.href = 'https://github.com/public-apis/public-apis';
19
- }
20
- });
21
- });
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
  // Initialize tooltips
3
  document.addEventListener('DOMContentLoaded', function() {
4
  // Any shared JavaScript functionality can go here
5
  console.log('The Ultimate Blank Canvas App is ready!');
6
+
7
+ // Example: Add a simple fade-in animation to all pages
8
  document.body.style.opacity = '0';
9
  setTimeout(() => {
10
  document.body.style.transition = 'opacity 0.5s ease-in';
11
  document.body.style.opacity = '1';
12
  }, 100);
13
 
14
+ // Load projects if on projects page
15
+ if (window.location.pathname.includes('projects.html')) {
16
+ loadProjects();
17
+ }
18
+ });
19
+
20
+ async function loadProjects() {
21
+ try {
22
+ const response = await axios.get('https://jsonplaceholder.typicode.com/posts?_limit=6');
23
+ const projectsContainer = document.getElementById('projects-container');
24
+ projectsContainer.innerHTML = response.data.map(project => `
25
+ <div class="bg-white p-4 rounded-lg shadow border hover:shadow-md transition">
26
+ <h3 class="font-medium mb-2">${project.title}</h3>
27
+ <p class="text-sm text-gray-600 mb-2">Created: ${new Date().toLocaleDateString()}</p>
28
+ <a href="#" class="text-blue-600 text-sm">Open β†’</a>
29
+ </div>
30
+ `).join('');
31
+ } catch (error) {
32
+ console.error('Failed to load projects:', error);
33
+ }
34
+ }
style.css CHANGED
@@ -11,7 +11,16 @@ body {
11
  50% { transform: translateY(-15px); }
12
  100% { transform: translateY(0px); }
13
  }
14
-
15
  .floating {
16
  animation: float 6s ease-in-out infinite;
17
- }
 
 
 
 
 
 
 
 
 
 
 
11
  50% { transform: translateY(-15px); }
12
  100% { transform: translateY(0px); }
13
  }
 
14
  .floating {
15
  animation: float 6s ease-in-out infinite;
16
+ }
17
+
18
+ /* Responsive adjustments */
19
+ @media (max-width: 640px) {
20
+ #vanta-bg {
21
+ background-size: cover;
22
+ }
23
+ .text-center {
24
+ padding: 1rem;
25
+ }
26
+ }