diff --git a/src/components/page-header.ts b/src/components/page-header.ts index 04f3c0fe..13f5f72f 100644 --- a/src/components/page-header.ts +++ b/src/components/page-header.ts @@ -1,7 +1,8 @@ import hyper from "@macrostrat/hyper"; import { MacrostratIcon } from "./macrostrat-icon"; -import { Link } from "./buttons"; +import { DevLinkButton, Link } from "./buttons"; import styles from "./icon.module.sass"; +import { AnchorButton, ButtonGroup } from "@blueprintjs/core"; const h = hyper.styled(styles); @@ -49,3 +50,9 @@ export function Icon(props) { children, ]); } + +export function AssistantLinks({ children }) { + return h("div.float-right.padding.stick-to-top", [ + h(ButtonGroup, { vertical: true, large: true }, [children]), + ]); +} diff --git a/src/pages/columns/+Page.ts b/src/pages/columns/+Page.ts index 07220002..942b0582 100644 --- a/src/pages/columns/+Page.ts +++ b/src/pages/columns/+Page.ts @@ -1,13 +1,17 @@ import h from "@macrostrat/hyper"; import { ContentPage } from "~/layouts"; -import { PageHeader, Link } from "~/components"; -import { Tag } from "@blueprintjs/core"; +import { PageHeader, Link, AssistantLinks, DevLinkButton } from "~/components"; +import { AnchorButton, Tag } from "@blueprintjs/core"; import { usePageProps } from "~/renderer"; export function Page() { const { columnGroups, title, linkPrefix } = usePageProps(); return h(ContentPage, [ + h(AssistantLinks, [ + h(AnchorButton, { href: "/projects", minimal: true }, "Projects"), + h(DevLinkButton, { href: "/columns/correlation" }, "Correlation chart"), + ]), h(PageHeader, { title }), columnGroups.map((d) => h(ColumnGroup, { data: d, key: d.id, linkPrefix })), ]); diff --git a/src/pages/correlation/+Page.ts b/src/pages/columns/correlation/+Page.ts similarity index 99% rename from src/pages/correlation/+Page.ts rename to src/pages/columns/correlation/+Page.ts index b06676cf..bd75395d 100644 --- a/src/pages/correlation/+Page.ts +++ b/src/pages/columns/correlation/+Page.ts @@ -27,7 +27,7 @@ import { UnitSelectionProvider, useSelectedUnit, } from "@macrostrat/column-views"; -import { UnitDescription } from "~/pages/correlation/column"; +import { UnitDescription } from "~/pages/columns/correlation/column"; export function Page() { const startup = useCorrelationDiagramStore((state) => state.startup); diff --git a/src/pages/correlation/+config.ts b/src/pages/columns/correlation/+config.ts similarity index 88% rename from src/pages/correlation/+config.ts rename to src/pages/columns/correlation/+config.ts index 6a127bb9..61f09934 100644 --- a/src/pages/correlation/+config.ts +++ b/src/pages/columns/correlation/+config.ts @@ -10,5 +10,5 @@ export default { }, }, }, - title: "Correlation diagram", + title: "Correlation chart", }; diff --git a/src/pages/correlation/column.module.scss b/src/pages/columns/correlation/column.module.scss similarity index 100% rename from src/pages/correlation/column.module.scss rename to src/pages/columns/correlation/column.module.scss diff --git a/src/pages/correlation/column.ts b/src/pages/columns/correlation/column.ts similarity index 98% rename from src/pages/correlation/column.ts rename to src/pages/columns/correlation/column.ts index 9ea61f64..69a17832 100644 --- a/src/pages/correlation/column.ts +++ b/src/pages/columns/correlation/column.ts @@ -5,7 +5,7 @@ import { useColumn, } from "@macrostrat/column-components"; import { Timescale, TimescaleOrientation } from "@macrostrat/timescale"; -import { JSONView, useDarkMode } from "@macrostrat/ui-components"; +import { useDarkMode } from "@macrostrat/ui-components"; import classNames from "classnames"; import { useContext, useEffect, useMemo, useRef } from "react"; import { AgeAxis, useSelectedUnit } from "@macrostrat/column-views"; @@ -25,7 +25,7 @@ import { LegendPanelHeader, UnitDetailsPopover, } from "~/components/unit-details"; -import { useCorrelationDiagramStore } from "~/pages/correlation/state"; +import { useCorrelationDiagramStore } from "~/pages/columns/correlation/state"; export function MacrostratColumnProvider(props) { // A column provider specialized the Macrostrat API diff --git a/src/pages/correlation/correlation-chart.ts b/src/pages/columns/correlation/correlation-chart.ts similarity index 98% rename from src/pages/correlation/correlation-chart.ts rename to src/pages/columns/correlation/correlation-chart.ts index 8f5cd488..0881ffd8 100644 --- a/src/pages/correlation/correlation-chart.ts +++ b/src/pages/columns/correlation/correlation-chart.ts @@ -9,7 +9,7 @@ import { UnitLong } from "@macrostrat/api-types"; import { GapBoundPackage, SectionRenderData, AgeComparable } from "./types"; import h from "./main.module.sass"; -import { useCorrelationDiagramStore } from "~/pages/correlation/state"; +import { useCorrelationDiagramStore } from "~/pages/columns/correlation/state"; export interface ColumnIdentifier { col_id: number; diff --git a/src/pages/correlation/hash-string.ts b/src/pages/columns/correlation/hash-string.ts similarity index 100% rename from src/pages/correlation/hash-string.ts rename to src/pages/columns/correlation/hash-string.ts diff --git a/src/pages/correlation/main.module.sass b/src/pages/columns/correlation/main.module.sass similarity index 100% rename from src/pages/correlation/main.module.sass rename to src/pages/columns/correlation/main.module.sass diff --git a/src/pages/correlation/state.ts b/src/pages/columns/correlation/state.ts similarity index 100% rename from src/pages/correlation/state.ts rename to src/pages/columns/correlation/state.ts diff --git a/src/pages/correlation/types.ts b/src/pages/columns/correlation/types.ts similarity index 100% rename from src/pages/correlation/types.ts rename to src/pages/columns/correlation/types.ts diff --git a/src/pages/maps/+Page.ts b/src/pages/maps/+Page.ts index d01ace86..f9323702 100644 --- a/src/pages/maps/+Page.ts +++ b/src/pages/maps/+Page.ts @@ -1,23 +1,21 @@ import h from "./main.module.scss"; import { AnchorButton, ButtonGroup } from "@blueprintjs/core"; import { ContentPage } from "~/layouts"; -import { PageHeader, DevLinkButton } from "~/components"; +import { PageHeader, DevLinkButton, AssistantLinks } from "~/components"; import { usePageProps } from "~/renderer"; export function Page() { const { sources } = usePageProps(); return h(ContentPage, [ - h("div.float-right.padding.stick-to-top", [ - h(ButtonGroup, { vertical: true, large: true }, [ - h( - AnchorButton, - { icon: "flows", href: "/maps/ingestion" }, - "Ingestion system" - ), - h(AnchorButton, { icon: "map", href: "/map/sources" }, "Show on map"), - h(DevLinkButton, { href: "/maps/legend" }, "Legend table"), - ]), + h(AssistantLinks, [ + h( + AnchorButton, + { icon: "flows", href: "/maps/ingestion" }, + "Ingestion system" + ), + h(AnchorButton, { icon: "map", href: "/map/sources" }, "Show on map"), + h(DevLinkButton, { href: "/maps/legend" }, "Legend table"), ]), h(PageHeader, { title: "Maps" }), h(