Skip to content

Commit

Permalink
style: 폴더/파일 이름 앞에만 이모티콘 노출하도록 수정
Browse files Browse the repository at this point in the history
- 기존에 모든 span에 이모티콘 노출로 가독성 떨어짐
  • Loading branch information
i960107 committed Aug 27, 2024
1 parent 3abee18 commit 75ad03f
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@
margin-bottom: 5px;
}

.folder > span::before {
content: "📁 ";
}

.file::before {
content: "📄 ";
}
/*.folder > span::before {*/
/* content: "📁 ";*/
/*}*/

.folder.open > span::before {
content: "📂 ";
}
/*.file::before {*/
/* content: "📄 ";*/
/*}*/
/*.folder.open > span::before {*/
/* content: "📂 ";*/
/*}*/

.folder > ul {
display: none;
Expand Down Expand Up @@ -251,12 +250,22 @@ <h3>파일/폴더 공유 설정</h3>

function renderTree(node) {
const li = document.createElement('li');
li.innerHTML = `
<span class="item-name">${node.name}</span>
if (node.isFolder) {
li.innerHTML = `
<span class="item-name">📁 ${node.name}</span>
<span class="item-size">(${formatSize(node.size)})</span>
<span class="item-id">[ID: ${node.id}]</span>
<span class="item-share">[${node.share}]</span>
`;
} else {
li.innerHTML = `
<span class="item-name">📄 ${node.name}</span>
<span class="item-size">(${formatSize(node.size)})</span>
<span class="item-id">[ID: ${node.id}]</span>
<span class="item-share">[${node.share}]</span>
`;
}


if (node.isFolder) {
li.classList.add('folder');
Expand Down Expand Up @@ -550,8 +559,8 @@ <h3>파일/폴더 공유 설정</h3>
}
}

document.querySelectorAll('.close').forEach(function(closeButton) {
closeButton.onclick = function() {
document.querySelectorAll('.close').forEach(function (closeButton) {
closeButton.onclick = function () {
const modal = this.closest('.thumbnail-modal');
if (modal) {
modal.style.display = 'none';
Expand Down

0 comments on commit 75ad03f

Please sign in to comment.