Skip to content

Commit 3f69188

Browse files
committed
update
1 parent 36e7333 commit 3f69188

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

notes.html

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<title>Notes - Study Hub</title>
77
<!-- Add jsPDF library for PDF generation -->
88
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
9+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
910
<style>
1011
* {
1112
margin: 0;
@@ -72,7 +73,7 @@
7273
textarea,
7374
#canvas {
7475
width: 100%;
75-
height: 300px;
76+
height: 600px;
7677
padding: 10px;
7778
font-size: 1.1em;
7879
border: 1px solid #ccc;
@@ -234,6 +235,19 @@
234235
display: none;
235236
z-index: 1001;
236237
}
238+
239+
.material-icons {
240+
font-size: 18px;
241+
vertical-align: middle;
242+
}
243+
244+
.format-button {
245+
display: flex;
246+
align-items: center;
247+
justify-content: center;
248+
min-width: 30px;
249+
height: 30px;
250+
}
237251
</style>
238252
</head>
239253

@@ -274,10 +288,19 @@ <h2>Your Notes</h2>
274288
<button class="format-button" onclick="formatText('bold')" title="Bold">B</button>
275289
<button class="format-button" onclick="formatText('italic')">I</button>
276290
<button class="format-button" onclick="formatText('bullet')">• List</button>
291+
<button class="format-button" onclick="formatText('left')" title="Align Left">
292+
<span class="material-icons">format_align_left</span>
293+
</button>
294+
<button class="format-button" onclick="formatText('center')" title="Center">
295+
<span class="material-icons">format_align_center</span>
296+
</button>
297+
<button class="format-button" onclick="formatText('right')" title="Align Right">
298+
<span class="material-icons">format_align_right</span>
299+
</button>
277300
</div>
278301

279302
<textarea id="notes" placeholder="Write your notes here..."></textarea>
280-
<canvas id="canvas" width="800" height="300"></canvas>
303+
<canvas id="canvas" width="800" height="600"></canvas>
281304

282305
<div class="button-container">
283306
<button class="button" onclick="saveNotes()">Save Notes</button>
@@ -502,6 +525,15 @@ <h2>Your Notes</h2>
502525
const bulletedLines = lines.map(line => '• ' + line).join('\n');
503526
textarea.value = text.slice(0, start) + bulletedLines + text.slice(end);
504527
break;
528+
case 'left':
529+
textarea.style.textAlign = 'left';
530+
break;
531+
case 'center':
532+
textarea.style.textAlign = 'center';
533+
break;
534+
case 'right':
535+
textarea.style.textAlign = 'right';
536+
break;
505537
}
506538
saveToUndoStack();
507539
}

0 commit comments

Comments
 (0)