Skip to content

Commit 8307651

Browse files
authored
feat: [#33] single page navigation
* feat: added next-ux for testing * wip: why is this such a pain * wip: into something with simple routing system * wip: routes are going somewhere * chore: exploded evrything back to square 1 * wip: still progressing * fix: interactive view clear wrapper now * feat: single page navigation system
1 parent d21886e commit 8307651

29 files changed

+207
-162
lines changed

src/components/thumbnail/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import './styles.css';
2-
import {EventBus} from "../../event-bus";
3-
import {Events} from "../../consts/events";
4-
import {handlers} from "../../consts/handlers";
2+
import {EVENT_BUS} from "../../core";
53

6-
const EVENT_BUS = new EventBus<Events>();
7-
EVENT_BUS.subscribe('page_navigation', handlers.page_navigation);
84

95
export type thumbnailContent = {
106
readonly thumbnail: string;
@@ -45,7 +41,9 @@ export function createThumbnail(content: thumbnailContent, showcase: boolean) {
4541
itemTexts.appendChild(itemCategory);
4642
itemBox.appendChild(clearFix);
4743

48-
itemThumbnail.addEventListener('click', () => EVENT_BUS.dispatch('page_navigation', {path: "Button A", pageReference: content.path}));
44+
itemThumbnail.addEventListener('click', () => {
45+
EVENT_BUS.dispatch('page_navigation', { pageReference: 'interactive/' + content.path });
46+
});
4947

5048
return itemBox;
5149
}

src/consts/events/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/consts/handlers/handlers.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/consts/handlers/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/content/projects/index.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import {projectView} from "../../views/project-view";
1+
import {projectView, renderView} from "../../views";
22
import {projectInfo} from "../../components/vertical-nav/info-project.ts";
3-
import {renderView} from "../../views/utils";
43
import {renderBreadcrumbs, renderNavInfo} from "../../components/vertical-nav";
54
import {createThumbnail} from "../../components/thumbnail";
65
import {BreadcrumbCategory, breadcrumbs, BreadcrumbsLink} from "../../components/breadcrumbs";
76

87
import * as spaceCompass from "./space-compass";
8+
import * as nextUx from "./next-ux";
9+
import {interactiveView} from "../../views/interactive.ts";
910

1011

1112

1213
const pageReferences: { [key: string]: any } = {
1314
"space-compass": spaceCompass,
15+
"next-ux": nextUx,
1416
};
1517

1618

@@ -32,6 +34,13 @@ export function buildProjectPage(pageReference: string) {
3234
renderView(viewContent);
3335
}
3436

37+
export function buildInteractivePage() {
38+
const viewContent = interactiveView();
39+
40+
renderView(viewContent);
41+
42+
}
43+
3544
export function buildThumbnailList() {
3645
const list = document.createElement('ul');
3746

159 KB
Loading
114 KB
Loading
112 KB
Loading
106 KB
Loading
17.8 MB
Binary file not shown.

0 commit comments

Comments
 (0)