Spaces:
Running
Running
make the reference neat, show the line spaces
Browse files
script.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
// Code snippets for typing test grouped by language
|
| 3 |
const codeSnippets = {
|
| 4 |
html: [
|
| 5 |
-
|
| 6 |
<html>
|
| 7 |
<head>
|
| 8 |
<title>My Portfolio</title>
|
|
@@ -28,11 +28,12 @@ const codeSnippets = {
|
|
| 28 |
<p>© ${new Date().getFullYear()}</p>
|
| 29 |
</footer>
|
| 30 |
</body>
|
| 31 |
-
</html>`
|
| 32 |
],
|
|
|
|
| 33 |
javascript: [
|
| 34 |
-
|
| 35 |
-
constructor(name, email) {
|
| 36 |
this.name = name;
|
| 37 |
this.email = email;
|
| 38 |
this.score = 0;
|
|
@@ -56,11 +57,12 @@ constructor(name, email) {
|
|
| 56 |
}
|
| 57 |
|
| 58 |
const user1 = new User('Alice', 'alice@example.com');
|
| 59 |
-
user1.login().updateScore().updateScore().logout();`
|
| 60 |
],
|
|
|
|
| 61 |
css: [
|
| 62 |
-
|
| 63 |
-
display: grid;
|
| 64 |
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 65 |
gap: 2rem;
|
| 66 |
padding: 2rem;
|
|
|
|
| 2 |
// Code snippets for typing test grouped by language
|
| 3 |
const codeSnippets = {
|
| 4 |
html: [
|
| 5 |
+
`<!DOCTYPE html>
|
| 6 |
<html>
|
| 7 |
<head>
|
| 8 |
<title>My Portfolio</title>
|
|
|
|
| 28 |
<p>© ${new Date().getFullYear()}</p>
|
| 29 |
</footer>
|
| 30 |
</body>
|
| 31 |
+
</html>`
|
| 32 |
],
|
| 33 |
+
|
| 34 |
javascript: [
|
| 35 |
+
`class User {
|
| 36 |
+
constructor(name, email) {
|
| 37 |
this.name = name;
|
| 38 |
this.email = email;
|
| 39 |
this.score = 0;
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
const user1 = new User('Alice', 'alice@example.com');
|
| 60 |
+
user1.login().updateScore().updateScore().logout();`
|
| 61 |
],
|
| 62 |
+
|
| 63 |
css: [
|
| 64 |
+
`.card-container {
|
| 65 |
+
display: grid;
|
| 66 |
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 67 |
gap: 2rem;
|
| 68 |
padding: 2rem;
|