Spaces:
Running
Running
this version function is excatly what i want but now i just want the design to change so make it more compact
Browse filesFiles changed (2)
- calculator2.html+115-79
- index.html+171-141
23 unmodified lines242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541 unmodified line15615715815916016123 unmodified lines</script><style>.shift-card {transition: all 0.3s ease;}.shift-card:hover {transform: translateY(-2px);box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);}.time-input {background-color: rgba(255, 255, 255, 0.9);border: 1px solid #E5E7EB;}</style></head><body class="bg-gradient-to-br from-blue-50 to-green-50 min-h-screen"><div class="container mx-auto px-4 py-4 max-w-5xl"><!-- Header --><header class="mb-4 text-center"><div class="flex items-center justify-center gap-4"><img src="https://huggingface.co/spaces/BabloOG/TamroMatematik/resolve/main/images/gorilla.png" alt="Logo" class="w-16 h-16 object-contain"><h1 class="text-4xl font-bold text-dark mb-2 hovered-element">Tamro <span class="text-primary hovered-element">OSR</span></h1></div><div class="mt-4 flex justify-center items-center space-x-4"><div class="px-4 py-2 bg-primary text-white rounded-lg shadow animate-pulse"><span id="current-time" class="font-mono"></span><span class="ml-2">CET (Sweden)</span></div><div class="px-4 py-2 bg-secondary text-white rounded-lg shadow"><span id="current-date" class="font-mono"></span></div></div><button onclick="saveCalculatorState(); window.location.href='index.html'" class="mt-4 bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded-lg transition hovered-element"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-repeat inline mr-2 hovered-element"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg> Byt till Slinga 2</button></header><!-- Rest of the calculator content (same as index.html) --><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><!-- Shift Selection --><div class="bg-white p-4 rounded-xl shadow-lg"><h2 class="text-2xl font-semibold text-dark mb-4">Available Shifts</h2><div id="shift-container" class="grid grid-cols-1 gap-4"><!-- Shifts will be dynamically inserted here --></div></div><!-- Shift Details --><div class="bg-white p-4 rounded-xl shadow-lg"><h2 class="text-2xl font-semibold text-dark mb-4">Shift Details</h2><div id="shift-details" class="mb-4 space-y-2"><div class="space-y-2"><label class="block text-gray-700">Start Time</label><input type="time" id="start-time" class="time-input w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent"></div><div class="space-y-2"><label class="block text-gray-700">End Time</label><input type="time" id="end-time" class="time-input w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent"></div><div id="break-times" class="space-y-2"><div id="break-input-container"><!-- Break times will be dynamically inserted here --></div><button id="add-break-btn" class="mt-2 bg-gray-100 hover:bg-gray-200 text-gray-700 py-1 px-3 rounded-lg transition flex items-center"><i data-feather="plus" class="w-4 h-4 mr-1"></i> Add Break</button></div><div class="mb-4"><h3 class="text-lg font-medium text-dark mb-2">Adjust Time</h3><div class="grid grid-cols-4 gap-2"><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-5">-5 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-15">-15 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-30">-30 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-60">-60 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="5">+5 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="15">+15 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="30">+30 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="60">+60 min</button></div></div><div class="mb-6"><h3 class="text-lg font-medium text-dark mb-2">Employees for <span id="selected-shift-name" class="text-primary">No Shift Selected</span></h3><div class="flex items-center space-x-4"><button id="decrease-employees" class="bg-red-100 hover:bg-red-200 text-red-700 p-2 rounded-full transition"><i data-feather="minus"></i></button><span id="employee-count" class="text-2xl font-bold">0</span><button id="increase-employees" class="bg-green-100 hover:bg-green-200 text-green-700 p-2 rounded-full transition"><i data-feather="plus"></i></button></div></div><div class="bg-blue-50 p-3 rounded-lg"><h3 class="text-lg font-medium text-dark mb-2">Shift Hours</h3><div class="flex justify-between items-center"><span class="text-gray-600">Selected Shift:</span><span id="hours-per-employee" class="text-2xl font-bold text-primary">0h 0m</span></div><div class="flex justify-between items-center mt-2"><span class="text-gray-600">All Shifts Total:</span><span id="total-hours-all" class="text-2xl font-bold text-secondary">0h 0m</span></div><div class="flex justify-between items-center mt-2"><span class="text-gray-600">Remaining Today:</span><span id="remaining-today" class="text-2xl font-bold text-blue-700">0h 0m</span></div></div><div class="bg-purple-50 p-3 rounded-lg mt-3"><h3 class="text-lg font-medium text-dark mb-2">Hourly Rate Calculator</h3><div class="flex items-center space-x-2 mb-2"><span class="text-gray-600">Total Amount:</span><input type="number" id="total-amount" class="time-input w-24 px-3 py-1 border rounded-lg" placeholder="rader"></div><div class="flex space-x-2 mb-2"><button id="calculate-rate-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-700 py-2 px-4 rounded-lg transition flex-1">Total Hours Rate</button><button id="calculate-remaining-rate-btn" class="bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-2 px-4 rounded-lg transition flex-1">Remaining Rate</button></div><div class="mt-2 flex justify-between items-center"><span class="text-gray-600">Hourly Rate:</span><span id="hourly-rate" class="text-xl font-bold text-purple-700">0 rader/hour</span></div></div></div>1 unmodified line</div><script>// Shifts dataconst slinga2Shifts = [{ name: "06:00-08:30 (morgon turer)", start: "06:00", end: "08:30", breaks: [] },23 unmodified lines242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881 unmodified line19019119219319419519619723 unmodified lines</script><style>.shift-card {transition: all 0.2s ease;padding: 0.75rem;margin-bottom: 0.5rem;}.shift-card:hover {transform: none;box-shadow: 0 1px 3px rgba(0,0,0,0.1);}.time-input {background-color: rgba(255, 255, 255, 0.9);border: 1px solid #E5E7EB;padding: 0.5rem;font-size: 0.875rem;}.calculator-section {padding: 1rem;}.container {max-width: 1200px;padding: 1rem;}.header {margin-bottom: 1rem;}.time-display {padding: 0.5rem;font-size: 0.875rem;}.break-time-input {font-size: 0.875rem;padding: 0.25rem;}.employee-count {font-size: 1.25rem;}.hours-display {font-size: 1rem;padding: 0.5rem;}.time-adjust-btn {padding: 0.25rem 0.5rem;font-size: 0.75rem;}</style></head><body class="bg-gray-50 min-h-screen"><div class="container mx-auto px-2 py-2"><!-- Header --><header class="header text-center"><div class="flex items-center justify-center gap-2"><img src="https://huggingface.co/spaces/BabloOG/TamroMatematik/resolve/main/images/gorilla.png" alt="Logo" class="w-12 h-12 object-contain"><h1 class="text-2xl font-bold text-dark">Tamro <span class="text-primary">OSR</span></h1></div><div class="mt-2 flex justify-center items-center space-x-2"><div class="px-2 py-1 bg-primary text-white rounded shadow animate-pulse time-display"><span id="current-time" class="font-mono text-sm"></span><span class="ml-1 text-xs">CET</span></div><div class="px-2 py-1 bg-secondary text-white rounded shadow time-display"><span id="current-date" class="font-mono text-sm"></span></div></div><button onclick="saveCalculatorState(); window.location.href='index.html'" class="mt-2 bg-yellow-500 hover:bg-yellow-600 text-white text-sm py-1 px-2 rounded transition"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-repeat inline mr-1"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg> Slinga 2</button></header><div class="grid grid-cols-1 md:grid-cols-2 gap-2"><!-- Shift Selection --><div class="bg-white p-2 rounded shadow"><h2 class="text-lg font-semibold text-dark mb-2">Shifts</h2><div id="shift-container" class="grid grid-cols-1 gap-1"><!-- Shifts will be dynamically inserted here --></div></div><!-- Shift Details --><div class="bg-white p-2 rounded shadow"><h2 class="text-lg font-semibold text-dark mb-2">Details</h2><div id="shift-details" class="mb-2 space-y-1"><div class="space-y-1"><label class="block text-sm text-gray-700">Start</label><input type="time" id="start-time" class="time-input w-full border rounded focus:ring-1 focus:ring-primary"></div><div class="space-y-1"><label class="block text-sm text-gray-700">End</label><input type="time" id="end-time" class="time-input w-full border rounded focus:ring-1 focus:ring-primary"></div><div id="break-times" class="space-y-1"><div id="break-input-container"></div><button id="add-break-btn" class="bg-gray-100 hover:bg-gray-200 text-gray-700 py-0.5 px-2 rounded text-sm flex items-center"><i data-feather="plus" class="w-3 h-3 mr-1"></i> Add Break</button></div></div><div class="mb-2"><h3 class="text-sm font-medium text-dark mb-1">Adjust Time</h3><div class="grid grid-cols-4 gap-1"><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-5">-5m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-15">-15m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-30">-30m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-60">-60m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="5">+5m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="15">+15m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="30">+30m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="60">+60m</button></div></div><div class="mb-2"><h3 class="text-sm font-medium text-dark mb-1">Employees</h3><div class="flex items-center space-x-2"><button id="decrease-employees" class="bg-red-100 hover:bg-red-200 text-red-700 p-1 rounded-full transition"><i data-feather="minus" class="w-3 h-3"></i></button><span id="employee-count" class="text-lg font-bold employee-count">0</span><button id="increase-employees" class="bg-green-100 hover:bg-green-200 text-green-700 p-1 rounded-full transition"><i data-feather="plus" class="w-3 h-3"></i></button></div></div><div class="bg-blue-50 p-2 rounded mb-2"><h3 class="text-sm font-medium text-dark mb-1">Hours</h3><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Shift:</span><span id="hours-per-employee" class="font-bold text-primary hours-display">0h 0m</span></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Total:</span><span id="total-hours-all" class="font-bold text-secondary hours-display">0h 0m</span></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Remaining:</span><span id="remaining-today" class="font-bold text-blue-700 hours-display">0h 0m</span></div></div><div class="bg-purple-50 p-2 rounded"><h3 class="text-sm font-medium text-dark mb-1">Rate</h3><div class="flex items-center space-x-1 mb-1"><span class="text-xs text-gray-600">Amount:</span><input type="number" id="total-amount" class="time-input w-20 px-1 py-0.5 border rounded text-sm" placeholder="rader"></div><div class="flex space-x-1 mb-1"><button id="calculate-rate-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-700 py-1 px-2 rounded text-xs flex-1">Hours Rate</button><button id="calculate-remaining-rate-btn" class="bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-1 px-2 rounded text-xs flex-1">Remaining</button></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Rate:</span><span id="hourly-rate" class="text-sm font-bold text-purple-700">0 rader/h</span></div></div></div>1 unmodified line</div><script>feather.replace();// Shifts dataconst slinga2Shifts = [{ name: "06:00-08:30 (morgon turer)", start: "06:00", end: "08:30", breaks: [] },
23 unmodified lines242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631 unmodified line1651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612 unmodified lines264265266267268269397 unmodified lines66766866967067167267323 unmodified lines</script><style>.shift-card {transition: all 0.3s ease;}.shift-card:hover {transform: translateY(-2px);box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);}.time-input {background-color: rgba(255, 255, 255, 0.9);border: 1px solid #E5E7EB;}</style></head><body class="bg-gradient-to-br from-blue-50 to-green-50 min-h-screen"><div class="container mx-auto px-4 py-4 max-w-5xl"><!-- Header --><header class="mb-4 text-center"><div class="flex items-center justify-center gap-4"><img src="https://huggingface.co/spaces/BabloOG/TamroMatematik/resolve/main/images/gorilla.png" alt="Logo" class="w-16 h-16 object-contain"><h1 class="text-4xl font-bold text-dark mb-2">Tamro <span class="text-primary">Shift Calculator</span></h1></div><div class="mt-4 flex justify-center items-center space-x-4"><div class="px-4 py-2 bg-primary text-white rounded-lg shadow animate-pulse"><span id="current-time" class="font-mono"></span><span class="ml-2">CET (Sweden)</span></div><div class="px-4 py-2 bg-secondary text-white rounded-lg shadow"><span id="current-date" class="font-mono"></span></div></div></header><!-- Toggle Button --><div class="flex justify-center mb-6"><button id="toggle-calculator" class="bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-3 px-6 rounded-lg transition flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-repeat mr-2"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg><span id="toggle-text">Switch to OSR</span></button></div><!-- Calculator Sections --><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><!-- Slinga 2 Calculator --><div id="slinga2-calculator" class="calculator-section"><div class="bg-white p-4 rounded-xl shadow-lg mb-4"><h2 class="text-2xl font-semibold text-dark mb-4 text-center">Slinga 2</h2><div id="slinga2-shift-container" class="grid grid-cols-1 gap-4 mb-6"><!-- Slinga 2 shifts will be dynamically inserted here --></div></div><div class="bg-white p-4 rounded-xl shadow-lg"><h2 class="text-2xl font-semibold text-dark mb-4">Shift Details</h2><div class="mb-4 space-y-2"><div class="space-y-2"><label class="block text-gray-700">Start Time</label><input type="time" id="slinga2-start-time" class="time-input w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent"></div><div class="space-y-2"><label class="block text-gray-700">End Time</label><input type="time" id="slinga2-end-time" class="time-input w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent"></div><div class="space-y-2"><div id="slinga2-break-input-container"><!-- Slinga 2 break times will be dynamically inserted here --></div><button id="slinga2-add-break-btn" class="mt-2 bg-gray-100 hover:bg-gray-200 text-gray-700 py-1 px-3 rounded-lg transition flex items-center"><i data-feather="plus" class="w-4 h-4 mr-1"></i> Add Break</button></div></div><div class="mb-4"><h3 class="text-lg font-medium text-dark mb-2">Adjust Time</h3><div class="grid grid-cols-4 gap-2"><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-5">-5 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-15">-15 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-30">-30 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-60">-60 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="5">+5 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="15">+15 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="30">+30 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="60">+60 min</button></div></div><div class="mb-6"><h3 class="text-lg font-medium text-dark mb-2">Employees for <span id="slinga2-selected-shift-name" class="text-primary">No Shift Selected</span></h3><div class="flex items-center space-x-4"><button id="slinga2-decrease-employees" class="bg-red-100 hover:bg-red-200 text-red-700 p-2 rounded-full transition"><i data-feather="minus"></i></button><span id="slinga2-employee-count" class="text-2xl font-bold">0</span><button id="slinga2-increase-employees" class="bg-green-100 hover:bg-green-200 text-green-700 p-2 rounded-full transition"><i data-feather="plus"></i></button></div></div><div class="bg-blue-50 p-3 rounded-lg mb-3"><h3 class="text-lg font-medium text-dark mb-2">Shift Hours</h3><div class="flex justify-between items-center"><span class="text-gray-600">Selected Shift:</span><span id="slinga2-hours-per-employee" class="text-2xl font-bold text-primary">0h 0m</span></div><div class="flex justify-between items-center mt-2"><span class="text-gray-600">All Shifts Total:</span><span id="slinga2-total-hours-all" class="text-2xl font-bold text-secondary">0h 0m</span></div><div class="flex justify-between items-center mt-2"><span class="text-gray-600">Remaining Today:</span><span id="slinga2-remaining-today" class="text-2xl font-bold text-blue-700">0h 0m</span></div></div><div class="bg-purple-50 p-3 rounded-lg"><h3 class="text-lg font-medium text-dark mb-2">Hourly Rate Calculator</h3><div class="flex items-center space-x-2 mb-2"><span class="text-gray-600">Total Amount:</span><input type="number" id="slinga2-total-amount" class="time-input w-24 px-3 py-1 border rounded-lg" placeholder="rader"></div><div class="flex space-x-2 mb-2"><button id="slinga2-calculate-rate-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-700 py-2 px-4 rounded-lg transition flex-1">Total Hours Rate</button><button id="slinga2-calculate-remaining-rate-btn" class="bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-2 px-4 rounded-lg transition flex-1">Remaining Rate</button></div><div class="mt-2 flex justify-between items-center"><span class="text-gray-600">Hourly Rate:</span><span id="slinga2-hourly-rate" class="text-xl font-bold text-purple-700">0 rader/hour</span></div></div></div>1 unmodified line<!-- OSR Calculator --><div id="osr-calculator" class="calculator-section hidden"><div class="bg-white p-6 rounded-xl shadow-lg mb-6"><h2 class="text-2xl font-semibold text-dark mb-4 text-center">OSR</h2><div id="osr-shift-container" class="grid grid-cols-1 gap-4 mb-6"><!-- OSR shifts will be dynamically inserted here --></div></div><div class="bg-white p-6 rounded-xl shadow-lg"><h2 class="text-2xl font-semibold text-dark mb-4">Shift Details</h2><div class="mb-6 space-y-4"><div class="space-y-2"><label class="block text-gray-700">Start Time</label><input type="time" id="osr-start-time" class="time-input w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent"></div><div class="space-y-2"><label class="block text-gray-700">End Time</label><input type="time" id="osr-end-time" class="time-input w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent"></div><div class="space-y-2"><div id="osr-break-input-container"><!-- OSR break times will be dynamically inserted here --></div><button id="osr-add-break-btn" class="mt-2 bg-gray-100 hover:bg-gray-200 text-gray-700 py-1 px-3 rounded-lg transition flex items-center"><i data-feather="plus" class="w-4 h-4 mr-1"></i> Add Break</button></div></div><div class="mb-6"><h3 class="text-lg font-medium text-dark mb-2">Adjust Time</h3><div class="grid grid-cols-4 gap-2"><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-5">-5 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-15">-15 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-30">-30 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="-60">-60 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="5">+5 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="15">+15 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="30">+30 min</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 py-2 px-3 rounded-lg transition" data-minutes="60">+60 min</button></div></div><div class="mb-6"><h3 class="text-lg font-medium text-dark mb-2">Employees for <span id="osr-selected-shift-name" class="text-primary">No Shift Selected</span></h3><div class="flex items-center space-x-4"><button id="osr-decrease-employees" class="bg-red-100 hover:bg-red-200 text-red-700 p-2 rounded-full transition"><i data-feather="minus"></i></button><span id="osr-employee-count" class="text-2xl font-bold">0</span><button id="osr-increase-employees" class="bg-green-100 hover:bg-green-200 text-green-700 p-2 rounded-full transition"><i data-feather="plus"></i></button></div></div><div class="bg-blue-50 p-4 rounded-lg mb-4"><h3 class="text-lg font-medium text-dark mb-2">Shift Hours</h3><div class="flex justify-between items-center"><span class="text-gray-600">Selected Shift:</span><span id="osr-hours-per-employee" class="text-2xl font-bold text-primary">0h 0m</span></div><div class="flex justify-between items-center mt-2"><span class="text-gray-600">All Shifts Total:</span><span id="osr-total-hours-all" class="text-2xl font-bold text-secondary">0h 0m</span></div><div class="flex justify-between items-center mt-2"><span class="text-gray-600">Remaining Today:</span><span id="osr-remaining-today" class="text-2xl font-bold text-blue-700">0h 0m</span></div></div><div class="bg-purple-50 p-4 rounded-lg"><h3 class="text-lg font-medium text-dark mb-2">Hourly Rate Calculator</h3><div class="flex items-center space-x-2 mb-2"><span class="text-gray-600">Total Amount:</span><input type="number" id="osr-total-amount" class="time-input w-24 px-3 py-1 border rounded-lg" placeholder="rader"></div><div class="flex space-x-2 mb-2"><button id="osr-calculate-rate-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-700 py-2 px-4 rounded-lg transition flex-1">Total Hours Rate</button><button id="osr-calculate-remaining-rate-btn" class="bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-2 px-4 rounded-lg transition flex-1">Remaining Rate</button></div><div class="mt-2 flex justify-between items-center"><span class="text-gray-600">Hourly Rate:</span><span id="osr-hourly-rate" class="text-xl font-bold text-purple-700">0 rader/hour</span></div></div></div>2 unmodified lines</div><script>// Shifts dataconst slinga2Shifts = [{ name: "06:00-08:30 (morgon turer)", start: "06:00", end: "08:30", breaks: [] },397 unmodified linessetInterval(updateRemainingTodayDisplay, 60000);}feather.replace();</script></body></html>23 unmodified lines242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941 unmodified line1961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902 unmodified lines293294295296297298299300397 unmodified lines69869970070170270323 unmodified lines</script><style>.shift-card {transition: all 0.2s ease;padding: 0.75rem;margin-bottom: 0.5rem;}.shift-card:hover {transform: none;box-shadow: 0 1px 3px rgba(0,0,0,0.1);}.time-input {background-color: rgba(255, 255, 255, 0.9);border: 1px solid #E5E7EB;padding: 0.5rem;font-size: 0.875rem;}.calculator-section {padding: 1rem;}.container {max-width: 1200px;padding: 1rem;}.header {margin-bottom: 1rem;}.time-display {padding: 0.5rem;font-size: 0.875rem;}.break-time-input {font-size: 0.875rem;padding: 0.25rem;}.employee-count {font-size: 1.25rem;}.hours-display {font-size: 1rem;padding: 0.5rem;}.time-adjust-btn {padding: 0.25rem 0.5rem;font-size: 0.75rem;}</style></head><body class="bg-gray-50 min-h-screen"><div class="container mx-auto px-2 py-2"><!-- Header --><header class="header text-center"><div class="flex items-center justify-center gap-2"><img src="https://huggingface.co/spaces/BabloOG/TamroMatematik/resolve/main/images/gorilla.png" alt="Logo" class="w-12 h-12 object-contain"><h1 class="text-2xl font-bold text-dark">Tamro <span class="text-primary">Shift Calc</span></h1></div><div class="mt-2 flex justify-center items-center space-x-2"><div class="px-2 py-1 bg-primary text-white rounded shadow animate-pulse time-display"><span id="current-time" class="font-mono text-sm"></span><span class="ml-1 text-xs">CET</span></div><div class="px-2 py-1 bg-secondary text-white rounded shadow time-display"><span id="current-date" class="font-mono text-sm"></span></div></div></header><!-- Toggle Button --><div class="flex justify-center mb-2"><button id="toggle-calculator" class="bg-yellow-500 hover:bg-yellow-600 text-white text-sm py-1 px-3 rounded flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-repeat mr-1"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg><span id="toggle-text">Switch to OSR</span></button></div><!-- Calculator Sections --><div class="grid grid-cols-1 md:grid-cols-2 gap-2"><!-- Slinga 2 Calculator --><div id="slinga2-calculator" class="calculator-section"><div class="bg-white p-2 rounded shadow mb-2"><h2 class="text-lg font-semibold text-dark mb-2 text-center">Slinga 2</h2><div id="slinga2-shift-container" class="grid grid-cols-1 gap-1 mb-2"><!-- Slinga 2 shifts will be dynamically inserted here --></div></div><div class="bg-white p-2 rounded shadow"><h2 class="text-lg font-semibold text-dark mb-2">Shift Details</h2><div class="mb-2 space-y-1"><div class="space-y-1"><label class="block text-sm text-gray-700">Start</label><input type="time" id="slinga2-start-time" class="time-input w-full border rounded focus:ring-1 focus:ring-primary"></div><div class="space-y-1"><label class="block text-sm text-gray-700">End</label><input type="time" id="slinga2-end-time" class="time-input w-full border rounded focus:ring-1 focus:ring-primary"></div><div class="space-y-1"><div id="slinga2-break-input-container" class="space-y-1"></div><button id="slinga2-add-break-btn" class="bg-gray-100 hover:bg-gray-200 text-gray-700 py-0.5 px-2 rounded text-sm flex items-center"><i data-feather="plus" class="w-3 h-3 mr-1"></i> Add Break</button></div></div><div class="mb-2"><h3 class="text-sm font-medium text-dark mb-1">Adjust Time</h3><div class="grid grid-cols-4 gap-1"><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-5">-5m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-15">-15m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-30">-30m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-60">-60m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="5">+5m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="15">+15m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="30">+30m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="60">+60m</button></div></div><div class="mb-2"><h3 class="text-sm font-medium text-dark mb-1">Employees</h3><div class="flex items-center space-x-2"><button id="slinga2-decrease-employees" class="bg-red-100 hover:bg-red-200 text-red-700 p-1 rounded-full transition"><i data-feather="minus" class="w-3 h-3"></i></button><span id="slinga2-employee-count" class="text-lg font-bold employee-count">0</span><button id="slinga2-increase-employees" class="bg-green-100 hover:bg-green-200 text-green-700 p-1 rounded-full transition"><i data-feather="plus" class="w-3 h-3"></i></button></div></div><div class="bg-blue-50 p-2 rounded mb-2"><h3 class="text-sm font-medium text-dark mb-1">Hours</h3><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Shift:</span><span id="slinga2-hours-per-employee" class="font-bold text-primary hours-display">0h 0m</span></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Total:</span><span id="slinga2-total-hours-all" class="font-bold text-secondary hours-display">0h 0m</span></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Remaining:</span><span id="slinga2-remaining-today" class="font-bold text-blue-700 hours-display">0h 0m</span></div></div><div class="bg-purple-50 p-2 rounded"><h3 class="text-sm font-medium text-dark mb-1">Rate</h3><div class="flex items-center space-x-1 mb-1"><span class="text-xs text-gray-600">Amount:</span><input type="number" id="slinga2-total-amount" class="time-input w-20 px-1 py-0.5 border rounded text-sm" placeholder="rader"></div><div class="flex space-x-1 mb-1"><button id="slinga2-calculate-rate-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-700 py-1 px-2 rounded text-xs flex-1">Hours Rate</button><button id="slinga2-calculate-remaining-rate-btn" class="bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-1 px-2 rounded text-xs flex-1">Remaining</button></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Rate:</span><span id="slinga2-hourly-rate" class="text-sm font-bold text-purple-700">0 rader/h</span></div></div></div>1 unmodified line<!-- OSR Calculator --><div id="osr-calculator" class="calculator-section hidden"><div class="bg-white p-2 rounded shadow mb-2"><h2 class="text-lg font-semibold text-dark mb-2 text-center">OSR</h2><div id="osr-shift-container" class="grid grid-cols-1 gap-1 mb-2"><!-- OSR shifts will be dynamically inserted here --></div></div><div class="bg-white p-2 rounded shadow"><h2 class="text-lg font-semibold text-dark mb-2">Shift Details</h2><div class="mb-2 space-y-1"><div class="space-y-1"><label class="block text-sm text-gray-700">Start</label><input type="time" id="osr-start-time" class="time-input w-full border rounded focus:ring-1 focus:ring-primary"></div><div class="space-y-1"><label class="block text-sm text-gray-700">End</label><input type="time" id="osr-end-time" class="time-input w-full border rounded focus:ring-1 focus:ring-primary"></div><div class="space-y-1"><div id="osr-break-input-container" class="space-y-1"></div><button id="osr-add-break-btn" class="bg-gray-100 hover:bg-gray-200 text-gray-700 py-0.5 px-2 rounded text-sm flex items-center"><i data-feather="plus" class="w-3 h-3 mr-1"></i> Add Break</button></div></div><div class="mb-2"><h3 class="text-sm font-medium text-dark mb-1">Adjust Time</h3><div class="grid grid-cols-4 gap-1"><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-5">-5m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-15">-15m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-30">-30m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="-60">-60m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="5">+5m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="15">+15m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="30">+30m</button><button class="time-adjust-btn bg-gray-100 hover:bg-gray-200 rounded text-xs" data-minutes="60">+60m</button></div></div><div class="mb-2"><h3 class="text-sm font-medium text-dark mb-1">Employees</h3><div class="flex items-center space-x-2"><button id="osr-decrease-employees" class="bg-red-100 hover:bg-red-200 text-red-700 p-1 rounded-full transition"><i data-feather="minus" class="w-3 h-3"></i></button><span id="osr-employee-count" class="text-lg font-bold employee-count">0</span><button id="osr-increase-employees" class="bg-green-100 hover:bg-green-200 text-green-700 p-1 rounded-full transition"><i data-feather="plus" class="w-3 h-3"></i></button></div></div><div class="bg-blue-50 p-2 rounded mb-2"><h3 class="text-sm font-medium text-dark mb-1">Hours</h3><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Shift:</span><span id="osr-hours-per-employee" class="font-bold text-primary hours-display">0h 0m</span></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Total:</span><span id="osr-total-hours-all" class="font-bold text-secondary hours-display">0h 0m</span></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Remaining:</span><span id="osr-remaining-today" class="font-bold text-blue-700 hours-display">0h 0m</span></div></div><div class="bg-purple-50 p-2 rounded"><h3 class="text-sm font-medium text-dark mb-1">Rate</h3><div class="flex items-center space-x-1 mb-1"><span class="text-xs text-gray-600">Amount:</span><input type="number" id="osr-total-amount" class="time-input w-20 px-1 py-0.5 border rounded text-sm" placeholder="rader"></div><div class="flex space-x-1 mb-1"><button id="osr-calculate-rate-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-700 py-1 px-2 rounded text-xs flex-1">Hours Rate</button><button id="osr-calculate-remaining-rate-btn" class="bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-1 px-2 rounded text-xs flex-1">Remaining</button></div><div class="flex justify-between items-center"><span class="text-xs text-gray-600">Rate:</span><span id="osr-hourly-rate" class="text-sm font-bold text-purple-700">0 rader/h</span></div></div></div>2 unmodified lines</div><script>feather.replace();// Shifts dataconst slinga2Shifts = [{ name: "06:00-08:30 (morgon turer)", start: "06:00", end: "08:30", breaks: [] },397 unmodified linessetInterval(updateRemainingTodayDisplay, 60000);}</script></body></html>
calculator2.html+115-79
index.html+171-141