presentation/views/architecture.view.ts
presentation/views/architecture.view.ts is a file in Bane's Lab Site. 51 lines of code and 4 definitions.
import {
ARCHITECTURE_DESCRIPTION,
ARCHITECTURE_TITLE,
CREATIVE_COMMONS_LICENSE,
} from "#configuration/strings/page.strings";
import { CREATIVE_COMMONS, SITE_URL, pagePath } from "#core/assets/link.assets";
import { mountTabSwitching, renderTabbedPage } from "#presentation/widgets/tab.widget";
import { ARCHITECTURE_META } from "#configuration/strings/tab.strings";
import { ARCHITECTURE_PAGE } from "#core/ids/page.ids";
import { ARCHITECTURE_TABS } from "#core/generated/architecture.page.generated";
import { ARCHITECTURE_TONE } from "#configuration/constants/tab.constants";
import { AUTHOR } from "#configuration/constants/schema.constants";
import type { PageDefinition } from "#types/page.types";
import type { SchemaEntity } from "#types/schema.types";
import type { TabbedPage } from "#types/tab.types";
const ARCHITECTURE_ENTITY: SchemaEntity = {
"@type": "CreativeWork",
author: AUTHOR,
description: ARCHITECTURE_DESCRIPTION,
license: CREATIVE_COMMONS,
name: ARCHITECTURE_META.title,
url: SITE_URL + pagePath(ARCHITECTURE_PAGE),
version: ARCHITECTURE_META.version,
};
const DEFINITION: TabbedPage = {
layout: "chapter",
meta: ARCHITECTURE_META,
page: ARCHITECTURE_PAGE,
tabs: ARCHITECTURE_TABS,
tone: ARCHITECTURE_TONE,
};
const renderArchitecture = function renderArchitecture(): Element {
return renderTabbedPage(DEFINITION);
};
void mountTabSwitching(DEFINITION);
export const PAGE: PageDefinition = {
article: true,
content: {
kind: "tabbed",
layout: DEFINITION.layout,
meta: ARCHITECTURE_META,
tabs: ARCHITECTURE_TABS,
tone: DEFINITION.tone,
},
description: ARCHITECTURE_DESCRIPTION,
entities: [ARCHITECTURE_ENTITY],
id: ARCHITECTURE_PAGE,
license: CREATIVE_COMMONS_LICENSE,
render: renderArchitecture,
title: ARCHITECTURE_TITLE,
};