Skip to content

Commit 7d20838

Browse files
committed
Revert comment section
1 parent 1c08778 commit 7d20838

3 files changed

Lines changed: 18 additions & 1265 deletions

File tree

Lines changed: 0 additions & 381 deletions
Original file line numberDiff line numberDiff line change
@@ -1,381 +0,0 @@
1-
.comment-section-container {
2-
padding: 1rem;
3-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
4-
}
5-
6-
.comment-section-title {
7-
margin-bottom: 1rem;
8-
font-weight: 700;
9-
color: #212121;
10-
font-size: 1.25rem;
11-
}
12-
13-
/* 深色模式下标题颜色 */
14-
.dark-mode .comment-section-title {
15-
color: #e0e0e0;
16-
}
17-
18-
.comment-input-section {
19-
display: flex;
20-
align-items: flex-start;
21-
gap: 1rem;
22-
margin-bottom: 1rem;
23-
background-color: transparent;
24-
border-radius: 0;
25-
padding: 0;
26-
}
27-
28-
.comment-input-avatar {
29-
width: 40px;
30-
height: 40px;
31-
}
32-
33-
.comment-input-field {
34-
flex-grow: 1;
35-
}
36-
37-
.comment-input-field .MuiOutlinedInput-root {
38-
background-color: #fff;
39-
border-radius: 8px;
40-
}
41-
42-
/* 深色模式下输入框背景 */
43-
.dark-mode .comment-input-field .MuiOutlinedInput-root {
44-
background-color: #333;
45-
}
46-
47-
.comment-submit-button {
48-
height: fit-content;
49-
background-color: #00a1d6;
50-
color: white;
51-
border-radius: 4px;
52-
font-weight: 500;
53-
text-transform: none;
54-
flex-shrink: 0;
55-
}
56-
57-
.comment-submit-button:hover {
58-
background-color: #0091c2;
59-
}
60-
61-
.comment-list {
62-
display: flex;
63-
flex-direction: column;
64-
gap: 1.5rem;
65-
}
66-
67-
.comment-item {
68-
display: flex;
69-
align-items: flex-start;
70-
gap: 1rem;
71-
padding: 12px 8px;
72-
transition: background-color 0.2s;
73-
border-radius: 8px;
74-
}
75-
76-
.comment-item:hover {
77-
background-color: #f5f5f5;
78-
}
79-
80-
/* 深色模式下评论项悬停背景 */
81-
.dark-mode .comment-item:hover {
82-
background-color: #383838;
83-
}
84-
85-
.comment-avatar {
86-
width: 40px;
87-
height: 40px;
88-
}
89-
90-
.comment-content {
91-
flex-grow: 1;
92-
width: calc(100% - 60px); /* Account for avatar width and gap */
93-
}
94-
95-
.comment-author {
96-
font-weight: 500;
97-
color: #1a1a1a;
98-
line-height: 1.2;
99-
}
100-
101-
/* 深色模式下作者名称颜色 */
102-
.dark-mode .comment-author {
103-
color: #e0e0e0;
104-
}
105-
106-
.comment-text {
107-
margin-top: 0.5rem;
108-
color: #333;
109-
line-height: 1.5;
110-
white-space: pre-wrap;
111-
word-break: break-word;
112-
}
113-
114-
/* 深色模式下评论文本颜色 */
115-
.dark-mode .comment-text {
116-
color: #cccccc;
117-
}
118-
119-
.comment-actions {
120-
/* This class might still be used for the top-right menu, keep basic flex if needed */
121-
/* display: flex; */
122-
/* align-items: center; */
123-
/* justify-content: space-between; */
124-
margin-top: 0.5rem;
125-
}
126-
127-
/* New styles for comment footer */
128-
.comment-footer {
129-
display: flex;
130-
align-items: center;
131-
justify-content: flex-start; /* Align items to the start */
132-
gap: 1rem; /* Space between timestamp and buttons */
133-
margin-top: 0.75rem; /* Space above the footer */
134-
color: #999; /* Default color for items in footer */
135-
}
136-
137-
/* 深色模式下底部操作区域颜色 */
138-
.dark-mode .comment-footer {
139-
color: #aaaaaa;
140-
}
141-
142-
.comment-timestamp {
143-
font-size: 0.75rem;
144-
/* color: #999; Moved color to parent */
145-
}
146-
147-
.comment-action-buttons {
148-
display: flex;
149-
gap: 0.5rem; /* Smaller gap between action buttons */
150-
}
151-
152-
.like-button, .reply-button {
153-
color: #999; /* Adjust default button color */
154-
transition: color 0.2s, background-color 0.2s;
155-
display: flex;
156-
align-items: center;
157-
padding: 4px; /* Slightly adjust padding */
158-
}
159-
160-
/* 深色模式下按钮颜色 */
161-
.dark-mode .like-button,
162-
.dark-mode .reply-button {
163-
color: #aaaaaa;
164-
}
165-
166-
.like-button.liked {
167-
color: #00a1d6;
168-
}
169-
170-
.like-button:hover, .reply-button:hover {
171-
color: #00a1d6;
172-
background-color: rgba(0, 161, 214, 0.1);
173-
}
174-
175-
.comment-menu-button {
176-
color: #bbb;
177-
}
178-
179-
.comment-menu-button:hover {
180-
color: #666;
181-
}
182-
183-
/* 深色模式下菜单按钮颜色 */
184-
.dark-mode .comment-menu-button {
185-
color: #aaaaaa;
186-
}
187-
188-
.dark-mode .comment-menu-button:hover {
189-
color: #dddddd;
190-
}
191-
192-
.delete-menu-item {
193-
color: #ff5252;
194-
}
195-
196-
.comment-replies {
197-
margin-top: 1rem;
198-
margin-left: 1rem; /* Keep some margin for overall spacing */
199-
padding-left: 2rem; /* Increase padding for indentation */
200-
display: flex;
201-
flex-direction: column;
202-
gap: 0.75rem;
203-
}
204-
205-
/* Styles for Reply Input Section within a Comment */
206-
.reply-input-section {
207-
display: flex;
208-
align-items: flex-start;
209-
gap: 0.75rem;
210-
margin-top: 0.75rem;
211-
padding: 8px;
212-
background-color: #f6f6f6;
213-
border-radius: 8px;
214-
}
215-
216-
/* 深色模式下回复输入区域背景 */
217-
.dark-mode .reply-input-section {
218-
background-color: #333333;
219-
}
220-
221-
.reply-input-avatar {
222-
width: 32px;
223-
height: 32px;
224-
margin-top: 4px;
225-
}
226-
227-
.reply-input-section .MuiTextField-root {
228-
background-color: #fff;
229-
border-radius: 4px;
230-
}
231-
232-
/* 深色模式下回复输入框背景 */
233-
.dark-mode .reply-input-section .MuiTextField-root {
234-
background-color: #424242;
235-
}
236-
237-
.dark-mode .reply-input-section .MuiInputBase-root {
238-
color: #e0e0e0;
239-
}
240-
241-
.reply-input-section .MuiTextField-root .MuiInputBase-inputMultiline {
242-
padding: 8.5px 10px;
243-
font-size: 14px;
244-
}
245-
246-
/* Author badge styling */
247-
.author-badge {
248-
border-radius: 2px;
249-
padding: 0 4px;
250-
}
251-
252-
/* Mobile responsiveness */
253-
@media (max-width: 600px) {
254-
.comment-input-section {
255-
flex-direction: column;
256-
align-items: stretch;
257-
}
258-
259-
.comment-input-avatar {
260-
align-self: flex-start;
261-
}
262-
263-
.comment-submit-button {
264-
align-self: flex-end;
265-
}
266-
}
267-
268-
/* Style for the @mention in replies */
269-
.reply-target-author {
270-
color: #00a1d6; /* Use the theme blue color */
271-
font-weight: 500;
272-
margin-right: 0.25em; /* Add a small space after the colon */
273-
}
274-
275-
/* Styles for Comment Input Actions (Image Button, etc.) */
276-
.comment-input-actions {
277-
display: flex;
278-
align-items: center;
279-
gap: 0.5rem;
280-
padding-top: 8px;
281-
}
282-
283-
/* Styles for Image Preview */
284-
.image-preview-container {
285-
position: relative;
286-
display: inline-block; /* Contain the image and button */
287-
margin-top: 0.5rem;
288-
max-width: 150px; /* Limit preview size */
289-
}
290-
291-
.image-preview {
292-
display: block; /* Remove extra space below image */
293-
max-width: 100%;
294-
max-height: 100px; /* Limit preview height */
295-
border-radius: 4px;
296-
border: 1px solid #ddd;
297-
}
298-
299-
/* 深色模式下图片预览边框 */
300-
.dark-mode .image-preview {
301-
border-color: #555;
302-
}
303-
304-
.remove-image-button {
305-
position: absolute;
306-
top: -8px;
307-
right: -8px;
308-
background-color: rgba(0, 0, 0, 0.6);
309-
color: white;
310-
width: 20px;
311-
height: 20px;
312-
font-size: 12px;
313-
padding: 0;
314-
border-radius: 50%;
315-
}
316-
317-
.remove-image-button:hover {
318-
background-color: rgba(0, 0, 0, 0.8);
319-
}
320-
321-
/* Quill Editor Styling - Toolbar Hidden */
322-
.comment-input-editor .ql-toolbar {
323-
display: none;
324-
}
325-
.comment-input-editor .ql-container {
326-
border: 1px solid #ccc;
327-
border-radius: 8px;
328-
background-color: #fff;
329-
min-height: 100px;
330-
font-size: 15px;
331-
line-height: 1.6;
332-
}
333-
334-
/* 深色模式下 Quill 编辑器容器 */
335-
.dark-mode .comment-input-editor .ql-container {
336-
border-color: #555;
337-
background-color: #333;
338-
}
339-
340-
.comment-input-editor .ql-editor {
341-
padding: 12px 15px;
342-
height: auto;
343-
}
344-
345-
/* 深色模式下 Quill 编辑器内容 */
346-
.dark-mode .comment-input-editor .ql-editor {
347-
color: #e0e0e0;
348-
}
349-
350-
.comment-input-editor .ql-editor.ql-blank::before {
351-
color: #999;
352-
font-style: normal;
353-
left: 15px;
354-
}
355-
356-
/* 深色模式下 Quill 编辑器占位符 */
357-
.dark-mode .comment-input-editor .ql-editor.ql-blank::before {
358-
color: #888;
359-
}
360-
361-
/* Styling for Rendered Quill Content */
362-
.quill-render-content img {
363-
max-width: 100%;
364-
height: auto;
365-
border-radius: 4px;
366-
margin: 8px 0;
367-
}
368-
369-
.quill-render-content p {
370-
margin-top: 0;
371-
margin-bottom: 0.8em;
372-
}
373-
374-
.quill-render-content p:last-child {
375-
margin-bottom: 0;
376-
}
377-
378-
/* Hide separate image preview if editor is used */
379-
.image-preview-container {
380-
display: none;
381-
}

0 commit comments

Comments
 (0)