Spaces:
Running
Running
remova o fab grande com as duas ingrenagens, deixe so os outros 3, utilize um icone de zzz (dormindo) para o estado de sleep ativo e de um braço robótico para quando estiver acordado. e no de start coloque icones q represente ligado e desligado (energizado, desenergizado) - Initial Deployment
Browse files- README.md +7 -5
- index.html +210 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 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: fab-test
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,210 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ale=1.0">
|
| 6 |
+
<title>Machine Control FAB</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 |
+
.fab-container {
|
| 11 |
+
position: fixed;
|
| 12 |
+
bottom: 2rem;
|
| 13 |
+
right: 2rem;
|
| 14 |
+
z-index: 999;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.fab-buttons {
|
| 18 |
+
display: flex;
|
| 19 |
+
flex-direction: column-reverse;
|
| 20 |
+
gap: 15px;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.fab-button {
|
| 24 |
+
width: 50px;
|
| 25 |
+
height: 50px;
|
| 26 |
+
border-radius: 50%;
|
| 27 |
+
background: white;
|
| 28 |
+
color: #333;
|
| 29 |
+
display: flex;
|
| 30 |
+
justify-content: center;
|
| 31 |
+
align-items: center;
|
| 32 |
+
cursor: pointer;
|
| 33 |
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
| 34 |
+
transition: all 0.2s ease;
|
| 35 |
+
position: relative;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.fab-button:hover {
|
| 39 |
+
transform: translateY(-3px);
|
| 40 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.fab-button .tooltip {
|
| 44 |
+
position: absolute;
|
| 45 |
+
right: 60px;
|
| 46 |
+
background: #333;
|
| 47 |
+
color: white;
|
| 48 |
+
padding: 5px 10px;
|
| 49 |
+
border-radius: 4px;
|
| 50 |
+
font-size: 12px;
|
| 51 |
+
white-space: nowrap;
|
| 52 |
+
opacity: 0;
|
| 53 |
+
pointer-events: none;
|
| 54 |
+
transition: opacity 0.2s;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.fab-button:hover .tooltip {
|
| 58 |
+
opacity: 1;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.fab-button.active {
|
| 62 |
+
background: #3b82f6;
|
| 63 |
+
color: white;
|
| 64 |
+
transform: scale(1.1);
|
| 65 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.fab-button.active i {
|
| 69 |
+
animation: bounce 0.5s;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
@keyframes bounce {
|
| 73 |
+
0%, 100% { transform: scale(1); }
|
| 74 |
+
50% { transform: scale(1.3); }
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
@keyframes pulse {
|
| 78 |
+
0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
|
| 79 |
+
70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
|
| 80 |
+
100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.pulse {
|
| 84 |
+
animation: pulse 1.5s infinite;
|
| 85 |
+
}
|
| 86 |
+
</style>
|
| 87 |
+
</head>
|
| 88 |
+
<body class="bg-gray-100 min-h-screen">
|
| 89 |
+
<div class="container mx-auto p-8">
|
| 90 |
+
<h1 class="text-3xl font-bold text-gray-800 mb-6">Machine Control Panel</h1>
|
| 91 |
+
<p class="text-gray-600 mb-8">This page demonstrates a floating action button with machine controls. Click the blue button at the bottom right to access the controls.</p>
|
| 92 |
+
|
| 93 |
+
<div class="bg-white p-6 rounded-lg shadow-md">
|
| 94 |
+
<h2 class="text-xl font-semibold mb-4">Machine Status</h2>
|
| 95 |
+
<div class="space-y-4">
|
| 96 |
+
<div class="flex items-center">
|
| 97 |
+
<div class="w-3 h-3 rounded-full bg-gray-400 mr-2" id="power-status-indicator"></div>
|
| 98 |
+
<span id="power-status-text">Machine is off</span>
|
| 99 |
+
</div>
|
| 100 |
+
<div class="flex items-center">
|
| 101 |
+
<div class="w-3 h-3 rounded-full bg-gray-400 mr-2" id="sleep-status-indicator"></div>
|
| 102 |
+
<span id="sleep-status-text">Sleep mode inactive</span>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
<div class="fab-container">
|
| 109 |
+
<div class="fab-buttons" id="fabButtons">
|
| 110 |
+
<div class="fab-button" id="documentBtn">
|
| 111 |
+
<i class="fas fa-file-alt"></i>
|
| 112 |
+
<span class="tooltip">Open Document</span>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="fab-button" id="sleepBtn">
|
| 115 |
+
<i class="fas fa-robot"></i>
|
| 116 |
+
<span class="tooltip">Sleep Mode</span>
|
| 117 |
+
</div>
|
| 118 |
+
<div class="fab-button" id="powerBtn">
|
| 119 |
+
<i class="fas fa-bolt"></i>
|
| 120 |
+
<span class="tooltip">Power Control</span>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<script>
|
| 126 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 127 |
+
const fabMain = document.getElementById('fabMain');
|
| 128 |
+
const fabButtons = document.getElementById('fabButtons');
|
| 129 |
+
const documentBtn = document.getElementById('documentBtn');
|
| 130 |
+
const sleepBtn = document.getElementById('sleepBtn');
|
| 131 |
+
const powerBtn = document.getElementById('powerBtn');
|
| 132 |
+
const sleepSwitch = document.getElementById('sleepSwitch');
|
| 133 |
+
const powerSwitch = document.getElementById('powerSwitch');
|
| 134 |
+
const powerStatusText = document.getElementById('power-status-text');
|
| 135 |
+
const sleepStatusText = document.getElementById('sleep-status-text');
|
| 136 |
+
const powerStatusIndicator = document.getElementById('power-status-indicator');
|
| 137 |
+
const sleepStatusIndicator = document.getElementById('sleep-status-indicator');
|
| 138 |
+
|
| 139 |
+
let isMenuOpen = false;
|
| 140 |
+
let isMachineOn = false;
|
| 141 |
+
let isSleepModeOn = false;
|
| 142 |
+
|
| 143 |
+
// Document button
|
| 144 |
+
documentBtn.addEventListener('click', function() {
|
| 145 |
+
alert('Opening machine documentation...');
|
| 146 |
+
// In a real app, this would open a document
|
| 147 |
+
closeMenu();
|
| 148 |
+
});
|
| 149 |
+
|
| 150 |
+
// Sleep mode button
|
| 151 |
+
sleepBtn.addEventListener('click', function() {
|
| 152 |
+
isSleepModeOn = !isSleepModeOn;
|
| 153 |
+
this.classList.toggle('active');
|
| 154 |
+
|
| 155 |
+
if (isSleepModeOn) {
|
| 156 |
+
sleepStatusText.textContent = 'Sleep mode active';
|
| 157 |
+
sleepStatusIndicator.className = 'w-3 h-3 rounded-full bg-yellow-500 mr-2';
|
| 158 |
+
this.querySelector('i').className = 'fas fa-bed';
|
| 159 |
+
} else {
|
| 160 |
+
sleepStatusText.textContent = 'Sleep mode inactive';
|
| 161 |
+
sleepStatusIndicator.className = 'w-3 h-3 rounded-full bg-gray-400 mr-2';
|
| 162 |
+
this.querySelector('i').className = 'fas fa-robot';
|
| 163 |
+
}
|
| 164 |
+
});
|
| 165 |
+
|
| 166 |
+
// Power button
|
| 167 |
+
powerBtn.addEventListener('click', function() {
|
| 168 |
+
isMachineOn = !isMachineOn;
|
| 169 |
+
this.classList.toggle('active');
|
| 170 |
+
|
| 171 |
+
if (isMachineOn) {
|
| 172 |
+
powerStatusText.textContent = 'Machine is running';
|
| 173 |
+
powerStatusIndicator.className = 'w-3 h-3 rounded-full bg-green-500 mr-2';
|
| 174 |
+
this.querySelector('i').className = 'fas fa-plug-circle-check';
|
| 175 |
+
|
| 176 |
+
// If machine was sleeping, wake it up
|
| 177 |
+
if (isSleepModeOn) {
|
| 178 |
+
isSleepModeOn = false;
|
| 179 |
+
sleepBtn.classList.remove('active');
|
| 180 |
+
sleepStatusText.textContent = 'Sleep mode inactive';
|
| 181 |
+
sleepStatusIndicator.className = 'w-3 h-3 rounded-full bg-gray-400 mr-2';
|
| 182 |
+
sleepBtn.querySelector('i').className = 'fas fa-robot';
|
| 183 |
+
}
|
| 184 |
+
} else {
|
| 185 |
+
powerStatusText.textContent = 'Machine is off';
|
| 186 |
+
powerStatusIndicator.className = 'w-3 h-3 rounded-full bg-gray-400 mr-2';
|
| 187 |
+
this.querySelector('i').className = 'fas fa-plug-circle-xmark';
|
| 188 |
+
}
|
| 189 |
+
});
|
| 190 |
+
|
| 191 |
+
function closeMenu() {
|
| 192 |
+
isMenuOpen = false;
|
| 193 |
+
fabButtons.classList.remove('show');
|
| 194 |
+
fabMain.innerHTML = '<i class="fas fa-cogs text-xl"></i>';
|
| 195 |
+
fabMain.style.background = 'linear-gradient(135deg, #3b82f6, #1d4ed8)';
|
| 196 |
+
fabMain.classList.add('pulse');
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
// Close menu when clicking outside
|
| 200 |
+
document.addEventListener('click', function(e) {
|
| 201 |
+
if (!fabMain.contains(e.target) && !fabButtons.contains(e.target)) {
|
| 202 |
+
if (isMenuOpen) {
|
| 203 |
+
closeMenu();
|
| 204 |
+
}
|
| 205 |
+
}
|
| 206 |
+
});
|
| 207 |
+
});
|
| 208 |
+
</script>
|
| 209 |
+
<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=MVCavalheiroJr/fab-test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 210 |
+
</html>
|