Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 deletions

View File

@@ -0,0 +1,378 @@
/* ============================================================
Fusion Clock - Floating Action Button (FAB)
Bottom-left corner clock widget with ripple animation
Theme-aware: adapts to Odoo light / dark mode
============================================================ */
// ---- Light-mode tokens (default) ----
:root {
--fclk-fab-panel-bg: #ffffff;
--fclk-fab-panel-border: #e5e7eb;
--fclk-fab-panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
--fclk-fab-text: #1f2937;
--fclk-fab-muted: #6b7280;
--fclk-fab-divider: #e5e7eb;
--fclk-fab-location-bg: rgba(16, 185, 129, 0.08);
--fclk-fab-error-bg: rgba(239, 68, 68, 0.06);
--fclk-fab-arrow-bg: #ffffff;
}
// ---- Dark-mode tokens ----
html.o_dark {
--fclk-fab-panel-bg: #1e2028;
--fclk-fab-panel-border: #3a3d48;
--fclk-fab-panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
--fclk-fab-text: #f1f1f4;
--fclk-fab-muted: #9ca3af;
--fclk-fab-divider: #3a3d48;
--fclk-fab-location-bg: rgba(16, 185, 129, 0.1);
--fclk-fab-error-bg: rgba(239, 68, 68, 0.1);
--fclk-fab-arrow-bg: #1e2028;
}
// Static color palette
$fclk-teal: #0d9488;
$fclk-blue: #3b82f6;
$fclk-green: #10B981;
$fclk-red: #ef4444;
// Gradient used on the FAB (teal-to-blue like the portal header)
$fclk-gradient: linear-gradient(135deg, $fclk-teal 0%, #2563eb 100%);
$fclk-gradient-active: linear-gradient(135deg, $fclk-green 0%, $fclk-teal 100%);
// ===========================================================
// Wrapper - anchored bottom-LEFT
// ===========================================================
.fclk-fab-wrapper {
position: fixed;
bottom: 24px;
left: 24px;
z-index: 1050;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 12px;
pointer-events: none;
> * { pointer-events: auto; }
}
// ===========================================================
// FAB Button
// ===========================================================
.fclk-fab-btn {
position: relative;
width: 54px;
height: 54px;
border-radius: 50%;
border: none;
background: $fclk-gradient;
color: #fff;
font-size: 21px;
cursor: pointer;
box-shadow: 0 4px 20px rgba($fclk-teal, 0.35);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
align-items: center;
justify-content: center;
outline: none;
overflow: visible;
&:hover {
transform: scale(1.1);
box-shadow: 0 6px 28px rgba($fclk-teal, 0.45);
}
&:active {
transform: scale(0.93);
}
// Clocked-in: green-teal gradient
&.fclk-fab-btn--active {
background: $fclk-gradient-active;
box-shadow: 0 4px 20px rgba($fclk-green, 0.4);
&:hover {
box-shadow: 0 6px 28px rgba($fclk-green, 0.5);
}
}
// Panel-open: muted
&.fclk-fab-btn--open {
background: #374151;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
color: #d1d5db;
}
.fclk-fab-icon {
position: relative;
z-index: 2;
transition: transform 0.3s ease;
line-height: 1;
}
&.fclk-fab-btn--open .fclk-fab-icon {
transform: rotate(90deg);
}
}
// ---- Ripple rings radiating outward from the FAB ----
.fclk-fab-ripple-ring {
position: absolute;
top: 50%;
left: 50%;
width: 54px;
height: 54px;
border-radius: 50%;
border: 2px solid rgba($fclk-green, 0.5);
transform: translate(-50%, -50%) scale(1);
pointer-events: none;
z-index: 1;
&.fclk-fab-ripple-ring--1 {
animation: fclk-ripple-out 2.4s ease-out infinite;
}
&.fclk-fab-ripple-ring--2 {
animation: fclk-ripple-out 2.4s ease-out 0.8s infinite;
}
&.fclk-fab-ripple-ring--3 {
animation: fclk-ripple-out 2.4s ease-out 1.6s infinite;
}
}
@keyframes fclk-ripple-out {
0% {
transform: translate(-50%, -50%) scale(1);
opacity: 0.55;
}
100% {
transform: translate(-50%, -50%) scale(2.6);
opacity: 0;
}
}
// ---- Mini timer badge ----
.fclk-fab-badge {
position: absolute;
top: -8px;
left: 50%;
transform: translateX(-50%);
background: #111827;
color: $fclk-green;
font-size: 9px;
font-weight: 700;
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
padding: 2px 7px;
border-radius: 10px;
white-space: nowrap;
letter-spacing: 0.5px;
border: 1px solid rgba($fclk-green, 0.35);
pointer-events: none;
z-index: 3;
animation: fclk-badge-in 0.3s ease;
}
@keyframes fclk-badge-in {
from { opacity: 0; transform: translateX(-50%) translateY(4px); }
to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
// ===========================================================
// Expanded Panel
// ===========================================================
.fclk-fab-panel {
width: 280px;
background: var(--fclk-fab-panel-bg);
border: 1px solid var(--fclk-fab-panel-border);
border-radius: 16px;
padding: 18px;
box-shadow: var(--fclk-fab-panel-shadow);
animation: fclk-panel-slide-up 0.25s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
}
@keyframes fclk-panel-slide-up {
from { opacity: 0; transform: translateY(12px) scale(0.96); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
// Arrow pointing down toward the FAB
.fclk-fab-panel-arrow {
position: absolute;
bottom: -6px;
left: 22px;
width: 12px;
height: 12px;
background: var(--fclk-fab-arrow-bg);
border-right: 1px solid var(--fclk-fab-panel-border);
border-bottom: 1px solid var(--fclk-fab-panel-border);
transform: rotate(45deg);
}
// ---- Header row ----
.fclk-fab-panel-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 14px;
}
.fclk-fab-panel-title {
display: flex;
align-items: center;
gap: 8px;
color: var(--fclk-fab-text);
font-size: 13px;
font-weight: 600;
letter-spacing: 0.3px;
}
.fclk-fab-status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #9ca3af;
flex-shrink: 0;
&.active {
background: $fclk-green;
box-shadow: 0 0 6px rgba($fclk-green, 0.5);
}
}
.fclk-fab-open-link {
color: var(--fclk-fab-muted);
font-size: 13px;
text-decoration: none;
transition: color 0.2s;
&:hover { color: $fclk-blue; }
}
// ---- Location chip ----
.fclk-fab-location {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: $fclk-green;
background: var(--fclk-fab-location-bg);
border-radius: 8px;
padding: 6px 10px;
margin-bottom: 12px;
.fa { font-size: 12px; }
}
// ---- Timer ----
.fclk-fab-timer {
text-align: center;
color: var(--fclk-fab-text);
font-size: 28px;
font-weight: 300;
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
letter-spacing: 2px;
font-variant-numeric: tabular-nums;
margin-bottom: 14px;
line-height: 1;
}
// ---- Stats row ----
.fclk-fab-stats {
display: flex;
align-items: center;
justify-content: center;
gap: 16px;
margin-bottom: 14px;
}
.fclk-fab-stat {
text-align: center;
.fclk-fab-stat-val {
display: block;
color: var(--fclk-fab-text);
font-size: 16px;
font-weight: 700;
}
.fclk-fab-stat-lbl {
display: block;
color: var(--fclk-fab-muted);
font-size: 9px;
text-transform: uppercase;
letter-spacing: 0.6px;
margin-top: 2px;
}
}
.fclk-fab-stat-divider {
width: 1px;
height: 28px;
background: var(--fclk-fab-divider);
}
// ---- Action button ----
.fclk-fab-action {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
width: 100%;
border: none;
border-radius: 12px;
padding: 11px 0;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
letter-spacing: 0.3px;
.fa { font-size: 15px; }
&.fclk-fab-action--in {
background: $fclk-gradient;
color: #fff;
&:hover:not(:disabled) {
box-shadow: 0 4px 16px rgba($fclk-teal, 0.4);
}
}
&.fclk-fab-action--out {
background: $fclk-red;
color: #fff;
&:hover:not(:disabled) {
box-shadow: 0 4px 16px rgba($fclk-red, 0.35);
}
}
&:disabled {
opacity: 0.55;
cursor: not-allowed;
}
}
// ---- Error ----
.fclk-fab-error {
display: flex;
align-items: flex-start;
gap: 6px;
color: $fclk-red;
font-size: 11px;
background: var(--fclk-fab-error-bg);
border-radius: 8px;
padding: 8px 10px;
margin-top: 10px;
animation: fclk-shake 0.35s ease;
line-height: 1.4;
.fa { font-size: 12px; margin-top: 1px; flex-shrink: 0; }
}
@keyframes fclk-shake {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-4px); }
75% { transform: translateX(4px); }
}