Skip to content

Commit 41504cf

Browse files
committed
various issues
1 parent 16da3ff commit 41504cf

File tree

3 files changed

+150
-121
lines changed

3 files changed

+150
-121
lines changed

src/biorepo_components/BiorepoChecklistsContent.jsx

Lines changed: 70 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -86,66 +86,76 @@ export default function BiorepoChecklistsContent() {
8686
}, []);
8787

8888
return (
89-
<div id="callout-cards">
90-
<Grid container spacing={7}>
91-
<Grid item xs={4}>
92-
<Card variant="outlined">
93-
<CardMedia
94-
component="img"
95-
image="../images/card-images/IMG_9506.jpg"
96-
title="Repositories"
97-
height="auto"
98-
loading="lazy"
99-
/>
100-
<CardContent>
101-
<Typography variant="h5" style={{ marginBottom: 20 }}>
102-
Invertebrates
103-
</Typography>
104-
<div>
105-
{renderNode(invertebrateNodesData)}
106-
</div>
107-
</CardContent>
108-
</Card>
109-
</Grid>
110-
<Grid item xs={4}>
111-
<Card variant="outlined">
112-
<CardMedia
113-
component="img"
114-
image="../images/card-images/20210913NEONBioRepository_088.jpg"
115-
title="Repositories"
116-
height="auto"
117-
loading="lazy"
118-
/>
119-
<CardContent>
120-
<Typography variant="h5" style={{ marginBottom: 20 }}>
121-
Plants & Algae
122-
</Typography>
123-
<div>
124-
{renderNode(plantNodesData)}
125-
</div>
126-
</CardContent>
127-
</Card>
128-
</Grid>
129-
<Grid item xs={4}>
130-
<Card variant="outlined">
131-
<CardMedia
132-
component="img"
133-
image="../images/card-images/IMG_9530.jpg"
134-
title="Collections"
135-
height="auto"
136-
loading="lazy"
137-
/>
138-
<CardContent>
139-
<Typography variant="h5" style={{ marginBottom: 20 }}>
140-
Vertebrates
141-
</Typography>
142-
<div>
143-
{renderNode(vertebrateNodesData)}
144-
</div>
145-
</CardContent>
146-
</Card>
89+
<>
90+
<style>
91+
{`
92+
html, body {
93+
font-family: "Inter", Helvetica, Arial, sans-serif !important;
94+
}
95+
`}
96+
</style>
97+
98+
<div id="callout-cards">
99+
<Grid container spacing={7}>
100+
<Grid item xs={4}>
101+
<Card variant="outlined">
102+
<CardMedia
103+
component="img"
104+
image="../images/card-images/IMG_9506.jpg"
105+
title="Repositories"
106+
height="auto"
107+
loading="lazy"
108+
/>
109+
<CardContent>
110+
<Typography variant="h5" style={{ marginBottom: 20 }}>
111+
Invertebrates
112+
</Typography>
113+
<div>
114+
{renderNode(invertebrateNodesData)}
115+
</div>
116+
</CardContent>
117+
</Card>
118+
</Grid>
119+
<Grid item xs={4}>
120+
<Card variant="outlined">
121+
<CardMedia
122+
component="img"
123+
image="../images/card-images/20210913NEONBioRepository_088.jpg"
124+
title="Repositories"
125+
height="auto"
126+
loading="lazy"
127+
/>
128+
<CardContent>
129+
<Typography variant="h5" style={{ marginBottom: 20 }}>
130+
Plants & Algae
131+
</Typography>
132+
<div>
133+
{renderNode(plantNodesData)}
134+
</div>
135+
</CardContent>
136+
</Card>
137+
</Grid>
138+
<Grid item xs={4}>
139+
<Card variant="outlined">
140+
<CardMedia
141+
component="img"
142+
image="../images/card-images/IMG_9530.jpg"
143+
title="Collections"
144+
height="auto"
145+
loading="lazy"
146+
/>
147+
<CardContent>
148+
<Typography variant="h5" style={{ marginBottom: 20 }}>
149+
Vertebrates
150+
</Typography>
151+
<div>
152+
{renderNode(vertebrateNodesData)}
153+
</div>
154+
</CardContent>
155+
</Card>
156+
</Grid>
147157
</Grid>
148-
</Grid>
149-
</div>
158+
</div>
159+
</>
150160
);
151161
}

src/biorepo_components/BiorepoCollectionPageContent.jsx

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,33 @@ export default function BiorepoCollectionPageContent() {
3737
}, []);
3838

