1
1
<!DOCTYPE html>
2
2
< html lang ="ko " class ="html ">
3
- < head >
4
- < link rel ="icon " href ="/src/assets/images/favicon.ico ">
5
- < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
- < title > youtube | Algoview</ title >
7
- < link rel ="stylesheet " href ="../../../src/css/common/reset.css " />
8
- < link rel ="stylesheet " href ="./style.css " />
9
- </ head >
10
- < body class ="body ">
11
- < header class ="headerContainer "> 헤더 파트 추가 예정</ header >
12
- < nav class ="referenceNavigationContainer ">
13
- < ul class ="navigationListWrapper ">
14
- < li class ="navigationItem active "> < a href ="# "> YouTube</ a > </ li >
15
- < li class ="navigationItem "> < a href ="# "> Practice</ a > </ li >
16
- </ ul >
17
- </ nav >
18
- < main class ="referenceContainer ">
19
- < h2 class ="referenceTitle "> YouTube</ h2 >
20
- < ul class ="youtubeListContainer " id ="youtubeListContainer ">
21
- <!-- Existing item -->
22
- </ ul >
23
- </ main >
24
- < footer > </ footer >
3
+ < head >
4
+ < link rel ="icon " href ="/src/assets/images/favicon.ico " />
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
+ < title > youtube | Algoview</ title >
7
+ < link rel ="stylesheet " href ="/src/css/common/header.css " />
8
+ < link rel ="stylesheet " href ="/src/css/common/reset.css " />
9
+ < link rel ="stylesheet " href ="./style.css " />
10
+ </ head >
11
+ < body class ="body ">
12
+ <!-- header -->
13
+ < header class ="header "> </ header >
14
+ <!-- !header -->
25
15
26
- <!-- 유튜버 리스트 추가 -->
27
- < script >
28
- async function loadMoreContent ( ) {
29
- const response = await fetch ( './youtuber.json' ) ;
30
- const data = await response . json ( ) ;
16
+ <!-- main -->
17
+ < main class ="main ">
18
+ <!-- sidebar -->
19
+ < div class ="sidebar ">
20
+ <!-- <nav class="referenceNavigationContainer"> -->
21
+ < ul class ="navigationListWrapper ">
22
+ < li class ="navigationItem active "> < a href ="# "> YouTube</ a > </ li >
23
+ < li class ="navigationItem "> < a href ="# "> Practice</ a > </ li >
24
+ </ ul >
25
+ <!-- </nav> -->
26
+ </ div >
27
+ <!-- !sidebar -->
31
28
32
- const youtubeList = document . getElementById ( 'youtubeListContainer' ) ;
29
+ <!-- mainContent -->
30
+ < section class ="referenceContainer ">
31
+ < h2 class ="referenceTitle "> YouTube</ h2 >
32
+ < ul class ="youtubeListContainer " id ="youtubeListContainer ">
33
+ <!-- Existing item -->
34
+ </ ul >
35
+ </ section >
36
+ <!-- !mainContent -->
37
+ </ main >
38
+ <!-- !main -->
33
39
34
- data . youtuber . forEach ( ( youtuber ) => {
35
- const newItem = document . createElement ( 'li' ) ;
36
- newItem . innerHTML = `
40
+ <!-- footer -->
41
+ < footer class ="footer "> </ footer >
42
+ <!-- !footer -->
43
+
44
+ <!-- Add Youtuber List -->
45
+ < script >
46
+ async function loadMoreContent ( ) {
47
+ const response = await fetch ( './youtuber.json' ) ;
48
+ const data = await response . json ( ) ;
49
+
50
+ const youtubeList = document . getElementById ( 'youtubeListContainer' ) ;
51
+
52
+ data . youtuber . forEach ( ( youtuber ) => {
53
+ const newItem = document . createElement ( 'li' ) ;
54
+ newItem . innerHTML = `
37
55
<a href="${ youtuber . link } " class="youtubeItem" target="_blank">
38
56
<img src="${ youtuber . img } " alt="hi" class="youtubeImage" />
39
57
<div class="listInformation">
@@ -43,17 +61,24 @@ <h3 class="youtubeTitle">${youtuber.title}</h3>
43
61
</div>
44
62
</a>
45
63
` ;
46
- youtubeList . appendChild ( newItem ) ;
47
- } ) ;
48
- }
64
+ youtubeList . appendChild ( newItem ) ;
65
+ } ) ;
66
+ }
49
67
50
- loadMoreContent ( ) ;
51
- </ script >
52
- <!-- footer 추가 -->
53
- < script type ="module ">
54
- import { footerHTML } from '/src/js/footer.js' ;
55
- const footer = document . querySelector ( 'footer' ) ;
56
- footer . innerHTML = footerHTML ( ) ;
57
- </ script >
58
- </ body >
59
- </ html >
68
+ loadMoreContent ( ) ;
69
+ </ script >
70
+ <!-- !Add Youtuber List -->
71
+ <!-- Create Components -->
72
+ < script type ="module ">
73
+ // Create Header
74
+ import { headerHTML , onClickHeader } from '/src/js/header.js' ;
75
+ headerHTML ( ) ;
76
+ onClickHeader ( ) ;
77
+ // Create Footer
78
+ import { footerHTML } from '/src/js/footer.js' ;
79
+ const footer = document . querySelector ( '.footer' ) ;
80
+ footer . innerHTML = footerHTML ( ) ;
81
+ </ script >
82
+ <!-- !Create Components -->
83
+ </ body >
84
+ </ html >
0 commit comments