CommandPrompt commited on
Commit
b4ad052
·
verified ·
1 Parent(s): 5a8ce5a

I want it as an advance widget

Browse files
Files changed (6) hide show
  1. README.md +8 -5
  2. components/footer.js +128 -0
  3. components/navbar.js +80 -0
  4. index.html +151 -19
  5. script.js +61 -0
  6. style.css +66 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Scrollgenius 3000 Pro Max Deluxe
3
- emoji:
4
- colorFrom: blue
5
- colorTo: yellow
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: ScrollGenius 3000 Pro Max Deluxe 🚀
3
+ colorFrom: green
4
+ colorTo: blue
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,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ footer {
7
+ background: rgba(17, 24, 39, 0.8);
8
+ backdrop-filter: blur(10px);
9
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
10
+ padding: 2rem 0;
11
+ margin-top: 3rem;
12
+ }
13
+
14
+ .footer-container {
15
+ max-width: 1200px;
16
+ margin: 0 auto;
17
+ padding: 0 2rem;
18
+ display: grid;
19
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
20
+ gap: 2rem;
21
+ }
22
+
23
+ .footer-section h3 {
24
+ color: white;
25
+ font-size: 1.1rem;
26
+ margin-bottom: 1rem;
27
+ }
28
+
29
+ .footer-links {
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: 0.5rem;
33
+ }
34
+
35
+ .footer-link {
36
+ color: rgba(255, 255, 255, 0.6);
37
+ text-decoration: none;
38
+ transition: color 0.2s;
39
+ }
40
+
41
+ .footer-link:hover {
42
+ color: white;
43
+ }
44
+
45
+ .social-links {
46
+ display: flex;
47
+ gap: 1rem;
48
+ margin-top: 1rem;
49
+ }
50
+
51
+ .social-link {
52
+ color: rgba(255, 255, 255, 0.6);
53
+ transition: color 0.2s;
54
+ }
55
+
56
+ .social-link:hover {
57
+ color: white;
58
+ }
59
+
60
+ .copyright {
61
+ text-align: center;
62
+ margin-top: 2rem;
63
+ color: rgba(255, 255, 255, 0.4);
64
+ font-size: 0.9rem;
65
+ }
66
+
67
+ @media (max-width: 768px) {
68
+ .footer-container {
69
+ grid-template-columns: 1fr;
70
+ padding: 0 1rem;
71
+ }
72
+ }
73
+ </style>
74
+
75
+ <footer>
76
+ <div class="footer-container">
77
+ <div class="footer-section">
78
+ <h3>Teleprompter Factory</h3>
79
+ <p style="color: rgba(255, 255, 255, 0.6); line-height: 1.5;">
80
+ Professional teleprompter software for presenters, broadcasters, and content creators.
81
+ </p>
82
+ <div class="social-links">
83
+ <a href="#" class="social-link"><i data-feather="twitter"></i></a>
84
+ <a href="#" class="social-link"><i data-feather="facebook"></i></a>
85
+ <a href="#" class="social-link"><i data-feather="instagram"></i></a>
86
+ <a href="#" class="social-link"><i data-feather="linkedin"></i></a>
87
+ </div>
88
+ </div>
89
+
90
+ <div class="footer-section">
91
+ <h3>Quick Links</h3>
92
+ <div class="footer-links">
93
+ <a href="/" class="footer-link">Home</a>
94
+ <a href="/features" class="footer-link">Features</a>
95
+ <a href="/pricing" class="footer-link">Pricing</a>
96
+ <a href="/templates" class="footer-link">Templates</a>
97
+ </div>
98
+ </div>
99
+
100
+ <div class="footer-section">
101
+ <h3>Resources</h3>
102
+ <div class="footer-links">
103
+ <a href="/blog" class="footer-link">Blog</a>
104
+ <a href="/tutorials" class="footer-link">Tutorials</a>
105
+ <a href="/support" class="footer-link">Support</a>
106
+ <a href="/faq" class="footer-link">FAQ</a>
107
+ </div>
108
+ </div>
109
+
110
+ <div class="footer-section">
111
+ <h3>Legal</h3>
112
+ <div class="footer-links">
113
+ <a href="/privacy" class="footer-link">Privacy Policy</a>
114
+ <a href="/terms" class="footer-link">Terms of Service</a>
115
+ <a href="/cookies" class="footer-link">Cookie Policy</a>
116
+ </div>
117
+ </div>
118
+ </div>
119
+
120
+ <div class="copyright">
121
+ &copy; ${new Date().getFullYear()} Teleprompter Factory Deluxe. All rights reserved.
122
+ </div>
123
+ </footer>
124
+ `;
125
+ }
126
+ }
127
+
128
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ background: rgba(31, 41, 55, 0.8);
8
+ backdrop-filter: blur(10px);
9
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
10
+ }
11
+
12
+ .nav-container {
13
+ max-width: 1200px;
14
+ margin: 0 auto;
15
+ padding: 1rem 2rem;
16
+ display: flex;
17
+ justify-content: space-between;
18
+ align-items: center;
19
+ }
20
+
21
+ .logo {
22
+ font-weight: 700;
23
+ font-size: 1.25rem;
24
+ color: white;
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 0.5rem;
28
+ }
29
+
30
+ .nav-links {
31
+ display: flex;
32
+ gap: 1.5rem;
33
+ }
34
+
35
+ .nav-link {
36
+ color: rgba(255, 255, 255, 0.8);
37
+ text-decoration: none;
38
+ transition: color 0.2s;
39
+ font-weight: 500;
40
+ }
41
+
42
+ .nav-link:hover {
43
+ color: white;
44
+ }
45
+
46
+ @media (max-width: 768px) {
47
+ .nav-container {
48
+ flex-direction: column;
49
+ padding: 1rem;
50
+ }
51
+
52
+ .nav-links {
53
+ margin-top: 1rem;
54
+ flex-wrap: wrap;
55
+ justify-content: center;
56
+ }
57
+ }
58
+ </style>
59
+
60
+ <nav>
61
+ <div class="nav-container">
62
+ <a href="/" class="logo">
63
+ <i data-feather="tv"></i>
64
+ Teleprompter Factory
65
+ </a>
66
+
67
+ <div class="nav-links">
68
+ <a href="/" class="nav-link">Home</a>
69
+ <a href="/templates" class="nav-link">Templates</a>
70
+ <a href="/features" class="nav-link">Features</a>
71
+ <a href="/pricing" class="nav-link">Pricing</a>
72
+ <a href="/contact" class="nav-link">Contact</a>
73
+ </div>
74
+ </div>
75
+ </nav>
76
+ `;
77
+ }
78
+ }
79
+
80
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,151 @@
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>Teleprompter Factory Deluxe</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <script>
12
+ tailwind.config = {
13
+ theme: {
14
+ extend: {
15
+ colors: {
16
+ primary: {
17
+ 500: '#3B82F6',
18
+ },
19
+ secondary: {
20
+ 500: '#10B981',
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ </script>
27
+ </head>
28
+ <body class="bg-gray-900 text-gray-100 min-h-screen">
29
+ <custom-navbar></custom-navbar>
30
+
31
+ <main class="container mx-auto px-4 py-8">
32
+ <div class="max-w-4xl mx-auto bg-gray-800 rounded-xl shadow-2xl overflow-hidden border border-gray-700">
33
+ <div class="p-6 bg-gradient-to-r from-primary-500 to-secondary-500 relative">
34
+ <div class="absolute top-4 right-4 flex gap-2">
35
+ <button class="p-2 bg-white/10 rounded-full hover:bg-white/20 transition">
36
+ <i data-feather="minimize-2" class="w-4 h-4"></i>
37
+ </button>
38
+ <button class="p-2 bg-white/10 rounded-full hover:bg-white/20 transition">
39
+ <i data-feather="maximize-2" class="w-4 h-4"></i>
40
+ </button>
41
+ <button class="p-2 bg-red-500 rounded-full hover:bg-red-600 transition">
42
+ <i data-feather="x" class="w-4 h-4"></i>
43
+ </button>
44
+ </div>
45
+ <h1 class="text-3xl font-bold">ScrollGenius 3000</h1>
46
+ <p class="text-gray-200 mt-2">Professional Teleprompter Widget</p>
47
+ </div>
48
+ <div class="p-6 grid grid-cols-1 md:grid-cols-2 gap-6 relative">
49
+ <div class="absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary-500 to-secondary-500"></div>
50
+ <div class="space-y-6">
51
+ <div>
52
+ <label class="block text-sm font-medium text-gray-300 mb-1 flex items-center justify-between">
53
+ <span>Script Title</span>
54
+ <span class="text-xs text-gray-400">Ctrl+T</span>
55
+ </label>
56
+ <div class="relative">
57
+ <input type="text" class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 outline-none transition pr-10">
58
+ <button class="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white">
59
+ <i data-feather="edit-2" class="w-4 h-4"></i>
60
+ </button>
61
+ </div>
62
+ </div>
63
+ <div>
64
+ <label class="block text-sm font-medium text-gray-300 mb-1 flex items-center justify-between">
65
+ <span>Scroll Speed</span>
66
+ <span class="text-xs text-gray-400" id="speed-value">1.0x</span>
67
+ </label>
68
+ <input type="range" min="0.5" max="3" step="0.1" value="1" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer accent-primary-500">
69
+ <div class="flex justify-between text-xs text-gray-400 mt-1">
70
+ <span>Slow</span>
71
+ <span>Medium</span>
72
+ <span>Fast</span>
73
+ </div>
74
+ </div>
75
+
76
+ <div>
77
+ <label class="block text-sm font-medium text-gray-300 mb-1">Text Size</label>
78
+ <select class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 outline-none transition">
79
+ <option>Small</option>
80
+ <option selected>Medium</option>
81
+ <option>Large</option>
82
+ <option>Extra Large</option>
83
+ </select>
84
+ </div>
85
+
86
+ <div>
87
+ <label class="block text-sm font-medium text-gray-300 mb-1">Theme</label>
88
+ <div class="grid grid-cols-3 gap-2">
89
+ <button class="bg-blue-500 h-10 rounded-lg"></button>
90
+ <button class="bg-green-500 h-10 rounded-lg"></button>
91
+ <button class="bg-purple-500 h-10 rounded-lg"></button>
92
+ <button class="bg-red-500 h-10 rounded-lg"></button>
93
+ <button class="bg-yellow-500 h-10 rounded-lg"></button>
94
+ <button class="bg-pink-500 h-10 rounded-lg"></button>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ <div class="bg-gray-700 rounded-lg p-4 h-64 overflow-y-auto relative group">
99
+ <textarea class="w-full h-full bg-transparent resize-none outline-none text-gray-200 placeholder-gray-500" placeholder="Enter your script here..."></textarea>
100
+ <div class="absolute bottom-4 right-4 opacity-0 group-hover:opacity-100 transition flex gap-2">
101
+ <button class="p-2 bg-gray-600 rounded-lg hover:bg-gray-500" title="Format Text">
102
+ <i data-feather="type" class="w-4 h-4"></i>
103
+ </button>
104
+ <button class="p-2 bg-gray-600 rounded-lg hover:bg-gray-500" title="Import Script">
105
+ <i data-feather="upload" class="w-4 h-4"></i>
106
+ </button>
107
+ <button class="p-2 bg-gray-600 rounded-lg hover:bg-gray-500" title="Clear All">
108
+ <i data-feather="trash-2" class="w-4 h-4"></i>
109
+ </button>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ <div class="p-6 bg-gray-700 border-t border-gray-600 flex flex-wrap justify-between gap-4">
114
+ <div class="flex gap-2">
115
+ <button class="px-4 py-2 bg-gray-600 hover:bg-gray-500 rounded-lg font-medium transition flex items-center gap-2 text-sm">
116
+ <i data-feather="save" class="w-4 h-4"></i> Save
117
+ </button>
118
+ <button class="px-4 py-2 bg-gray-600 hover:bg-gray-500 rounded-lg font-medium transition flex items-center gap-2 text-sm">
119
+ <i data-feather="settings" class="w-4 h-4"></i> Settings
120
+ </button>
121
+ </div>
122
+ <div class="flex gap-2">
123
+ <button class="px-4 py-2 bg-gray-600 hover:bg-gray-500 rounded-lg font-medium transition flex items-center gap-2 text-sm">
124
+ <i data-feather="help-circle" class="w-4 h-4"></i> Help
125
+ </button>
126
+ <button class="px-6 py-2 bg-primary-500 hover:bg-primary-600 rounded-lg font-medium transition flex items-center gap-2 text-sm glow">
127
+ <i data-feather="play" class="w-4 h-4"></i> Start
128
+ </button>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </main>
133
+
134
+ <custom-footer></custom-footer>
135
+ <script src="components/navbar.js"></script>
136
+ <script src="components/footer.js"></script>
137
+ <script src="script.js"></script>
138
+ <script>
139
+ feather.replace();
140
+
141
+ // Update speed value display
142
+ const speedSlider = document.querySelector('input[type="range"]');
143
+ const speedValue = document.getElementById('speed-value');
144
+
145
+ speedSlider.addEventListener('input', function() {
146
+ speedValue.textContent = `${this.value}x`;
147
+ });
148
+ </script>
149
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
150
+ </body>
151
+ </html>
script.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ // Enhanced theme selection with local storage
4
+ const themeButtons = document.querySelectorAll('.theme-selector button');
5
+ themeButtons.forEach(button => {
6
+ button.addEventListener('click', function() {
7
+ // Remove active class from all buttons
8
+ themeButtons.forEach(btn => btn.classList.remove('glow'));
9
+
10
+ // Add active class to clicked button
11
+ this.classList.add('glow');
12
+
13
+ // Change the theme (this would be more complex in a real app)
14
+ console.log('Theme changed to: ', this.style.backgroundColor);
15
+ });
16
+ });
17
+ // Advanced scroll speed handling
18
+ const speedSlider = document.querySelector('input[type="range"]');
19
+
20
+ // Load saved speed if available
21
+ const savedSpeed = localStorage.getItem('teleprompterSpeed');
22
+ if (savedSpeed) {
23
+ speedSlider.value = savedSpeed;
24
+ document.getElementById('speed-value').textContent = `${savedSpeed}x`;
25
+ }
26
+
27
+ speedSlider.addEventListener('input', function() {
28
+ const speed = this.value;
29
+ document.getElementById('speed-value').textContent = `${speed}x`;
30
+ localStorage.setItem('teleprompterSpeed', speed);
31
+ });
32
+
33
+ // Widget functionality
34
+ let isDragging = false;
35
+ const widget = document.querySelector('.max-w-4xl');
36
+
37
+ widget.addEventListener('mousedown', function(e) {
38
+ if (e.target.closest('input, textarea, button, select')) return;
39
+ isDragging = true;
40
+ const offsetX = e.clientX - widget.getBoundingClientRect().left;
41
+ const offsetY = e.clientY - widget.getBoundingClientRect().top;
42
+
43
+ function moveWidget(e) {
44
+ if (!isDragging) return;
45
+ widget.style.left = `${e.clientX - offsetX}px`;
46
+ widget.style.top = `${e.clientY - offsetY}px`;
47
+ widget.style.position = 'fixed';
48
+ widget.style.margin = '0';
49
+ widget.style.zIndex = '1000';
50
+ }
51
+
52
+ function stopDrag() {
53
+ isDragging = false;
54
+ document.removeEventListener('mousemove', moveWidget);
55
+ document.removeEventListener('mouseup', stopDrag);
56
+ }
57
+
58
+ document.addEventListener('mousemove', moveWidget);
59
+ document.addEventListener('mouseup', stopDrag);
60
+ });
61
+ });
style.css CHANGED
@@ -1,28 +1,76 @@
 
 
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
+ /* Custom scrollbar */
8
+ ::-webkit-scrollbar {
9
+ width: 8px;
10
+ height: 8px;
11
+ }
12
+
13
+ ::-webkit-scrollbar-track {
14
+ background: #1F2937;
15
+ }
16
+
17
+ ::-webkit-scrollbar-thumb {
18
+ background: #4B5563;
19
+ border-radius: 4px;
20
+ }
21
+
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: #6B7280;
24
+ }
25
+ /* Animation for buttons */
26
+ button {
27
+ transition: all 0.2s ease;
28
+ user-select: none;
29
+ }
30
+
31
+ button:hover {
32
+ transform: translateY(-1px);
33
  }
34
 
35
+ /* Custom range input styling */
36
+ input[type="range"] {
37
+ -webkit-appearance: none;
38
+ height: 6px;
39
+ background: #4B5563;
40
+ border-radius: 3px;
41
  }
42
 
43
+ input[type="range"]::-webkit-slider-thumb {
44
+ -webkit-appearance: none;
45
+ width: 16px;
46
+ height: 16px;
47
+ border-radius: 50%;
48
+ background: #3B82F6;
49
+ cursor: pointer;
50
+ transition: all 0.2s;
51
  }
52
 
53
+ input[type="range"]::-webkit-slider-thumb:hover {
54
+ transform: scale(1.2);
 
 
 
 
55
  }
56
 
57
+ /* Widget styling */
58
+ .widget-controls {
59
+ transition: opacity 0.2s;
60
+ will-change: opacity;
61
  }
62
+
63
+ .widget-controls:hover {
64
+ opacity: 1 !important;
65
+ }
66
+ /* Custom glow effect */
67
+ .glow {
68
+ box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
69
+ }
70
+
71
+ /* Teleprompter preview area */
72
+ .teleprompter-preview {
73
+ background: rgba(0, 0, 0, 0.2);
74
+ backdrop-filter: blur(10px);
75
+ border: 1px solid rgba(255, 255, 255, 0.1);
76
+ }