1
- import { ANCHOR_TARGET } from "@databiosphere/findable-ui/lib/components/Links/common/entities" ;
2
1
import * as C from "../../../app/components/index" ;
3
- import { socialMedia , SOCIALS } from "../../anvil/dev/socialMedia" ;
2
+ import { socialMedia } from "../../anvil/dev/socialMedia" ;
4
3
import { SiteConfig } from "../../common/entities" ;
5
4
import {
6
5
ANVIL_CATALOG_CATEGORY_KEY ,
7
6
ANVIL_CATALOG_CATEGORY_LABEL ,
8
7
} from "../category" ;
8
+ import { PORTAL_ROUTES , ROUTES } from "./common/constants" ;
9
9
import { exportConfig } from "./export/export" ;
10
10
import { consortiaEntityConfig } from "./index/consortiaEntityConfig" ;
11
11
import { studiesEntityConfig } from "./index/studiesEntityConfig" ;
12
12
import { workspaceEntityConfig } from "./index/workspaceEntityConfig" ;
13
+ import { buildNavigation as buildFooterNavigation } from "./layout/footer/navigation/navigation" ;
14
+ import { buildNavigation } from "./layout/header/navigation/navigation" ;
13
15
14
16
// Template constants
15
17
const APP_TITLE = "AnVIL Dataset Catalog" ;
16
18
const BROWSER_URL = "https://anvilproject.dev.clevercanary.com" ;
17
19
const EXPLORER_URL = "https://explore.anvilproject.dev.clevercanary.com" ;
18
- const HOME_PAGE_PATH = "/consortia" ;
20
+ const HOME_PAGE_PATH = ROUTES . CONSORTIA ;
19
21
const PORTAL_URL = "https://anvilproject.dev.clevercanary.com" ;
20
22
const SLOGAN = "NHGRI Analysis Visualization and Informatics Lab-space" ;
21
23
@@ -87,16 +89,7 @@ export function makeConfig(
87
89
layout : {
88
90
footer : {
89
91
Branding : C . ANVILBranding ( { portalURL : undefined } ) ,
90
- navLinks : [
91
- {
92
- label : "Help" ,
93
- url : `${ portalUrl } /help` ,
94
- } ,
95
- {
96
- label : "Privacy" ,
97
- url : `${ portalUrl } /privacy` ,
98
- } ,
99
- ] ,
92
+ navLinks : buildFooterNavigation ( portalUrl ) ,
100
93
socials : socialMedia . socials ,
101
94
} ,
102
95
header : {
@@ -107,106 +100,9 @@ export function makeConfig(
107
100
link : portalUrl ,
108
101
src : "/images/logoAnvil.png" ,
109
102
} ) ,
110
- navigation : [
111
- undefined ,
112
- [
113
- {
114
- label : "Overview" ,
115
- url : `${ portalUrl } /overview` ,
116
- } ,
117
- {
118
- label : "Learn" ,
119
- url : `${ portalUrl } /learn` ,
120
- } ,
121
- {
122
- label : "Datasets" ,
123
- menuItems : [
124
- {
125
- description :
126
- "An open-access view of studies, workspaces, and consortia." ,
127
- label : "Catalog" ,
128
- url : HOME_PAGE_PATH ,
129
- } ,
130
- {
131
- description :
132
- "Build, download, and export cross-study cohorts of open and managed access data." ,
133
- label : C . LabelIconMenuItem ( {
134
- iconFontSize : "small" ,
135
- label : "Explorer" ,
136
- } ) ,
137
- target : ANCHOR_TARGET . BLANK ,
138
- url : `${ explorerUrl } /datasets` ,
139
- } ,
140
- ] ,
141
- url : "" ,
142
- } ,
143
- {
144
- label : "Consortia" ,
145
- url : `${ portalUrl } /consortia` ,
146
- } ,
147
- {
148
- label : "More" ,
149
- menuItems : [
150
- {
151
- label : "News" ,
152
- url : `${ portalUrl } /news` ,
153
- } ,
154
- {
155
- label : "Events" ,
156
- url : `${ portalUrl } /events` ,
157
- } ,
158
- {
159
- label : "Team" ,
160
- url : `${ portalUrl } /team` ,
161
- } ,
162
- {
163
- label : "FAQ" ,
164
- url : `${ portalUrl } /faq` ,
165
- } ,
166
- {
167
- label : "Help" ,
168
- url : `${ portalUrl } /help` ,
169
- } ,
170
- {
171
- label : "Follow Us" ,
172
- menuItems : [
173
- {
174
- ...SOCIALS . DISCOURSE ,
175
- icon : C . DiscourseIcon ( { fontSize : "small" } ) ,
176
- target : ANCHOR_TARGET . BLANK ,
177
- } ,
178
- {
179
- ...SOCIALS . X ,
180
- icon : C . XIcon ( { fontSize : "small" } ) ,
181
- target : ANCHOR_TARGET . BLANK ,
182
- } ,
183
- {
184
- ...SOCIALS . YOUTUBE ,
185
- icon : C . YouTubeIcon ( { fontSize : "small" } ) ,
186
- target : ANCHOR_TARGET . BLANK ,
187
- } ,
188
- {
189
- ...SOCIALS . GITHUB ,
190
- icon : C . GitHubIcon ( { fontSize : "small" } ) ,
191
- target : ANCHOR_TARGET . BLANK ,
192
- } ,
193
- {
194
- ...SOCIALS . SLACK ,
195
- icon : C . SlackIcon ( { fontSize : "small" } ) ,
196
- target : ANCHOR_TARGET . BLANK ,
197
- } ,
198
- ] ,
199
- url : "" ,
200
- visible : { lg : false , sm : false , xs : false } ,
201
- } ,
202
- ] ,
203
- url : "" ,
204
- } ,
205
- ] ,
206
- undefined ,
207
- ] ,
103
+ navigation : buildNavigation ( portalUrl , explorerUrl ) ,
208
104
searchEnabled : true ,
209
- searchURL : `${ portalUrl } /search ` ,
105
+ searchURL : `${ portalUrl } ${ PORTAL_ROUTES . SEARCH } ` ,
210
106
slogan : SLOGAN ,
211
107
socialMedia,
212
108
} ,
0 commit comments