@@ -8,76 +8,79 @@ const baseDir = "./build";
8
8
let htmlContent = `
9
9
<!DOCTYPE html>
10
10
<html lang="en">
11
- <head>
12
- <meta charset="UTF-8">
13
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
14
- <title>Project Index</title>
15
- <style>
16
- body {
17
- font-family: Arial, sans-serif;
18
- margin: 20px;
19
- background-color: #f9f9f9;
20
- color: #333;
21
- }
22
- h1 {
23
- text-align: center;
24
- color: #4CAF50;
25
- }
26
- ul {
27
- list-style-type: none;
28
- padding-left: 20px;
29
- }
30
- ul ul {
31
- padding-left: 20px;
32
- border-left: 1px solid #ccc;
33
- }
34
- li {
35
- margin: 5px 0;
36
- }
37
- a {
38
- text-decoration: none;
39
- color: #4CAF50;
40
- font-weight: bold;
41
- }
42
- a:hover {
43
- color: #333;
44
- }
45
- .folder::before {
46
- content: "📁 ";
47
- font-size: 16px;
48
- }
49
- .file::before {
50
- content: "📄 ";
51
- font-size: 16px;
52
- }
53
- .container {
54
- max-width: 600px;
55
- margin: 0 auto;
56
- background-color: #fff;
57
- padding: 20px;
58
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
59
- }
60
- </style>
61
- </head>
62
- <body>
63
- <div class="container">
64
- <h1>Project Index</h1>
65
- <ul>
11
+ <head>
12
+ <meta charset="UTF-8" />
13
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
14
+ <link rel="preconnect" href="https://cdn.jsdelivr.net" />
15
+ <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
16
+ <link
17
+ href="https://cdn.jsdelivr.net/gh/toss/tossface/dist/tossface.css"
18
+ rel="stylesheet"
19
+ type="text/css"
20
+ />
21
+ <title>KUIT FE</title>
22
+ <style>
23
+ body {
24
+ font-family: Arial, sans-serif;
25
+ margin: 20px;
26
+ background-color: #fff;
27
+ }
28
+ h1 {
29
+ color: #1a1a1a;
30
+ }
31
+ ul {
32
+ list-style-type: none;
33
+ }
34
+ ul ul {
35
+ padding-left: 20px;
36
+ }
37
+ li {
38
+ margin: 10px 0;
39
+ }
40
+ .folder {
41
+ font-size: 14px;
42
+ color: #1a1a1a;
43
+ }
44
+ a {
45
+ text-decoration: none;
46
+ color: #2c2c2c;
47
+ }
48
+ .container {
49
+ max-width: 600px;
50
+ margin: 0 auto;
51
+ background-color: #fff;
52
+ padding: 20px;
53
+ }
54
+ .tossface {
55
+ font-family: Tossface;
56
+ }
57
+ </style>
58
+ </head>
59
+ <body>
60
+ <div class="container">
61
+ <h1>Kuit Frontend Missions ✨</h1>
62
+ <ul>
66
63
` ;
67
64
68
65
// 주차별로 디렉토리를 탐색
69
66
const weeks = fs . readdirSync ( baseDir ) ;
70
67
weeks . forEach ( ( week ) => {
71
68
const weekPath = path . join ( baseDir , week ) ;
72
69
if ( fs . lstatSync ( weekPath ) . isDirectory ( ) ) {
73
- htmlContent += `<li class="folder">${ week } <ul>\n` ;
70
+ htmlContent += `<li class="folder">
71
+ <span class="tossface">📂</span> ${ week }
72
+ <ul>\n` ;
74
73
75
74
// 주차별 하위 프로젝트 탐색
76
75
const projects = fs . readdirSync ( weekPath ) ;
77
76
projects . forEach ( ( project ) => {
78
77
const projectPath = path . join ( weekPath , project ) ;
79
78
if ( fs . lstatSync ( projectPath ) . isDirectory ( ) ) {
80
- htmlContent += `<li class="file"><a href="/${ week } /${ project } ">${ project } </a></li>\n` ;
79
+ htmlContent += `<li class="tossface">
80
+ <a href="KUIT4_Web-FrontEnd/${ week } /${ project } "
81
+ ><span class="tossface">📄</span> ${ project } </a
82
+ >
83
+ </li>\n` ;
81
84
}
82
85
} ) ;
83
86
0 commit comments