-
Notifications
You must be signed in to change notification settings - Fork 5
/
task-1.html
62 lines (52 loc) · 1.86 KB
/
task-1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Task 1: DOM Manipulation</title>
<link rel="stylesheet" href="css/base.css">
<script src="js/loader.js"></script>
</head>
<body>
<main class="flex flex-col justify-center min-h-screen items-center">
<div class="post-card p-5 mb-5 rounded-lg shadow md:w-1/4">
<h3 class="text-2xl heading">Kelvin Kress</h3>
<p class="font-sans text-sm para">Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis, unde
asperiores exercitationem totam
accusamus illum debitis, voluptate corporis vel officiis doloribus deleniti molestiae veniam ipsa
repudiandae ullam rem dolorum iure.</p>
</div>
<div class="flex" style="gap: 1rem" role="pagination">
<!-- add buttons here -->
</div>
</main>
<script>
const changePost = () => {
const url = 'https://jsonplaceholder.typicode.com/posts'
const postUrl = `${url}/${post_id}`
fetch() // enter postUrl here
.then(res => ) // convert response here
.then() //added replaceContent here
}
const replaceContent = ({
title,
body
}) => {
}
const activateButtons = () => {
// define buttons variable here
//loops through the buttons
buttons.forEach((button, i) => {
const index = i + 1; // index variable
button.addEventListener('click', () => {
})
})
}
const startApp = () => {
activateButtons()
}
startApp()
</script>
</body>
</html>