Compare commits
1 Commits
version_10
...
version_11
| Author | SHA1 | Date | |
|---|---|---|---|
| 8dabc243d4 |
@@ -224,9 +224,76 @@ export default function RootLayout({
|
||||
' pointer-events: none !important;' +
|
||||
' z-index: 999998 !important;' +
|
||||
' transition: all 0.15s ease !important;' +
|
||||
'}' +
|
||||
'.lofi-music-button {' +
|
||||
' position: fixed !important;' +
|
||||
' bottom: 30px !important;' +
|
||||
' right: 30px !important;' +
|
||||
' z-index: 999999 !important;' +
|
||||
' width: 50px !important;' +
|
||||
' height: 50px !important;' +
|
||||
' border-radius: 50% !important;' +
|
||||
' background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;' +
|
||||
' border: none !important;' +
|
||||
' color: white !important;' +
|
||||
' font-size: 24px !important;' +
|
||||
' cursor: pointer !important;' +
|
||||
' box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;' +
|
||||
' transition: all 0.3s ease !important;' +
|
||||
' display: flex !important;' +
|
||||
' align-items: center !important;' +
|
||||
' justify-content: center !important;' +
|
||||
'}' +
|
||||
'.lofi-music-button:hover {' +
|
||||
' transform: scale(1.1) !important;' +
|
||||
' box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;' +
|
||||
'}' +
|
||||
'.lofi-music-button.playing {' +
|
||||
' animation: pulse-glow 2s ease-in-out infinite !important;' +
|
||||
'}' +
|
||||
'@keyframes pulse-glow {' +
|
||||
' 0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important; }' +
|
||||
' 50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.8) !important; }' +
|
||||
'}';
|
||||
document.head.appendChild(style);
|
||||
|
||||
// Create lofi music player
|
||||
const audioContainer = document.createElement('div');
|
||||
audioContainer.id = 'lofi-music-container';
|
||||
|
||||
const audio = document.createElement('audio');
|
||||
audio.id = 'lofi-audio';
|
||||
audio.loop = true;
|
||||
audio.volume = 0.3;
|
||||
audio.src = 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3';
|
||||
audioContainer.appendChild(audio);
|
||||
|
||||
const musicButton = document.createElement('button');
|
||||
musicButton.className = 'lofi-music-button playing';
|
||||
musicButton.innerHTML = '🎵';
|
||||
musicButton.title = 'Toggle lofi music';
|
||||
|
||||
let isPlaying = true;
|
||||
audio.play().catch(() => {
|
||||
isPlaying = false;
|
||||
musicButton.classList.remove('playing');
|
||||
});
|
||||
|
||||
musicButton.addEventListener('click', () => {
|
||||
if (isPlaying) {
|
||||
audio.pause();
|
||||
musicButton.classList.remove('playing');
|
||||
isPlaying = false;
|
||||
} else {
|
||||
audio.play();
|
||||
musicButton.classList.add('playing');
|
||||
isPlaying = true;
|
||||
}
|
||||
});
|
||||
|
||||
document.body.appendChild(audioContainer);
|
||||
document.body.appendChild(musicButton);
|
||||
|
||||
const getUniqueSelector = (element, assignId = false) => {
|
||||
if (element.dataset && element.dataset.webildSelector) {
|
||||
return element.dataset.webildSelector;
|
||||
|
||||
Reference in New Issue
Block a user