File tree Expand file tree Collapse file tree 3 files changed +169
-0
lines changed
Expand file tree Collapse file tree 3 files changed +169
-0
lines changed Original file line number Diff line number Diff line change 1+ import {
2+ ColoredUnitComponent ,
3+ MacrostratDataProvider ,
4+ Column ,
5+ } from "@macrostrat/column-views" ;
6+ import { hyperStyled } from "@macrostrat/hyper" ;
7+ import { useCallback , useEffect , useMemo , useState } from "react" ;
8+ import { apiV2Prefix } from "@macrostrat-web/settings" ;
9+ import { PatternProvider } from "~/_providers" ;
10+ import { navigate } from "vike/client/router" ;
11+ import { PageBreadcrumbs } from "~/components" ;
12+ import { onDemand } from "~/_utils" ;
13+ import styles from "./index.module.sass" ;
14+ const h = hyperStyled ( styles ) ;
15+
16+
17+ const ColumnMap = onDemand ( ( ) => import ( "./map" ) . then ( ( mod ) => mod . ColumnMap ) ) ;
18+
19+ function dsf ( props ) {
20+ return h (
21+ MacrostratDataProvider ,
22+ { baseURL : apiV2Prefix } ,
23+ h ( PatternProvider , h ( ColumnPageInner , props ) )
24+ ) ;
25+ }
26+
27+ export function Page ( ) {
28+ return h ( "div.page-container" , [
29+ h ( ColumnMap , {
30+ className : "column-map" ,
31+ inProcess : true ,
32+ projectID : null ,
33+ selectedColumn : 1 ,
34+ onSelectColumn : ( ) => { } ,
35+ } ) ,
36+ ] )
37+ }
Original file line number Diff line number Diff line change 1+ .page-container
2+ overflow-y : scroll
3+ height : 100vh
4+ position : relative
5+
6+ .main
7+ --column-background-color : var(-- background- color)
8+ --column-stroke-color : var(-- text- color)
9+
10+ display : flex
11+ flex-direction : row
12+
13+ max-width : 80rem
14+ margin : 0 auto
15+
16+
17+ .left-column
18+ flex-grow : 1
19+
20+ .right-column
21+ min-width : 200px
22+ width : 40%
23+ max-width : 500px
24+ height : 100vh
25+ position : sticky
26+ top : 0
27+ display : flex
28+ flex-direction : column
29+ padding : 2em 0
30+
31+ .right-column-boxes
32+ display : flex
33+ flex-direction : column
34+ gap : 2em
35+
36+
37+ .column-view
38+ margin : 0 4em 4em
39+ padding : 0
40+
41+ .column-header
42+ margin : 1em 4em
43+
44+ h1
45+ font-size : 1.5em
46+
47+ .subtitle
48+ font-weight : normal
49+
50+ nav
51+ position : sticky
52+ top : 2em
53+
54+ .column-nav
55+ position : sticky
56+ top : 2.2em
57+
58+ h3
59+ color : #444
60+ margin-bottom : 0.3em
61+
62+ .default-buttons
63+ width : 100%
64+ margin : 0 -10px
65+
66+ .column-map
67+ width : 100%
68+ aspect-ratio : 3 / 2
69+ cursor : pointer
70+ z-index : 100
71+
72+ & .expanded
73+ cursor : inherit
74+
75+ .columns path :hover
76+ stroke : rgba(255 , 0 , 0 , .4 ) !important
77+
78+
79+ .close-button
80+ position : absolute
81+ top : 1em
82+ right : 1em
83+
84+ .land
85+ background-color : rgb (233, 252, 234 )
86+
87+ div .section
88+ display : flex
89+ flex-direction : row
90+
91+ div .timescale
92+ width : 7em
93+ --timescale-level-size : 1.5em
94+
95+
96+ .section .divisions .unit
97+ cursor : pointer
98+
99+ rect .selection-overlay
100+ fill : rgba(255 , 0 , 0 , .5 )
101+
102+ .unit-details-panel
103+ flex : 1
104+ min-height : 0
105+
106+ .column-map , .unit-details-panel
107+ box-shadow : 0 1px 3px 0 rgba(0 , 0 , 0 , 0.3 )
108+ border-radius : 6px
Original file line number Diff line number Diff line change 1+ import h from "@macrostrat/hyper" ;
2+ import { ColumnNavigationMap } from "@macrostrat/column-views" ;
3+ import { mapboxAccessToken } from "@macrostrat-web/settings" ;
4+ import { ErrorBoundary } from "@macrostrat/ui-components" ;
5+
6+ export function ColumnMap ( {
7+ projectID,
8+ inProcess,
9+ className,
10+ selectedColumn,
11+ onSelectColumn,
12+ } ) {
13+ return h (
14+ ErrorBoundary ,
15+ h ( ColumnNavigationMap , {
16+ className,
17+ inProcess,
18+ projectID,
19+ accessToken : mapboxAccessToken ,
20+ selectedColumn,
21+ onSelectColumn,
22+ } )
23+ ) ;
24+ }
You can’t perform that action at this time.
0 commit comments