Skip to content

Commit 17cb1fe

Browse files
committed
feat: [#93] founder section
1 parent a67bbe6 commit 17cb1fe

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

src/content/home/index.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ import HOOK_VIDEO_MP4 from './assets/cd-labs-home-page-hook-animation.mp4';
66
import PHILOSOPHY_BG from './assets/philosophy-background-temp.png';
77

88
export const homePageContent: HomePageContentStructure = {
9-
hookHeading: "When was the last time you <span class='highlight'>finished</span> a game?",
10-
hookBody: "CD-Labs’ initiative is to design <b>complete</b> gaming experiences for <b>busy lives</b>.",
11-
hookVideoWebm: HOOK_VIDEO_WEBM,
12-
hookVideoMp4: HOOK_VIDEO_MP4,
9+
hook: {
10+
header: "When was the last time you <span class='highlight'>finished</span> a game?",
11+
body: "CD-Labs’ initiative is to design <b>complete</b> gaming experiences for <b>busy lives</b>.",
12+
videoWebem: HOOK_VIDEO_WEBM,
13+
videoMp4: HOOK_VIDEO_MP4,
14+
},
1315

16+
// ------------------------------------------------------------------------
1417
philosophy: {
1518
sectionBG: PHILOSOPHY_BG,
1619
header: "Games that respect <span class='highlight'>your time.</span>",
@@ -27,6 +30,7 @@ export const homePageContent: HomePageContentStructure = {
2730
alignment: 'left'
2831
},
2932

33+
// ------------------------------------------------------------------------
3034
teaser: {
3135
sectionBG: PHILOSOPHY_BG,
3236

@@ -45,7 +49,23 @@ export const homePageContent: HomePageContentStructure = {
4549
],
4650

4751
alignment: 'right'
48-
}
52+
},
53+
54+
// ------------------------------------------------------------------------
55+
founder: {
56+
sectionBG: PHILOSOPHY_BG,
57+
header: "Who is <span class='highlight'>CD</span>?",
58+
59+
paragraphs: [
60+
"Hi, I'm CD. After more than a decade as a professional designer and developer in marketing, web, and the AAA games industry, I decided to take a different path. I left the world of blockbuster recipes behind to focus on what I love most: crafting truly unique gameplay ideas.",
61+
"My goal with cd-labs is simple: to bring back that classic feeling of seeing a story through to its conclusion. I design my games to leave you feeling satisfied and inspired, not drained by an endless time commitment.",
62+
],
4963

64+
buttons: [
65+
{ text: "Let's connect", path: "#", styleType: "primary" },
66+
{ text: "Read my story", path: "#", styleType: "secondary" },
67+
],
5068

69+
alignment: 'left'
70+
}
5171
}

src/views/home/index.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ import {arrowButton, createVideoBackground, createWrapper, writeParagraph, write
33
import {SectionContent, createContentSection} from "./contentSection";
44
import {homePageContent} from "../../content/home";
55

6-
76
export type HomePageContentStructure = {
8-
readonly hookHeading: string;
9-
readonly hookBody: string;
10-
readonly hookVideoWebm: string;
11-
readonly hookVideoMp4: string;
7+
readonly hook: HookContent;
128
readonly philosophy: SectionContent;
139
readonly teaser: SectionContent;
10+
readonly founder: SectionContent;
11+
}
12+
13+
type HookContent = {
14+
readonly header: string;
15+
readonly body: string;
16+
readonly videoWebem: string;
17+
readonly videoMp4: string;
1418
}
1519

1620
// --------------------------------------------------------------------------------
@@ -19,31 +23,27 @@ export function homeView() {
1923
const page = document.createElement('div');
2024
page.id = 'home-page';
2125

22-
page.appendChild(hookSection());
26+
page.appendChild(hookSection(homePageContent.hook));
2327
page.appendChild(createContentSection(homePageContent.philosophy));
2428
page.appendChild(createContentSection(homePageContent.teaser));
29+
page.appendChild(createContentSection(homePageContent.founder));
2530

2631
return page;
2732
}
2833

2934
// --------------------------------------------------------------------------------
3035

31-
function hookSection() {
36+
function hookSection(content: HookContent) {
3237
const hook = document.createElement('section');
33-
const videoBg = createVideoBackground(homePageContent.hookVideoWebm, homePageContent.hookVideoMp4);
38+
const videoBg = createVideoBackground(content.videoWebem, content.videoMp4);
3439
const wrapper = createWrapper();
3540
const article = document.createElement('article');
36-
const hookTitle = writeTitle("h1", homePageContent.hookHeading);
37-
const hookText = writeParagraph(homePageContent.hookBody);
38-
const arrowDownBtn = arrowButton();
3941

4042
hook.className = 'hook';
41-
hookTitle.className = "hook-title";
42-
hookText.className = "hook-text";
4343

44-
article.appendChild(hookTitle);
45-
article.appendChild(hookText);
46-
article.appendChild(arrowDownBtn);
44+
article.appendChild(writeTitle("h1", content.header));
45+
article.appendChild(writeParagraph(content.body));
46+
article.appendChild(arrowButton());
4747
wrapper.appendChild(article);
4848
hook.appendChild(videoBg);
4949
hook.appendChild(wrapper);

src/views/home/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
align-items: center;
4141
height: 100vh;
4242

43-
.hook-text {
43+
p {
4444
font-size: 1.5em;
4545
margin-top: 75px;
4646
margin-bottom: 20px;

0 commit comments

Comments
 (0)