Skip to content

Commit

Permalink
Showing 5 changed files with 141 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import {
} from "../authentication/profile"
import { Button } from "@openneuro/components/button"
import { Loading } from "@openneuro/components/loading"
import { NeurobagelSearch } from "@openneuro/components/search-page"
import {
AgeRangeInput,
AllDatasetsToggle,
@@ -156,6 +157,7 @@ const SearchContainer: FC<SearchContainerProps> = ({ portalContent }) => {
)}
renderSearchFacets={() => (
<>
<NeurobagelSearch />
<KeywordInput />
<AdminUser>
<AllDatasetsToggle />
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ import { FilterListItem } from "./FilterListItem"
import { FilterDateItem } from "./FilterDateItem"
import { TermListItem } from "./TermListItem"
import { FacetSelectValueType } from "../facets/FacetSelect"
import { NeurobagelSearch } from "./NeurobagelSearch"


export interface FiltersBlockProps {
keywords: string[]
@@ -67,6 +69,7 @@ export const FiltersBlock = ({

return (
<div className="filters-block">
{/* <NeurobagelSearch /> */}
<h2>
{noFilters
? (
59 changes: 59 additions & 0 deletions packages/openneuro-components/src/search-page/NeurobagelSearch.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React from "react"

import NeurobagelLogo from "./neurobagel_logo.svg"
import { AccordionTab } from "../accordion/AccordionTab"
import { AccordionWrap } from "../accordion/AccordionWrap"
import styled from "@emotion/styled"

const NeurobagelSearchDiv = styled.div`
padding-bottom: 15px;
border-bottom: 1px solid #dfdfdf; // $newspaper in _variables.scss
margin-bottom: 10px;
img.inline-icon {
height: 1.1em;
vertical-align: middle;
}
.on-accordion-wrapper .keyword-accordion {
.accordion-title {
position: absolute;
top: -20px;
@media (max-width: 421px) {
left: 93px;
}
@media (max-width: 330px) {
left: 130px;
}
left: 375px;
}
}
`

export const NeurobagelSearch = () => {
return (
<NeurobagelSearchDiv>
<img src={NeurobagelLogo} className="inline-icon"/>{" "}
<a href="https://query.neurobagel.org/?node=OpenNeuro" target="_blank">
Search at the participant-level with Neurobagel
</a>
<AccordionWrap>
<AccordionTab
accordionStyle="plain"
label="?"
className="keyword-accordion"
>
<span>
Search at the participant level is provided by{" "}
<a href="https://neurobagel.org" target="_blank">
Neurobagel
</a>
{", "}a third party project.

Neurobagel is a collection of tools for harmonizing phenotypic
and imaging data descriptions, searching for participants across datasets,
and constructing cohorts from multiple source datasets.
</span>
</AccordionTab>
</AccordionWrap>
</NeurobagelSearchDiv>
)
}
2 changes: 2 additions & 0 deletions packages/openneuro-components/src/search-page/index.ts
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import { SearchResultsList } from "./SearchResultsList"
import { FiltersBlock } from "./FiltersBlock"
import { SearchPage } from "./SearchPage"
import { SearchSort } from "./SearchSort"
import { NeurobagelSearch } from "./NeurobagelSearch"

/* TEMPORARY EXPORTS */
// TODO: remove
@@ -15,4 +16,5 @@ export {
SearchResultsList,
SearchSort,
SearchSortContainerExample,
NeurobagelSearch
}
75 changes: 75 additions & 0 deletions packages/openneuro-components/src/search-page/neurobagel_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0c774e2

Please sign in to comment.