Skip to content

Commit

Permalink
implemented a simple voice recorder.
Browse files Browse the repository at this point in the history
  • Loading branch information
amitmerchant1990 committed Dec 6, 2024
1 parent 755848a commit 2463522
Show file tree
Hide file tree
Showing 9 changed files with 671 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<li><a class="dropdown-item" href="/rich-text-notes/">Rich Text Notes</a></li>
<li><a class="dropdown-item" href="/markdown-editor">Markdown Editor</a></li>
<li><a class="dropdown-item" href="/pomodoro-timer/">Pomodoro Timer</a></li>
<li><a class="dropdown-item" href="/voice-recorder/">Voice Recorder</a></li>
<li><a class="dropdown-item" href="/tasks/">Tasks</a></li>
</div>
</span>
Expand Down
5 changes: 5 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@
<lastmod>2024-11-08T14:18:22+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://notepad.js.org/voice-recorder/</loc>
<lastmod>2024-12-06T14:18:22+00:00</lastmod>
<priority>0.80</priority>
</url>
</urlset>
4 changes: 4 additions & 0 deletions tasks/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ footer {
color: #333;
}

.modal-content {
border-radius: .7rem;
}

@keyframes slideIn {
from {
transform: translateY(20px);
Expand Down
6 changes: 6 additions & 0 deletions voice-recorder/css/bootstrap.min.css

Large diffs are not rendered by default.

117 changes: 117 additions & 0 deletions voice-recorder/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: #f5f5f5;
color: #333;
line-height: 1.6;
padding-top: 60px;
}

.navbar-brand a:hover {
opacity: 0.8;
}

.recorder-container {
max-width: 600px;
margin: 2rem auto;
padding: 2rem;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
text-align: center;
margin-bottom: 2rem;
color: #2c3e50;
}

.recorder-controls {
display: flex;
justify-content: center;
gap: 1rem;
margin-bottom: 2rem;
}

.control-button {
padding: 0.8rem 1.5rem;
border: none;
border-radius: 25px;
background-color: #3498db;
color: white;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.3s ease;
}

#stopButton:not(:disabled) {
background-color: #e74c3c;
}

#stopButton:not(:disabled):hover {
background-color: #c0392b;
}

.control-button:disabled {
background-color: #bdc3c7;
cursor: not-allowed;
}

.control-button:not(:disabled):hover {
background-color: #2980b9;
}

#recordButton:not(:disabled):hover {
background-color: #2980b9;
}

.recording-status {
text-align: center;
margin-bottom: 2rem;
}

.recording-time {
font-size: 1.5rem;
font-weight: bold;
color: #e74c3c;
margin-top: 0.5rem;
}

.recordings-list {
display: flex;
flex-direction: column;
gap: 1rem;
}

.recording-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem;
background-color: #f8f9fa;
border-radius: 6px;
border: 1px solid #dee2e6;
}

.recording-item audio {
max-width: 70%;
}

.download-button {
padding: 0.5rem 1rem;
background-color: #2ecc71;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}

.download-button:hover {
background-color: #27ae60;
}
60 changes: 60 additions & 0 deletions voice-recorder/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A simple voice recorder and player">
<meta name="author" content="Amit Merchant">
<title>Voice Recorder | notepad.js.org</title>
<meta name="keywords" content="voice,recorder,player,notepad" />
<meta name="application-name" content="Voice Recorder" />

<meta property="og:title" content="Voice Recorder | notepad.js.org" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://notepad.js.org/voice-recorder" />
<meta property="og:description" content="A simple voice recorder and player" />
<meta property="og:image" content="https://notepad.js.org/art/voice-recorder-notepad.png" />

<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Voice Recorder | notepad.js.org" />
<meta name="twitter:description" content="A simple voice recorder and player" />
<meta property="twitter:image" content="https://notepad.js.org/art/voice-recorder-notepad.png" />

<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<script src="js/libs/lame.min.js"></script>
</head>
<body>
<nav class="navbar navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<div class="navbar-brand">
<a href="/" class="text-white text-decoration-none">Notepad</a>
<span class="text-white">/</span>
<span class="text-white">Voice Recorder</span>
</div>
</div>
</nav>

<div class="recorder-container mt-5 pt-4">
<h1>Voice Recorder</h1>
<div class="recorder-controls">
<button id="recordButton" class="control-button">
<span>Record</span>
</button>
<button id="stopButton" class="control-button" disabled>
<span>Stop</span>
</button>
</div>
<div class="recording-status">
<span id="recordingStatus"></span>
<div id="recordingTime" class="recording-time">00:00</div>
</div>
<div id="recordings" class="recordings-list">
<!-- Recorded audio items will be added here -->
</div>
</div>

<script src="js/libs/bootstrap.bundle.min.js"></script>
<script src="recorder.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions voice-recorder/js/libs/bootstrap.bundle.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 2463522

Please sign in to comment.