|
1 | | - |
2 | | -const navItems = [ |
3 | | - { name: 'Home', href: '/', sections: [], sectionItemWidth: '', id: 'home' }, |
4 | | - { |
5 | | - name: 'Data Basics', // Category name to be shown in navigation bar |
6 | | - id: 'data', // id to be manipulated with js |
7 | | - href: '/info/data', // in case it should link anywhere |
8 | | - sections: [ // list items to be shown in its dropdown and where they link to |
9 | | - { name: 'Loading Data', href: '/data/loading/' }, |
10 | | - { name: 'Data Frames', href: '/data/dataframe/' }, |
11 | | - { name: 'Categorical Arrays', href: '/data/categorical/' }, |
12 | | - { name: 'Scientific Type', href: '/data/scitype/' }, |
13 | | - { name: 'Data processing', href: '/data/processing/' }, |
14 | | - ], |
15 | | - sectionItemWidth: 'short-item' |
16 | | - }, |
17 | | - { |
18 | | - name: 'Getting Started', |
19 | | - id: 'getting-started', |
20 | | - href: '/info/getting-started', |
21 | | - sections: [ |
22 | | - { name: 'Choosing a model', href: '/getting-started/choosing-a-model/' }, |
23 | | - { name: 'Fit, predict, transform', href: '/getting-started/fit-and-predict/' }, |
24 | | - { name: 'Model tuning', href: '/getting-started/model-tuning/' }, |
25 | | - { name: 'Ensembles', href: '/getting-started/ensembles/' }, |
26 | | - { name: 'Ensembles (2)', href: '/getting-started/ensembles-2/' }, |
27 | | - { name: 'Composing models', href: '/getting-started/composing-models/' }, |
28 | | - { name: 'Stacking', href: '/getting-started/stacking/' }, |
29 | | - ], |
30 | | - sectionItemWidth: 'medium-item' |
31 | | - }, |
32 | | - { |
33 | | - name: 'Intro to Stats Learning', |
34 | | - id: 'stats-learning', |
35 | | - href: '/info/isl', |
36 | | - sections: [ |
37 | | - { name: 'Lab 2', href: '/isl/lab-2/' }, |
38 | | - { name: 'Lab 3', href: '/isl/lab-3/' }, |
39 | | - { name: 'Lab 4', href: '/isl/lab-4/' }, |
40 | | - { name: 'Lab 5', href: '/isl/lab-5/' }, |
41 | | - { name: 'Lab 6b', href: '/isl/lab-6b/' }, |
42 | | - { name: 'Lab 8', href: '/isl/lab-8/' }, |
43 | | - { name: 'Lab 9', href: '/isl/lab-9/' }, |
44 | | - { name: 'Lab 10', href: '/isl/lab-10/' }, |
45 | | - ], |
46 | | - sectionItemWidth: 'long-item' |
47 | | - }, |
48 | | - |
49 | | - { |
50 | | - name: 'End to End', |
51 | | - id: 'end-to-end', |
52 | | - href: '/info/end-to-end', |
53 | | - sections: [ |
54 | | - { name: 'Telco Churn', href: '/end-to-end/telco/' }, |
55 | | - { name: 'AMES', href: '/end-to-end/AMES/' }, |
56 | | - { name: 'Wine', href: '/end-to-end/wine/' }, |
57 | | - { name: 'Crabs (XGB)', href: '/end-to-end/crabs-xgb/' }, |
58 | | - { name: 'Horse', href: '/end-to-end/horse/' }, |
59 | | - { name: 'King County Houses', href: '/end-to-end/HouseKingCounty/' }, |
60 | | - { name: 'Airfoil', href: '/end-to-end/airfoil' }, |
61 | | - { name: 'Boston (lgbm)', href: '/end-to-end/boston-lgbm' }, |
62 | | - { name: 'Using GLM.jl', href: '/end-to-end/glm/' }, |
63 | | - { name: 'Power Generation', href: '/end-to-end/powergen/' }, |
64 | | - { name: 'Boston (Flux)', href: '/end-to-end/boston-flux' }, |
65 | | - { name: 'Breast Cancer', href: '/end-to-end/breastcancer' }, |
66 | | - { name: 'Credit Fraud', href: '/end-to-end/creditfraud' }, |
67 | | - ], |
68 | | - sectionItemWidth: 'long-item' |
69 | | - }, |
70 | | - { |
71 | | - name: 'Advanced', |
72 | | - id: 'advanced', |
73 | | - href: '#!', |
74 | | - sections: [{ name: 'Ensembles (3)', href: '/advanced/ensembles-3' }], |
75 | | - sectionItemWidth: 'medium-item' |
76 | | - }, |
77 | | -]; |
| 1 | +import navItems from '../../routes.json' assert {type: 'json'}; |
78 | 2 |
|
79 | 3 | // first get info on whether hosted or not |
80 | 4 | const origin = window.location.origin; |
@@ -130,7 +54,7 @@ navItems.forEach((item) => { |
130 | 54 |
|
131 | 55 | // add a final li as searchform |
132 | 56 | let formAction = (hosted) ? origin + "/DataScienceTutorials.jl" + "/search/index.html" : "/search/index.html"; |
133 | | -searchForm = ` |
| 57 | +let searchForm = ` |
134 | 58 | <li> |
135 | 59 | <form id="lunrSearchForm" name="lunrSearchForm" style="margin-left: 1.5rem; margin-right: -2rem;"> |
136 | 60 | <input class="search-input" name="q" placeholder="Search..." type="text"> |
|
0 commit comments