-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
144 lines (136 loc) · 4.63 KB
/
index.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bookshelf App</title>
<!-- Impor script kamu di sini -->
<!-- Lampirkan `defer` jika pemanggilan dilakukan dalam <head> -->
<script defer src="main.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Bookshelf App</h1>
</header>
<div data-bookid="123123123" data-testid="bookItem">
<h3 data-testid="bookItemTitle">Judul Buku 1</h3>
<p data-testid="bookItemAuthor">Penulis: Penulis Buku 1</p>
<p data-testid="bookItemYear">Tahun: 2030</p>
<div>
<button data-testid="bookItemIsCompleteButton">Selesai dibaca</button>
<button data-testid="bookItemDeleteButton">Hapus buku</button>
<button data-testid="bookItemEditButton">Edit buku</button>
</div>
</div>
<main>
<section>
<h2>Tambah Buku Baru</h2>
<form id="bookForm" data-testid="bookForm">
<div>
<label for="bookFormTitle">Judul</label>
<input
id="bookFormTitle"
type="text"
required
data-testid="bookFormTitleInput"
/>
</div>
<div>
<label for="bookFormAuthor">Penulis</label>
<input
id="bookFormAuthor"
type="text"
required
data-testid="bookFormAuthorInput"
/>
</div>
<div>
<label for="bookFormYear">Tahun</label>
<input
id="bookFormYear"
type="number"
required
data-testid="bookFormYearInput"
/>
</div>
<div>
<label for="bookFormIsComplete">Selesai dibaca</label>
<input
id="bookFormIsComplete"
type="checkbox"
data-testid="bookFormIsCompleteCheckbox"
/>
</div>
<button
id="bookFormSubmit"
type="submit"
data-testid="bookFormSubmitButton"
>
Masukkan Buku ke rak <span>Belum selesai dibaca</span>
</button>
</form>
</section>
<section>
<h2>Cari Buku</h2>
<form id="searchBook" data-testid="searchBookForm">
<label for="searchBookTitle">Judul</label>
<input
id="searchBookTitle"
type="text"
data-testid="searchBookFormTitleInput"
/>
<button
id="searchSubmit"
type="submit"
data-testid="searchBookFormSubmitButton"
>
Cari
</button>
</form>
</section>
<section>
<h2>Belum selesai dibaca</h2>
<div id="incompleteBookList" data-testid="incompleteBookList">
<!--
Ini adalah struktur HTML untuk masing-masing buku.
Pastikan susunan elemen beserta atribut data-testid menyesuaikan seperti contoh ini.
-->
<div data-bookid="123123123" data-testid="bookItem">
<h3 data-testid="bookItemTitle">Judul Buku 1</h3>
<p data-testid="bookItemAuthor">Penulis: Penulis Buku 1</p>
<p data-testid="bookItemYear">Tahun: 2030</p>
<div>
<button data-testid="bookItemIsCompleteButton">
Selesai dibaca
</button>
<button data-testid="bookItemDeleteButton">Hapus Buku</button>
<button data-testid="bookItemEditButton">Edit Buku</button>
</div>
</div>
</div>
</section>
<section>
<h2>Selesai dibaca</h2>
<div id="completeBookList" data-testid="completeBookList">
<!--
Ini adalah struktur HTML untuk masing-masing buku.
Pastikan susunan elemen beserta atribut data-testid menyesuaikan seperti contoh ini.
-->
<div data-bookid="456456456" data-testid="bookItem">
<h3 data-testid="bookItemTitle">Judul Buku 2</h3>
<p data-testid="bookItemAuthor">Penulis: Penulis Buku 2</p>
<p data-testid="bookItemYear">Tahun: 2030</p>
<div>
<button data-testid="bookItemIsCompleteButton">
Selesai dibaca
</button>
<button data-testid="bookItemDeleteButton">Hapus Buku</button>
<button data-testid="bookItemEditButton">Edit Buku</button>
</div>
</div>
</div>
</section>
</main>
</body>
</html>