3939
return (
40-
<div>
41-
{filteredSpecs.length > 0 ? (
42-
filteredSpecs.map((spec, index) => (
43-
<DocumentListItem
44-
key={spec.specId || index}
45-
document={{
46-
name: spec.specNumber, // Document name
47-
type: spec.specType || 'application/pdf', // Default to PDF
48-
size: spec.specSize || 0, // Default size
49-
description: spec.specDescription, // Description
50-
}}
51-
containerComponent="div"
52-
enableDownloadButton
53-
/>
54-
))
55-
) : (
56-
<p></p>
57-
)}
58-
</div>
40+
<>
41+
<style>
42+
{`
43+
html, body {
44+
font-family: "Inter", Helvetica, Arial, sans-serif !important;
45+
}
46+
`}
47+
</style>
48+
<div>
49+
{filteredSpecs.length > 0 ? (
50+
filteredSpecs.map((spec, index) => (
51+
<DocumentListItem
52+
key={spec.specId || index}
53+
document={{
54+
name: spec.specNumber, // Document name
55+
type: spec.specType || 'application/pdf', // Default to PDF
56+
size: spec.specSize || 0, // Default size
57+
description: spec.specDescription, // Description
58+
}}
59+
containerComponent="div"
60+
enableDownloadButton
61+
/>
62+
))
63+
) : (
64+
<p></p>
65+
)}
66+
</div>
67+
</>
5968
);
6069
}

src/biorepo_components/BiorepoCollectionsContent.jsx

Lines changed: 52 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default function BiorepoCollectionsContent() {
107107
}, []);
108108

109109
useEffect(() => {
110-
fetch('../../neon-react/biorepo_lib/collections-sampletype.json')
110+
fetch('../../neon-react/biorepo_lib/collections-protocol.json')
111111
.then((response) => response.json())
112112
.then((data) => {
113113
setSampletypeNodes(data);
@@ -116,7 +116,7 @@ export default function BiorepoCollectionsContent() {
116116
}, []);
117117

118118
useEffect(() => {
119-
fetch('../../neon-react/biorepo_lib/collections-protocol.json')
119+
fetch('../../neon-react/biorepo_lib/collections-sampletype.json')
120120
.then((response) => response.json())
121121
.then((data) => {
122122
setProtocolNodes(data);
@@ -125,48 +125,58 @@ export default function BiorepoCollectionsContent() {
125125
}, []);
126126

127127
return (
128-
<div>
129-
<Box sx={{ width: '100%' }}>
130-
<Typography variant="h3">
131-
Browse Sample Types
132-
</Typography>
133-
<Box sx={{ paddingTop: '30px', paddingBottom: '30px' }}>
134-
<Typography variant="body1">
135-
Use the tabs and dropdowns to explore the types of samples NEON offers, and view their data, records, and statistics.
128+
<>
129+
<style>
130+
{`
131+
html, body {
132+
font-family: "Inter", Helvetica, Arial, sans-serif !important;
133+
}
134+
`}
135+
</style>
136+
137+
<div>
138+
<Box sx={{ width: '100%' }}>
139+
<Typography variant="h3">
140+
Browse Sample Types
136141
</Typography>
142+
<Box sx={{ paddingTop: '30px', paddingBottom: '30px' }}>
143+
<Typography variant="body1">
144+
Use the tabs and dropdowns to explore the types of samples NEON offers, and view their data, records, and statistics.
145+
</Typography>
146+
</Box>
137147
</Box>
138-
</Box>
139-
<Box sx={{ width: '100%' }}>
140-
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
141-
<Tabs
142-
value={value}
143-
onChange={handleChange}
144-
textColor="primary"
145-
indicatorColor="primary"
146-
aria-label="collections-tabs"
147-
variant="fullWidth"
148-
>
149-
<Tab label="Organized by Taxonomic Group" {...a11yProps(0)} />
150-
<Tab label="Organized by Protocol" {...a11yProps(2)} />
151-
<Tab label="Organized by Preservation Method" {...a11yProps(1)} />
152-
</Tabs>
148+
<Box sx={{ width: '100%' }}>
149+
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
150+
<Tabs
151+
value={value}
152+
onChange={handleChange}
153+
textColor="primary"
154+
indicatorColor="primary"
155+
aria-label="collections-tabs"
156+
variant="fullWidth"
157+
>
158+
<Tab label="Organized by Taxonomic Group" {...a11yProps(0)} />
159+
<Tab label="Organized by Protocol" {...a11yProps(2)} />
160+
<Tab label="Organized by Preservation Method" {...a11yProps(1)} />
161+
</Tabs>
162+
</Box>
163+
<CustomTabPanel value={value} index={0}>
164+
<div>
165+
{renderNode(taxonomicNodesData)}
166+
</div>
167+
</CustomTabPanel>
168+
<CustomTabPanel value={value} index={2}>
169+
<div>
170+
{renderNode(protocolNodesData)}
171+
</div>
172+
</CustomTabPanel>
173+
<CustomTabPanel value={value} index={1}>
174+
<div>
175+
{renderNode(sampletypeNodesData)}
176+
</div>
177+
</CustomTabPanel>
153178
</Box>
154-
<CustomTabPanel value={value} index={0}>
155-
<div>
156-
{renderNode(taxonomicNodesData)}
157-
</div>
158-
</CustomTabPanel>
159-
<CustomTabPanel value={value} index={2}>
160-
<div>
161-
{renderNode(protocolNodesData)}
162-
</div>
163-
</CustomTabPanel>
164-
<CustomTabPanel value={value} index={1}>
165-
<div>
166-
{renderNode(sampletypeNodesData)}
167-
</div>
168-
</CustomTabPanel>
169-
</Box>
170-
</div>
179+
</div>
180+
</>
171181
);
172182
}

0 commit comments

Comments
 (0)