diff --git a/contributions/Namokar05/README.md b/contributions/Namokar05/Cyber Flip Surge Button/README.md similarity index 100% rename from contributions/Namokar05/README.md rename to contributions/Namokar05/Cyber Flip Surge Button/README.md diff --git a/contributions/Namokar05/button.css b/contributions/Namokar05/Cyber Flip Surge Button/button.css similarity index 100% rename from contributions/Namokar05/button.css rename to contributions/Namokar05/Cyber Flip Surge Button/button.css diff --git a/contributions/Namokar05/button.html b/contributions/Namokar05/Cyber Flip Surge Button/button.html similarity index 100% rename from contributions/Namokar05/button.html rename to contributions/Namokar05/Cyber Flip Surge Button/button.html diff --git a/contributions/Namokar05/button.js b/contributions/Namokar05/Cyber Flip Surge Button/button.js similarity index 100% rename from contributions/Namokar05/button.js rename to contributions/Namokar05/Cyber Flip Surge Button/button.js diff --git a/contributions/Namokar05/index.js b/contributions/Namokar05/Cyber Flip Surge Button/index.js similarity index 100% rename from contributions/Namokar05/index.js rename to contributions/Namokar05/Cyber Flip Surge Button/index.js diff --git a/contributions/Namokar05/Liquid Flux Button/index.html b/contributions/Namokar05/Liquid Flux Button/index.html new file mode 100644 index 0000000..e8bea50 --- /dev/null +++ b/contributions/Namokar05/Liquid Flux Button/index.html @@ -0,0 +1,21 @@ + + + + + + Magnetic Liquid Button + + + + + + + + + diff --git a/contributions/Namokar05/Liquid Flux Button/index.js b/contributions/Namokar05/Liquid Flux Button/index.js new file mode 100644 index 0000000..a348759 --- /dev/null +++ b/contributions/Namokar05/Liquid Flux Button/index.js @@ -0,0 +1,11 @@ +const buttonMetadata = { + name: "Quantum Liquid Button", + author: "Namokar05", + description: "A magnetic liquid-metal button featuring morphing blobs, hover attraction, and an explosive ripple click animation.", + type: "html", + tags: ["liquid", "magnetic", "morph", "ripple", "blobs", "3d", "interactive"], + difficulty: "advanced", + preview: "Experience magnetic hover pull, liquid morphing, and ripple explosion" +}; + +export default buttonMetadata; diff --git a/contributions/Namokar05/Liquid Flux Button/liquid.css b/contributions/Namokar05/Liquid Flux Button/liquid.css new file mode 100644 index 0000000..3ab5bda --- /dev/null +++ b/contributions/Namokar05/Liquid Flux Button/liquid.css @@ -0,0 +1,76 @@ +body { + margin: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + background: #0f1117; + font-family: system-ui; +} + +.liquid-btn { + position: relative; + padding: 18px 55px; + font-size: 20px; + color: #fff; + border: none; + cursor: pointer; + background: linear-gradient(135deg, #3a1c71, #d76d77, #ffaf7b); + border-radius: 14px; + overflow: hidden; + transition: transform 0.2s ease; +} + +.liquid-btn .text { + position: relative; + z-index: 3; + font-weight: 600; + letter-spacing: 1px; +} + +.liquid-btn:hover { + transform: translateY(-6px) scale(1.03); +} + +/* Blobs */ +.blob { + position: absolute; + width: 120px; + height: 120px; + background: rgba(255, 255, 255, 0.09); + border-radius: 50%; + filter: blur(26px); + animation: float 6s infinite ease-in-out; + z-index: 0; +} + +.blob:nth-child(2) { top: -40px; left: -20px; animation-duration: 5s; } +.blob:nth-child(3) { bottom: -40px; left: 30px; animation-duration: 7s; } +.blob:nth-child(4) { top: 10px; right: -40px; animation-duration: 6s; } +.blob:nth-child(5) { bottom: -30px; right: 20px; animation-duration: 8s; } + +@keyframes float { + 0% { transform: translate(0,0) scale(1); } + 50% { transform: translate(25px, -20px) scale(1.2); } + 100% { transform: translate(0,0) scale(1); } +} + +/* Ripple explosion */ +.ripple { + position: absolute; + width: 10px; + height: 10px; + background: rgba(255,255,255,0.4); + border-radius: 50%; + pointer-events: none; + transform: translate(-50%,-50%); + animation: explode 0.6s ease-out forwards; +} + +@keyframes explode { + to { + width: 300px; + height: 300px; + opacity: 0; + } +} diff --git a/contributions/Namokar05/Liquid Flux Button/liquid.js b/contributions/Namokar05/Liquid Flux Button/liquid.js new file mode 100644 index 0000000..2376a93 --- /dev/null +++ b/contributions/Namokar05/Liquid Flux Button/liquid.js @@ -0,0 +1,23 @@ +const btn = document.getElementById('liquidBtn'); + +// Magnetic hover +btn.addEventListener("mousemove", (e) => { + const rect = btn.getBoundingClientRect(); + const x = e.clientX - (rect.left + rect.width / 2); + const y = e.clientY - (rect.top + rect.height / 2); + btn.style.transform = `translate(${x * 0.15}px, ${y * 0.15}px) scale(1.03)`; +}); + +btn.addEventListener("mouseleave", () => { + btn.style.transform = ""; +}); + +// Ripple explosion +btn.addEventListener("click", (e) => { + const ripple = document.createElement("span"); + ripple.className = "ripple"; + ripple.style.left = `${e.clientX}px`; + ripple.style.top = `${e.clientY}px`; + document.body.appendChild(ripple); + setTimeout(() => ripple.remove(), 600); +}); diff --git a/contributions/Namokar05/Quantum Pulse Button/buton.css b/contributions/Namokar05/Quantum Pulse Button/buton.css new file mode 100644 index 0000000..089f072 --- /dev/null +++ b/contributions/Namokar05/Quantum Pulse Button/buton.css @@ -0,0 +1,167 @@ +:root { + --bg: #0f1724; + --glass: rgba(255, 255, 255, 0.06); + --accent1: #7c5cff; + --accent2: #00e0b8; + --accent3: #ffd166; + --text: #f8fafc; + --glass-border: rgba(255, 255, 255, 0.08); + --focus: 3px solid rgba(124, 92, 255, 0.18); + --size: 56px; +} + +/* Page */ +html, body { + height: 100%; + margin: 0; + background: radial-gradient(1200px 600px at 10% 10%, rgba(124,92,255,0.08), transparent), + radial-gradient(1000px 500px at 90% 90%, rgba(0,224,184,0.04), transparent), + var(--bg); + font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; + display: flex; + align-items: center; + justify-content: center; + color: var(--text); +} + +.button-wrap { + perspective: 1000px; + user-select: none; +} + +.funky-btn { + --tiltX: 0deg; + --tiltY: 0deg; + position: relative; + display: inline-flex; + align-items: center; + gap: 12px; + height: var(--size); + padding: 0 22px; + background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); + border-radius: 14px; + border: 1px solid var(--glass-border); + color: var(--text); + font-weight: 600; + font-size: 16px; + cursor: pointer; + outline: none; + box-shadow: + 0 10px 30px rgba(2,6,23,0.6), + 0 2px 8px rgba(0,0,0,0.6), + 0 0 40px rgba(124,92,255,0.06) inset; + transform: translateZ(0) rotateX(var(--tiltX)) rotateY(var(--tiltY)); + transition: transform 200ms cubic-bezier(.2,.9,.3,1), box-shadow 220ms; + backdrop-filter: blur(6px) saturate(110%); + -webkit-tap-highlight-color: transparent; +} + +.funky-btn:hover { + transform: translateY(-6px) rotateX(var(--tiltX)) rotateY(var(--tiltY)); + box-shadow: + 0 20px 50px rgba(2,6,23,0.65), + 0 6px 22px rgba(0,0,0,0.6), + 0 0 60px rgba(124,92,255,0.12) inset; +} + +.icon { + width: 36px; + height: 36px; + flex: 0 0 36px; + display: grid; + place-items: center; + border-radius: 9px; + background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); + box-shadow: 0 3px 10px rgba(0,0,0,0.45); + border: 1px solid rgba(255,255,255,0.04); + position: relative; + overflow: hidden; +} + +.icon::after { + content: ""; + position: absolute; + inset: 0; + background: linear-gradient(135deg, var(--accent1), var(--accent2) 55%, var(--accent3) 95%); + mix-blend-mode: screen; + opacity: 0.12; + pointer-events: none; +} + +.btn-label { + transform: translateZ(20px); + letter-spacing: 0.2px; +} + +.ripple { + position: absolute; + border-radius: 50%; + transform: translate(-50%, -50%) scale(0); + opacity: 0.9; + pointer-events: none; + animation: ripple 700ms cubic-bezier(.2,.9,.3,1); + background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.28), rgba(255,255,255,0.08)); + box-shadow: 0 6px 20px rgba(0,0,0,0.5); +} + +@keyframes ripple { + to { + transform: translate(-50%, -50%) scale(3.6); + opacity: 0; + } +} + +.funky-btn.success { + pointer-events: none; + background: linear-gradient(90deg, rgba(34,197,94,0.18), rgba(16,185,129,0.06)); + border-color: rgba(34,197,94,0.22); + box-shadow: 0 12px 38px rgba(16,185,129,0.12), 0 8px 30px rgba(0,0,0,0.45); + transition: all 300ms; +} + +.funky-btn .check { + width: 20px; + height: 20px; + opacity: 0; + transform: scale(0.6) translateY(2px); + transition: all 260ms cubic-bezier(.2,.9,.3,1); +} + +.funky-btn.success .check { + opacity: 1; + transform: scale(1) translateY(0); +} + +.funky-btn.success .icon, +.funky-btn.success .btn-label { + opacity: 0; + transform: scale(0.92); +} + +.funky-btn:focus-visible { + box-shadow: var(--focus), 0 8px 30px rgba(2,6,23,0.5); +} + +@media (prefers-reduced-motion: reduce) { + .funky-btn, + .funky-btn:hover, + .ripple { + transition: none; + animation: none; + transform: none; + } +} + +@media (max-width: 420px) { + .funky-btn { + padding: 0 14px; + font-size: 15px; + border-radius: 12px; + height: 48px; + --size: 48px; + } + .icon { + width: 34px; + height: 34px; + } +} diff --git a/contributions/Namokar05/Quantum Pulse Button/button.js b/contributions/Namokar05/Quantum Pulse Button/button.js new file mode 100644 index 0000000..ed23de9 --- /dev/null +++ b/contributions/Namokar05/Quantum Pulse Button/button.js @@ -0,0 +1,75 @@ +const btn = document.getElementById('uniqueBtn'); + +const onMove = (e) => { + const rect = btn.getBoundingClientRect(); + const cx = rect.left + rect.width / 2; + const cy = rect.top + rect.height / 2; + const dx = e.clientX - cx; + const dy = e.clientY - cy; + const tiltX = Math.max(Math.min((-dy / rect.height) * 6, 6), -6); + const tiltY = Math.max(Math.min((dx / rect.width) * 12, 12), -12); + btn.style.setProperty('--tiltX', tiltX + 'deg'); + btn.style.setProperty('--tiltY', tiltY + 'deg'); +}; + +const onLeave = () => { + btn.style.setProperty('--tiltX', '0deg'); + btn.style.setProperty('--tiltY', '0deg'); +}; + +btn.addEventListener('pointerenter', () => { + document.addEventListener('pointermove', onMove); +}); + +btn.addEventListener('pointerleave', () => { + document.removeEventListener('pointermove', onMove); + onLeave(); +}); + +const createRipple = (x, y) => { + const circle = document.createElement('span'); + circle.className = 'ripple'; + const rect = btn.getBoundingClientRect(); + circle.style.left = (x - rect.left) + 'px'; + circle.style.top = (y - rect.top) + 'px'; + const maxDim = Math.max(rect.width, rect.height) * 1.2; + circle.style.width = circle.style.height = maxDim + 'px'; + btn.appendChild(circle); + circle.addEventListener('animationend', () => circle.remove(), { once: true }); +}; + +btn.addEventListener('pointerdown', (ev) => { + if (ev.button !== 0 && ev.pointerType === 'mouse') return; + createRipple(ev.clientX, ev.clientY); +}); + +const performAction = async () => { + if (btn.classList.contains('success')) return; + btn.setAttribute('aria-busy', 'true'); + btn.style.pointerEvents = 'none'; + await new Promise(r => setTimeout(r, 650)); + btn.classList.add('success'); + btn.removeAttribute('aria-busy'); + setTimeout(() => { + btn.classList.remove('success'); + btn.style.pointerEvents = ''; + }, 1400); +}; + +btn.addEventListener('click', () => performAction()); + +btn.addEventListener('keydown', (e) => { + if (e.key === ' ' || e.key === 'Spacebar' || e.key === 'Enter') { + if (e.key === ' ') e.preventDefault(); + const rect = btn.getBoundingClientRect(); + createRipple(rect.left + rect.width / 2, rect.top + rect.height / 2); + performAction(); + } +}); + +btn.setAttribute('role', 'button'); +btn.setAttribute('tabindex', '0'); + +window.addEventListener('pagehide', () => { + document.removeEventListener('pointermove', onMove); +}); diff --git a/contributions/Namokar05/Quantum Pulse Button/index.html b/contributions/Namokar05/Quantum Pulse Button/index.html new file mode 100644 index 0000000..3458a6e --- /dev/null +++ b/contributions/Namokar05/Quantum Pulse Button/index.html @@ -0,0 +1,30 @@ + + + + + + Unique Interactive Button + + + +
+ +
+ + + + diff --git a/contributions/Namokar05/Quantum Pulse Button/index.js b/contributions/Namokar05/Quantum Pulse Button/index.js new file mode 100644 index 0000000..e69de29