Skip to content

Commit e102a2f

Browse files
authored
Minute changes
1 parent a290d0f commit e102a2f

File tree

1 file changed

+28
-33
lines changed

1 file changed

+28
-33
lines changed

index.html

+28-33
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,38 @@
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<title>Note</title>
8-
</head>
9-
<style>
10-
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
11-
12-
html,
13-
body {
14-
margin: 0;
15-
padding: 0;
16-
height: 100%;
17-
}
8+
<style>
9+
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
1810

19-
body {
20-
display: flex;
21-
flex-direction: column;
22-
justify-content: center;
23-
align-items: center;
24-
}
11+
html,
12+
body,
13+
textarea {
14+
margin: 0;
15+
padding: 0;
16+
height: 100%;
17+
}
2518

26-
textarea {
27-
font-family: 'Open Sans';
28-
width: 90%;
29-
height: 90%;
30-
border: none;
31-
resize: none;
32-
outline: none;
33-
}
34-
</style>
19+
textarea {
20+
font-family: 'Open Sans';
21+
width: 90%;
22+
height: 90%;
23+
padding: 5%;
24+
border: none;
25+
resize: none;
26+
outline: none;
27+
}
28+
</style>
29+
</head>
3530

3631
<body>
3732
<textarea placeholder="Click here to type"></textarea>
33+
<script>
34+
const text = document.querySelector('textarea');
35+
text.value = localStorage.getItem('key');
36+
text.oninput = () => {
37+
localStorage.setItem('key', text.value);
38+
}
39+
</script>
3840
</body>
39-
<script>
40-
const text = document.querySelector('textarea');
41-
text.value = localStorage.getItem('key');
42-
text.oninput = () => {
43-
localStorage.setItem('key', text.value);
44-
}
45-
</script>
4641

47-
</html>
42+
</html>

0 commit comments

Comments
 (0)