feat: add comment functionality for snippets with modal interface

This commit is contained in:
2025-01-25 19:33:23 +02:00
parent 52543943bc
commit d847de361c
4 changed files with 118 additions and 2 deletions

View File

@@ -267,4 +267,64 @@
.snippet-item:hover .duplicate-snippet {
opacity: 0.8;
}
.comment-modal {
display: none;
position: fixed;
top: 50%;
left: 50%;
width: 50%;
height: 50%;
transform: translate(-50%, -50%);
background: white;
padding: 1rem;
border: 1px solid #e0e0e0;
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
z-index: 1001;
}
.comment-modal textarea {
width: 100%;
height: calc(100% - 2rem);
margin-bottom: 1rem;
}
.comment-modal .button {
display: block;
margin: 0 auto;
}
.comment-modal-background {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
}
.comment-snippet {
opacity: 0.4;
font-size: 14px;
padding: 2px 4px;
background: none;
border: none;
cursor: pointer;
min-width: 24px;
}
.comment-snippet.has-comment {
opacity: 1;
}
.comment-snippet:hover {
opacity: 1;
}
.snippet-item:hover .comment-snippet {
opacity: 0.8;
}