-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1046 from sennetconsortium/tjmadonna/1034-metadat…
…a-link-to-home-page Tjmadonna/1034 metadata link to home page
- Loading branch information
Showing
12 changed files
with
112 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Link from "next/link"; | ||
import { APP_ROUTES } from "../../../config/constants"; | ||
|
||
const SearchDropdown = ({ title }) => { | ||
const dropdownItems = [ | ||
{ name: "Entities", url: APP_ROUTES.search }, | ||
{ name: "Metadata", url: APP_ROUTES.discover + "/metadata" }, | ||
]; | ||
|
||
const createLinkView = (item) => { | ||
if (item.name === title) { | ||
return null; | ||
} | ||
return ( | ||
<Link key={item.name} className="dropdown-item" href={item.url}> | ||
Search {item.name} | ||
</Link> | ||
); | ||
}; | ||
|
||
return ( | ||
<div className="dropdown sui-layout-sidebar-dropdown"> | ||
<button | ||
className="btn btn-outline-primary rounded-0 dropdown-toggle w-100" | ||
type="button" | ||
id="searchDropdown" | ||
data-bs-toggle="dropdown" | ||
aria-expanded="false" | ||
> | ||
Search {title} | ||
</button> | ||
<ul className="dropdown-menu" aria-labelledby="searchDropdown"> | ||
{dropdownItems.map((item) => { | ||
return createLinkView(item); | ||
})} | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SearchDropdown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.c-SelectedFacets { | ||
display: flex; | ||
flex-flow: row wrap; | ||
align-items: center; | ||
padding: 10px 0; | ||
gap: 10px; | ||
min-height: 85px; | ||
} | ||
|
||
@include md-mx { | ||
.c-SelectedFacets { | ||
min-height: 0px; | ||
padding: 20px 0 0; | ||
} | ||
|
||
.c-SelectedFacets:empty { | ||
min-height: 0px; | ||
padding: 0px 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters