-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommentSystemUI.html
More file actions
96 lines (92 loc) · 2.34 KB
/
commentSystemUI.html
File metadata and controls
96 lines (92 loc) · 2.34 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Comment System</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f4f4f4;
}
h2 {
color: #333;
}
#comment-form {
margin-bottom: 40px;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#comment-form input,
#comment-form textarea {
width: calc(100% - 22px); /* Adjusting for padding and border */
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}
#comment-form button {
background-color: #28a745;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
#comment-form button:hover {
background-color: #218838;
}
#comments-container {
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.comment {
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
.comment:last-child {
border-bottom: none;
}
.comment-name {
font-weight: bold;
color: #007bff;
}
.comment-date {
color: #777;
font-size: 0.85rem;
}
.comment-text {
display: block; /* Makes it easier to manage spacing */
margin-top: 5px;
}
</style>
</head>
<body>
<h2>Add Comment</h2>
<form id="comment-form">
<input type="text" name="name" placeholder="Your Name" required>
<input type="email" name="email" placeholder="Your Email (Optional)">
<textarea name="comment" placeholder="Your Comment" required></textarea>
<button type="submit">Submit Comment</button>
</form>
<h2>All Comments</h2>
<div id="comments-container"></div>
<!-- Template for an individual comment -->
<template id="comment-template">
<div class="comment">
<strong class="comment-name"></strong><span class="comment-text"></span>
<br>
<small class="comment-date"></small>
</div>
</template>
</body>
</html>