Skip to content

Commit d3ebb0a

Browse files
committed
wip: visual testing
1 parent 085f71f commit d3ebb0a

File tree

6 files changed

+22
-2
lines changed

6 files changed

+22
-2
lines changed

src/components/logo/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ import LOGO from './assets/cd-labs-logo.png';
55

66
export function buildMainLogo() {
77
const logoContainer = document.createElement('div');
8+
const logoLink = document.createElement('a');
89
const logoImg = document.createElement('img');
910
const logoText = document.createElement('p');
1011

1112
logoContainer.className = 'main-logo';
1213

14+
logoLink.href = '/';
1315
logoImg.src = LOGO;
1416
logoImg.alt = "CD-Labs Logo";
1517

1618
logoText.textContent = "CD-Labs";
1719

18-
logoContainer.appendChild(logoImg);
20+
logoLink.appendChild(logoImg);
21+
logoContainer.appendChild(logoLink);
1922
logoContainer.appendChild(logoText);
2023

2124
return logoContainer;
2.39 MB
Loading

src/content/about/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { AboutPageContentStructure } from '../../views/about/';
22

3+
import MANIFESTO_IMG from './assets/manifesto-test.png';
4+
35
export const aboutContent: AboutPageContentStructure = {
46
manifesto: {
57
introTitle: "About cd-labs",
68
header: "The manifesto for <span class='highlight'>shorter games</span>",
9+
visualPath: MANIFESTO_IMG,
710
paragraphs: [
811
"Look at the achievements for any major blockbuster game. The trophy for completing the final chapter is often one of the rarest. The data tells a clear story: a huge percentage of players never see the credits roll.",
912
"It isn't a lack of passion; it's a lack of time. As our lives get busier, 100-hour epics filled with repetitive tasks begin to feel like a second job. The industry is selling promises of vast worlds that, for most people, will remain largely unexplored.",

src/views/about/aboutSection.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { writeParagraph, writeTitle, createWrapper } from "../utils";
33
export type AboutSectionContent = {
44
readonly introTitle?: string;
55
readonly header: string;
6+
readonly visualPath?: string;
67
readonly paragraphs: string[];
78
readonly alignment: 'left' | 'right';
89
}
@@ -12,6 +13,7 @@ export type AboutSectionContent = {
1213
export function createAboutSection(content: AboutSectionContent) {
1314
const section = document.createElement('section');
1415
const wrapper = createWrapper();
16+
const visual = document.createElement('img');
1517
const article = document.createElement('article');
1618

1719
section.className = `about-section ${content.alignment}`;
@@ -20,9 +22,15 @@ export function createAboutSection(content: AboutSectionContent) {
2022
article.appendChild(introTitle(content.introTitle));
2123
}
2224

25+
if (content.visualPath) {
26+
visual.src = content.visualPath;
27+
visual.alt = content.header;
28+
}
29+
2330
article.appendChild(writeTitle("h2", content.header));
2431
article.appendChild(sectionParagraphs(content.paragraphs));
2532

33+
wrapper.appendChild(visual);
2634
wrapper.appendChild(article);
2735
section.appendChild(wrapper);
2836

src/views/about/styles.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@
2323
padding: 160px 0;
2424
}
2525

26+
img {
27+
width: 75%;
28+
position: absolute;
29+
bottom: 0;
30+
left: 0;
31+
z-index: 2;
32+
}
2633
}

src/views/styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
flex-direction: column;
2626
justify-content: center;
2727
align-items: flex-start;
28-
padding: clamp(1rem, 5vw, 2rem);
2928
}
3029

3130
&.right article {

0 commit comments

Comments
 (0)