diff --git a/assets/css/custom.css b/assets/css/custom.css index eaa8a8d..4321d35 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,22 +1,79 @@ - +/* General Body Styles */ body { - background-color: #F0F8FF; - font-family: 'Poppins', sans-serif; + background-color: #f8f9fa; /* Light gray background */ + font-family: 'Inter', sans-serif; + color: #343a40; } -.hero { - background-image: url('https://picsum.photos/seed/wave/1200/400'); - background-size: cover; - background-position: center; - color: white; - text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); +/* Header */ +header h1 { + font-weight: 600; } +/* Card Styles */ +.card { + border: none; + border-radius: 0.75rem; /* Softer rounded corners */ +} + +.card-title { + font-weight: 500; + color: #495057; +} + +/* Waveform Canvas */ #waveform { - display: block; width: 100%; - height: 200px; - background-color: #FFFFFF; - border-radius: 0.5rem; - box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + height: 150px; /* Adjusted height */ } + +.bg-light { + background-color: #e9ecef !important; +} + +/* Buttons */ +.btn { + font-weight: 500; + transition: all 0.2s ease-in-out; +} + +.btn:hover { + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +.btn-primary { + background-color: #0d6efd; + border-color: #0d6efd; +} + +/* Recordings List */ +#recordingsList .list-group-item { + background-color: #fff; + border: 1px solid #dee2e6; + border-radius: 0.5rem; + margin-bottom: 0.75rem; + transition: background-color 0.2s ease; +} + +#recordingsList .list-group-item:hover { + background-color: #f1f3f5; +} + +#recordingsList .btn-play { + background-color: #198754; /* Green play button */ + color: white; +} + +#recordingsList .btn-play:hover { + background-color: #157347; +} + +#recordingsList .recording-name { + font-weight: 500; +} + +/* Footer */ +footer { + font-size: 0.9rem; +} \ No newline at end of file diff --git a/assets/js/main.js b/assets/js/main.js index 578430f..d66a89a 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -24,28 +24,32 @@ document.addEventListener('DOMContentLoaded', () => { console.log('Recordings found:', recordings); recordingsList.innerHTML = ''; if (recordings.length > 0) { - const list = document.createElement('ul'); + const list = document.createElement('div'); list.className = 'list-group'; recordings.forEach(recording => { - const listItem = document.createElement('li'); - listItem.className = 'list-group-item d-flex justify-content-between align-items-center'; - - // Extract just the filename const fileName = recording.split('/').pop(); - listItem.innerText = fileName; + const card = document.createElement('div'); + card.className = 'list-group-item list-group-item-action d-flex justify-content-between align-items-center'; + + const nameSpan = document.createElement('span'); + nameSpan.className = 'recording-name'; + nameSpan.textContent = fileName; - const audio = new Audio(recording); const playBtn = document.createElement('button'); - playBtn.className = 'btn btn-primary btn-sm'; - playBtn.innerText = 'Play'; - playBtn.onclick = () => audio.play(); + playBtn.className = 'btn btn-play btn-sm rounded-pill'; + playBtn.innerHTML = ''; + playBtn.onclick = () => { + const audio = new Audio(recording); + audio.play(); + }; - listItem.appendChild(playBtn); - list.appendChild(listItem); + card.appendChild(nameSpan); + card.appendChild(playBtn); + list.appendChild(card); }); recordingsList.appendChild(list); } else { - recordingsList.innerHTML = '
No recordings yet.
'; + recordingsList.innerHTML = 'No recordings yet.
Your saved recordings will appear here.Record, visualize, and save your audio with ease.
Click the button below to start recording your microphone and see the audio visualized in real-time.
- - - +