Skip to content

Commit ed5822e

Browse files
authored
Merge pull request #54 from DMU-DebugVisual/dongjun
IDE 예제 파일 시스템 구축
2 parents 6882c42 + 523c044 commit ed5822e

File tree

4 files changed

+642
-40
lines changed

4 files changed

+642
-40
lines changed

src/components/ide/IDE.css

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,4 +1233,195 @@ body.dark-mode .language-item.active.lang-border-c {
12331233
body.dark-mode .language-item.active.lang-border-javascript {
12341234
background-color: rgba(241, 224, 90, 0.2);
12351235
color: #f1e05a;
1236+
}
1237+
.my-files-section {
1238+
flex-shrink: 0;
1239+
border-bottom: 1px solid var(--border);
1240+
padding-bottom: 1rem;
1241+
margin-bottom: 1rem;
1242+
}
1243+
1244+
.example-files-section {
1245+
flex: 1;
1246+
overflow-y: auto;
1247+
min-height: 0; /* 플렉스 스크롤을 위해 필요 */
1248+
}
1249+
1250+
.example-files-header {
1251+
display: flex;
1252+
align-items: center;
1253+
gap: 0.5rem;
1254+
padding: 12px 16px;
1255+
font-weight: 600;
1256+
color: var(--text-light);
1257+
border-bottom: 1px solid var(--border);
1258+
margin-bottom: 0.5rem;
1259+
background-color: var(--element-light);
1260+
font-size: 14px;
1261+
}
1262+
1263+
.example-files-list {
1264+
padding: 0 12px;
1265+
}
1266+
1267+
.example-file-item {
1268+
display: flex;
1269+
align-items: center;
1270+
gap: 10px;
1271+
padding: 8px 12px;
1272+
cursor: pointer;
1273+
border-radius: var(--radius);
1274+
transition: var(--transition);
1275+
font-size: 13px;
1276+
color: var(--text-light);
1277+
margin-bottom: 2px;
1278+
border-left: 3px solid transparent;
1279+
}
1280+
1281+
.example-file-item:hover {
1282+
background-color: rgba(0, 0, 0, 0.03);
1283+
color: var(--text);
1284+
}
1285+
1286+
body.dark-mode .example-file-item:hover {
1287+
background-color: rgba(255, 255, 255, 0.03);
1288+
color: var(--text);
1289+
}
1290+
1291+
.example-file-item.active {
1292+
background-color: rgba(126, 87, 194, 0.08);
1293+
color: var(--primary);
1294+
border-left-color: var(--primary);
1295+
font-weight: 500;
1296+
}
1297+
1298+
body.dark-mode .example-file-item.active {
1299+
background-color: rgba(126, 87, 194, 0.12);
1300+
}
1301+
1302+
.example-file-item .file-name {
1303+
flex: 1;
1304+
overflow: hidden;
1305+
text-overflow: ellipsis;
1306+
white-space: nowrap;
1307+
}
1308+
1309+
.example-file-item .icon-small {
1310+
opacity: 0.6;
1311+
font-size: 14px;
1312+
}
1313+
1314+
.example-file-item.active .icon-small {
1315+
opacity: 1;
1316+
}
1317+
1318+
/* 사이드바 전체 레이아웃 조정 */
1319+
.sidebar {
1320+
display: flex;
1321+
flex-direction: column;
1322+
height: 100%;
1323+
}
1324+
1325+
/* 내 파일과 예제 파일 구분을 위한 스타일링 */
1326+
.file-item {
1327+
border-left: 3px solid transparent;
1328+
}
1329+
1330+
.file-item.active {
1331+
border-left-color: var(--success);
1332+
}
1333+
1334+
/* 예제 파일 호버 효과 개선 */
1335+
.example-file-item {
1336+
position: relative;
1337+
}
1338+
1339+
.example-file-item::before {
1340+
content: '';
1341+
position: absolute;
1342+
left: 0;
1343+
top: 0;
1344+
bottom: 0;
1345+
width: 3px;
1346+
background-color: transparent;
1347+
transition: var(--transition);
1348+
}
1349+
1350+
.example-file-item:hover::before {
1351+
background-color: rgba(126, 87, 194, 0.3);
1352+
}
1353+
1354+
.example-file-item.active::before {
1355+
background-color: var(--primary);
1356+
}
1357+
1358+
/* 스크롤바 스타일링 */
1359+
.example-files-list::-webkit-scrollbar {
1360+
width: 6px;
1361+
}
1362+
1363+
.example-files-list::-webkit-scrollbar-track {
1364+
background: transparent;
1365+
}
1366+
1367+
.example-files-list::-webkit-scrollbar-thumb {
1368+
background: var(--border);
1369+
border-radius: 3px;
1370+
}
1371+
1372+
.example-files-list::-webkit-scrollbar-thumb:hover {
1373+
background: var(--text-light);
1374+
}
1375+
1376+
/* 예제 파일 아이콘별 색상 구분 */
1377+
.example-file-item[data-extension="c"] .icon-small {
1378+
color: #555555;
1379+
}
1380+
1381+
.example-file-item[data-extension="py"] .icon-small {
1382+
color: #3572A5;
1383+
}
1384+
1385+
.example-file-item[data-extension="java"] .icon-small {
1386+
color: #B07219;
1387+
}
1388+
1389+
.example-file-item[data-extension="cpp"] .icon-small {
1390+
color: #f34b7d;
1391+
}
1392+
1393+
.example-file-item[data-extension="js"] .icon-small {
1394+
color: #f1e05a;
1395+
}
1396+
1397+
/* 예제 파일 툴팁 스타일 */
1398+
.example-file-item[title] {
1399+
position: relative;
1400+
}
1401+
1402+
/* 반응형: 모바일에서 예제 파일 섹션 조정 */
1403+
@media (max-width: 768px) {
1404+
.example-files-header {
1405+
padding: 10px 12px;
1406+
font-size: 13px;
1407+
}
1408+
1409+
.example-file-item {
1410+
padding: 6px 10px;
1411+
font-size: 12px;
1412+
}
1413+
1414+
.my-files-section {
1415+
margin-bottom: 0.5rem;
1416+
padding-bottom: 0.5rem;
1417+
}
1418+
}
1419+
1420+
/* 다크모드에서 예제 파일 섹션 스타일 개선 */
1421+
body.dark-mode .example-files-header {
1422+
background-color: var(--element-light);
1423+
}
1424+
1425+
body.dark-mode .example-file-item[data-extension="js"] .icon-small {
1426+
color: #d4c441; /* 다크모드에서 더 어둡게 */
12361427
}

0 commit comments

Comments
 (0)