-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (78 loc) · 2.82 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Fragments UI</title>
<link rel="stylesheet" href="./styles.css" />
<script type="module" src="src/app.js"></script>
</head>
<body>
<h1>Fragments UI</h1>
<section>
<nav>
<button id="login">Login</button> <button id="logout">Logout</button>
</nav>
</section>
<section hidden id="user">
<h2>Hello <span class="username"></span>!</h2>
<br />
<div class="form-fragments-container">
<div class="form-container">
<div class="form-box">
<h3>Enter Fragment Details</h3>
<form id="postForm">
<label for="type">Select a type:</label>
<select id="type" name="type">
<option value="text/plain">text/plain</option>
<option value="text/markdown">text/markdown</option>
<option value="text/html">text/html</option>
<option value="application/json">application/json</option>
</select>
<label for="content">Enter content:</label>
<input type="text" id="content" name="content" />
<input id="submit" type="submit" value="Submit" />
</form>
</div>
<div>
<h3>Get Fragments</h3>
<form id="getFragmentsForm">
<button id="getFragments">Get All Fragments</button>
</form>
</div>
<div>
<h3>Get Fragment by ID</h3>
<form id="getFragmentByIdForm">
<label for="fragmentId">Enter fragment ID:</label>
<input type="text" id="fragmentId" name="fragmentId" />
<button id="getFragmentById">Get Fragment by ID</button>
</form>
</div>
<div>
<h3>Delete Fragment</h3>
<form id="deleteFragmentByIdForm">
<label for="deleteId">Enter fragment ID:</label>
<input type="text" id="deleteId" name="deleteId" />
<button id="deleteFragmentById">Delete Fragment</button>
</form>
</div>
<div>
<h3>Update</h3>
<form id="updateFragmentByIdForm">
<label for="updateId">Enter fragment ID:</label>
<input type="text" id="updateId" name="updateId" />
<label for="updateData">Enter new fragment data:</label>
<input type="text" id="updateData" name="updateData" />
<button id="updateFragmentById">Update Fragment</button>
</form>
</div>
</div>
<div class="fragments-container">
<div class="fragments-box">
<h3>Received Fragments</h3>
<ul id="fragmentsList"></ul>
</div>
</div>
</div>
</section>
</body>
</html>