kaidjuric commited on
Commit
7466f9c
·
verified ·
1 Parent(s): 66b3ba1

FPD Auto-Setup Plugin v1.0.0

Browse files
Files changed (4) hide show
  1. components/header.js +84 -0
  2. index.html +7 -122
  3. script.js +42 -0
  4. style.css +172 -21
components/header.js ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomHeader extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .header-gradient {
7
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
8
+ color: white;
9
+ width: 100%;
10
+ }
11
+ .container {
12
+ max-width: 1200px;
13
+ margin: 0 auto;
14
+ padding: 0 15px;
15
+ }
16
+ .header-content {
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: space-between;
20
+ padding: 1.5rem 0;
21
+ }
22
+ .logo {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: 1rem;
26
+ }
27
+ .logo-icon {
28
+ font-size: 1.75rem;
29
+ }
30
+ .logo-text {
31
+ font-size: 1.25rem;
32
+ font-weight: 700;
33
+ }
34
+ .nav-links {
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 1.5rem;
38
+ }
39
+ .nav-link {
40
+ color: white;
41
+ text-decoration: none;
42
+ transition: opacity 0.2s;
43
+ }
44
+ .nav-link:hover {
45
+ opacity: 0.8;
46
+ text-decoration: underline;
47
+ }
48
+ .settings-btn {
49
+ background: white;
50
+ color: #764ba2;
51
+ padding: 0.5rem 1rem;
52
+ border-radius: 0.5rem;
53
+ font-weight: 600;
54
+ transition: all 0.2s;
55
+ display: flex;
56
+ align-items: center;
57
+ gap: 0.5rem;
58
+ }
59
+ .settings-btn:hover {
60
+ background: #f8f9fa;
61
+ }
62
+ </style>
63
+ <header class="header-gradient">
64
+ <div class="container">
65
+ <div class="header-content">
66
+ <div class="logo">
67
+ <i class="fas fa-magic logo-icon"></i>
68
+ <h1 class="logo-text">FPD Auto-Setup</h1>
69
+ </div>
70
+ <div class="nav-links">
71
+ <a href="/documentation.html" class="nav-link">Documentation</a>
72
+ <a href="/support.html" class="nav-link">Support</a>
73
+ <button class="settings-btn">
74
+ <i class="fas fa-cog"></i>
75
+ Settings
76
+ </button>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </header>
81
+ `;
82
+ }
83
+ }
84
+ customElements.define('custom-header', CustomHeader);
index.html CHANGED
@@ -1,89 +1,16 @@
 
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>FPD Auto-Setup</title>
7
- <script src="https://cdn.tailwindcss.com"></script>
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
- <style>
10
- .fpd-gradient-bg {
11
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
12
- }
13
- .fpd-shadow {
14
- box-shadow: 0 10px 20px rgba(0,0,0,0.1);
15
- }
16
- .fpd-pulse {
17
- animation: pulse 2s infinite;
18
- }
19
- @keyframes pulse {
20
- 0% {
21
- transform: scale(1);
22
- }
23
- 50% {
24
- transform: scale(1.05);
25
- }
26
- 100% {
27
- transform: scale(1);
28
- }
29
- }
30
- .tooltip {
31
- position: relative;
32
- }
33
- .tooltip .tooltip-text {
34
- visibility: hidden;
35
- width: 200px;
36
- background-color: #555;
37
- color: #fff;
38
- text-align: center;
39
- border-radius: 6px;
40
- padding: 5px;
41
- position: absolute;
42
- z-index: 1;
43
- bottom: 125%;
44
- left: 50%;
45
- margin-left: -100px;
46
- opacity: 0;
47
- transition: opacity 0.3s;
48
- }
49
- .tooltip .tooltip-text::after {
50
- content: "";
51
- position: absolute;
52
- top: 100%;
53
- left: 50%;
54
- margin-left: -5px;
55
- border-width: 5px;
56
- border-style: solid;
57
- border-color: #555 transparent transparent transparent;
58
- }
59
- .tooltip:hover .tooltip-text {
60
- visibility: visible;
61
- opacity: 1;
62
- }
63
- </style>
64
  </head>
65
- <body class="bg-gray-100">
66
- <div class="min-h-screen">
67
- <!-- Header -->
68
- <header class="fpd-gradient-bg text-white">
69
- <div class="container mx-auto px-4 py-6">
70
- <div class="flex items-center justify-between">
71
- <div class="flex items-center space-x-4">
72
- <i class="fas fa-magic text-3xl"></i>
73
- <h1 class="text-2xl font-bold">FPD Auto-Setup</h1>
74
- </div>
75
- <div class="flex items-center space-x-4">
76
- <a href="#" class="hover:underline">Documentation</a>
77
- <a href="#" class="hover:underline">Support</a>
78
- <button class="bg-white text-purple-700 px-4 py-2 rounded-lg font-semibold hover:bg-gray-100 transition">
79
- <i class="fas fa-cog mr-2"></i>Settings
80
- </button>
81
- </div>
82
- </div>
83
- </div>
84
- </header>
85
-
86
- <!-- Main Content -->
87
  <main class="container mx-auto px-4 py-8">
88
  <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
89
  <!-- Left Sidebar -->
@@ -349,49 +276,7 @@
349
  </div>
350
  </footer>
351
  </div>
352
-
353
- <script>
354
- document.addEventListener('DOMContentLoaded', function() {
355
- // Demo functionality - would be replaced with actual WordPress/PHP code
356
- console.log('FPD Auto-Setup Plugin UI Loaded');
357
-
358
- // Tooltip functionality
359
- const tooltips = document.querySelectorAll('.tooltip');
360
- tooltips.forEach(tooltip => {
361
- tooltip.addEventListener('mouseenter', function() {
362
- this.querySelector('.tooltip-text').style.visibility = 'visible';
363
- this.querySelector('.tooltip-text').style.opacity = '1';
364
- });
365
- tooltip.addEventListener('mouseleave', function() {
366
- this.querySelector('.tooltip-text').style.visibility = 'hidden';
367
- this.querySelector('.tooltip-text').style.opacity = '0';
368
- });
369
- });
370
-
371
- // Execute button click handler
372
- const executeBtn = document.querySelector('.bg-purple-600.hover\\:bg-purple-700');
373
- if (executeBtn) {
374
- executeBtn.addEventListener('click', function() {
375
- alert('This would execute the FPD setup process. In a real plugin, this would make an AJAX call to WordPress.');
376
- });
377
- }
378
-
379
- // Sample wizard navigation
380
- const wizardBtns = document.querySelectorAll('.bg-gray-200.hover\\:bg-gray-300');
381
- wizardBtns.forEach(btn => {
382
- btn.addEventListener('click', function() {
383
- // Remove active class from current active button
384
- document.querySelector('.fpd-pulse').classList.remove('fpd-pulse', 'bg-purple-600', 'text-white');
385
- document.querySelector('.fpd-pulse').classList.add('bg-gray-200', 'text-gray-700');
386
-
387
- // Add active class to clicked button
388
- this.classList.remove('bg-gray-200', 'text-gray-700');
389
- this.classList.add('fpd-pulse', 'bg-purple-600', 'text-white');
390
-
391
- alert('In a real plugin, this would navigate between wizard steps.');
392
- });
393
- });
394
- });
395
- </script>
396
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=kaidjuric/fpd-auto-setup" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
397
  </html>
 
1
+
2
  <!DOCTYPE html>
3
  <html lang="en">
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
  <title>FPD Auto-Setup</title>
 
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <link rel="stylesheet" href="style.css">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  </head>
11
+ <body>
12
+ <custom-header></custom-header>
13
+ <!-- Main Content -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  <main class="container mx-auto px-4 py-8">
15
  <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
16
  <!-- Left Sidebar -->
 
276
  </div>
277
  </footer>
278
  </div>
279
+ <script src="components/header.js"></script>
280
+ <script src="script.js"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=kaidjuric/fpd-auto-setup" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
282
  </html>
script.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', function() {
2
+ // Tooltip functionality
3
+ const tooltips = document.querySelectorAll('.tooltip');
4
+ tooltips.forEach(tooltip => {
5
+ tooltip.addEventListener('mouseenter', function() {
6
+ this.querySelector('.tooltip-text').style.visibility = 'visible';
7
+ this.querySelector('.tooltip-text').style.opacity = '1';
8
+ });
9
+ tooltip.addEventListener('mouseleave', function() {
10
+ this.querySelector('.tooltip-text').style.visibility = 'hidden';
11
+ this.querySelector('.tooltip-text').style.opacity = '0';
12
+ });
13
+ });
14
+
15
+ // Execute button click handler
16
+ const executeBtn = document.querySelector('.btn-primary');
17
+ if (executeBtn) {
18
+ executeBtn.addEventListener('click', function() {
19
+ alert('This would execute the FPD setup process. In a real plugin, this would make an AJAX call to WordPress.');
20
+ });
21
+ }
22
+
23
+ // Wizard navigation
24
+ const wizardBtns = document.querySelectorAll('.wizard-btn');
25
+ wizardBtns.forEach(btn => {
26
+ btn.addEventListener('click', function() {
27
+ // Remove active class from current active button
28
+ document.querySelector('.wizard-btn.active').classList.remove('active', 'pulse');
29
+ // Add active class to clicked button
30
+ this.classList.add('active', 'pulse');
31
+ alert('In a real plugin, this would navigate between wizard steps.');
32
+ });
33
+ });
34
+
35
+ // Settings button in header
36
+ const settingsBtn = document.querySelector('.settings-btn');
37
+ if (settingsBtn) {
38
+ settingsBtn.addEventListener('click', function() {
39
+ alert('Settings modal would open here');
40
+ });
41
+ }
42
+ });
style.css CHANGED
@@ -1,34 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  body {
3
- padding: 2rem;
4
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
5
  }
6
 
7
- /* Coffee mug product specific styling */
8
- .product-mug {
9
- background-color: #f3e8ff;
10
- border-left: 4px solid #8b5cf6;
11
  }
12
- h1 {
13
- font-size: 16px;
14
- margin-top: 0;
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
- p {
18
- color: rgb(107, 114, 128);
19
- font-size: 15px;
20
- margin-bottom: 10px;
21
- margin-top: 5px;
22
  }
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  .card {
25
- max-width: 620px;
26
- margin: 0 auto;
27
- padding: 16px;
28
- border: 1px solid lightgray;
29
- border-radius: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
31
 
32
- .card p:last-child {
33
- margin-bottom: 0;
34
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ :root {
2
+ --primary: #667eea;
3
+ --primary-dark: #764ba2;
4
+ --text: #2d3748;
5
+ --text-light: #718096;
6
+ --bg: #f7fafc;
7
+ --white: #ffffff;
8
+ --gray-100: #f8f9fa;
9
+ --gray-200: #e9ecef;
10
+ --gray-300: #dee2e6;
11
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
12
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
13
+ --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
14
+ --radius-sm: 0.25rem;
15
+ --radius: 0.5rem;
16
+ --radius-lg: 0.75rem;
17
+ }
18
+
19
+ * {
20
+ box-sizing: border-box;
21
+ margin: 0;
22
+ padding: 0;
23
+ }
24
 
25
  body {
26
+ background-color: var(--bg);
27
+ color: var(--text);
28
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
29
+ line-height: 1.5;
30
+ min-height: 100vh;
31
  }
32
 
33
+ main {
34
+ padding: 2rem 0;
 
 
35
  }
36
+
37
+ .container {
38
+ max-width: 1200px;
39
+ margin: 0 auto;
40
+ padding: 0 15px;
41
+ }
42
+
43
+ /* Animation */
44
+ @keyframes pulse {
45
+ 0% { transform: scale(1); }
46
+ 50% { transform: scale(1.05); }
47
+ 100% { transform: scale(1); }
48
  }
49
 
50
+ .pulse {
51
+ animation: pulse 2s infinite;
 
 
 
52
  }
53
 
54
+ /* Tooltip */
55
+ .tooltip {
56
+ position: relative;
57
+ display: inline-block;
58
+ }
59
+
60
+ .tooltip .tooltip-text {
61
+ visibility: hidden;
62
+ width: 200px;
63
+ background-color: #555;
64
+ color: #fff;
65
+ text-align: center;
66
+ border-radius: var(--radius-sm);
67
+ padding: 5px;
68
+ position: absolute;
69
+ z-index: 1;
70
+ bottom: 125%;
71
+ left: 50%;
72
+ transform: translateX(-50%);
73
+ opacity: 0;
74
+ transition: opacity 0.3s;
75
+ }
76
+
77
+ .tooltip .tooltip-text::after {
78
+ content: "";
79
+ position: absolute;
80
+ top: 100%;
81
+ left: 50%;
82
+ margin-left: -5px;
83
+ border-width: 5px;
84
+ border-style: solid;
85
+ border-color: #555 transparent transparent transparent;
86
+ }
87
+
88
+ .tooltip:hover .tooltip-text {
89
+ visibility: visible;
90
+ opacity: 1;
91
+ }
92
+
93
+ /* Buttons */
94
+ .btn {
95
+ display: inline-flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ padding: 0.5rem 1rem;
99
+ border-radius: var(--radius);
100
+ font-weight: 500;
101
+ cursor: pointer;
102
+ transition: all 0.2s;
103
+ border: none;
104
+ outline: none;
105
+ }
106
+
107
+ .btn-primary {
108
+ background-color: var(--primary);
109
+ color: white;
110
+ }
111
+
112
+ .btn-primary:hover {
113
+ background-color: #5a67d8;
114
+ }
115
+
116
+ .btn-outline {
117
+ background-color: transparent;
118
+ border: 1px solid var(--gray-300);
119
+ color: var(--text);
120
+ }
121
+
122
+ .btn-outline:hover {
123
+ background-color: var(--gray-100);
124
+ }
125
+
126
+ /* Cards */
127
  .card {
128
+ background-color: var(--white);
129
+ border-radius: var(--radius);
130
+ box-shadow: var(--shadow);
131
+ padding: 1.5rem;
132
+ margin-bottom: 1.5rem;
133
+ }
134
+
135
+ .card-title {
136
+ font-size: 1.25rem;
137
+ font-weight: 600;
138
+ margin-bottom: 1rem;
139
+ color: var(--primary-dark);
140
+ }
141
+
142
+ /* Grid */
143
+ .grid {
144
+ display: grid;
145
+ gap: 1.5rem;
146
+ }
147
+
148
+ .grid-cols-1 {
149
+ grid-template-columns: repeat(1, minmax(0, 1fr));
150
+ }
151
+
152
+ .grid-cols-3 {
153
+ grid-template-columns: repeat(3, minmax(0, 1fr));
154
+ }
155
+
156
+ /* Utilities */
157
+ .text-center {
158
+ text-align: center;
159
+ }
160
+
161
+ .font-semibold {
162
+ font-weight: 600;
163
  }
164
 
165
+ .text-purple-800 {
166
+ color: var(--primary-dark);
167
  }
168
+
169
+ .bg-purple-100 {
170
+ background-color: #e9d8fd;
171
+ }
172
+
173
+ .hover\:bg-purple-200:hover {
174
+ background-color: #d6bcfa;
175
+ }
176
+
177
+ /* Responsive */
178
+ @media (min-width: 768px) {
179
+ .md\:col-span-1 {
180
+ grid-column: span 1 / span 1;
181
+ }
182
+ .md\:col-span-2 {
183
+ grid-column: span 2 / span 2;
184
+ }
185
+ }