1
- import { createThreeBackground , writeParagraph , writeTitle } from "./utils" ;
2
- import { BackgroundChoice } from "../components/three-background" ;
3
- import { cdCover } from "../components/cd-cover" ;
1
+ import { createWrapper , writeParagraph , writeTitle } from "./utils" ;
4
2
5
3
export type HomePageContent = {
6
4
readonly title : string ;
@@ -10,37 +8,38 @@ export type HomePageContent = {
10
8
// --------------------------------------------------------------------------------
11
9
12
10
export function homeView ( ) {
13
- const article = document . createElement ( 'article ' ) ;
14
- const introBlock = document . createElement ( 'div' ) ;
15
- const pageTitle = writeTitle ( "h1" , "pick a track" ) ;
16
- const pageText = writeParagraph ( "Welcome to my hub! I’m CD-BASH, a creative developer based in Montreal." ) ;
11
+ const page = document . createElement ( 'div ' ) ;
12
+ page . id = 'home-page' ;
13
+
14
+ page . appendChild ( hookSection ( ) ) ;
17
15
18
- article . id = 'home-page' ;
19
- introBlock . className = 'intro-block' ;
20
16
21
- createThreeBackground ( BackgroundChoice . Home ) ;
22
- introBlock . appendChild ( pageTitle ) ;
23
- introBlock . appendChild ( pageText ) ;
24
- article . appendChild ( introBlock ) ;
25
- article . appendChild ( cdCoverSelection ( ) ) ;
26
17
27
- return article ;
18
+ return page ;
28
19
}
29
20
30
21
// --------------------------------------------------------------------------------
31
22
32
- function cdCoverSelection ( ) {
33
- const cdCovers = document . createElement ( 'div' ) ;
34
- cdCovers . className = 'cd-covers-selection' ;
23
+ function hookSection ( ) {
24
+ const hook = document . createElement ( 'section' ) ;
25
+ const wrapper = createWrapper ( ) ;
26
+ const article = document . createElement ( 'article' ) ;
27
+ const hookTitle = writeTitle ( "h1" , "When was the last time you finished a game?" ) ;
28
+ const hookText = writeParagraph ( "CD-Labs’ initiative is to design complete gaming experiences for busy lives." ) ;
29
+ const arrowDownBtn = document . createElement ( 'button' ) ;
35
30
36
- const projectCover = cdCover ( ) ;
37
- const aboutCover = cdCover ( ) ;
38
- const logsCover = cdCover ( ) ;
31
+ hook . className = 'hook' ;
32
+ hookTitle . className = "hook-title" ;
33
+ hookText . className = "hook-text" ;
39
34
40
- cdCovers . appendChild ( projectCover ) ;
41
- cdCovers . appendChild ( aboutCover ) ;
42
- cdCovers . appendChild ( logsCover ) ;
35
+ article . appendChild ( hookTitle ) ;
36
+ article . appendChild ( hookText ) ;
37
+ article . appendChild ( arrowDownBtn ) ;
38
+ wrapper . appendChild ( article ) ;
39
+ hook . appendChild ( wrapper ) ;
43
40
44
- return cdCovers ;
41
+ return hook ;
45
42
}
46
43
44
+
45
+
0 commit comments