Skip to content

Commit f091fa9

Browse files
authored
Merge pull request #3495 from OpenNeuroOrg/update/search-results-layouts-details-component
Update/search results layouts details component
2 parents 1470232 + 79de8a7 commit f091fa9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1240
-1050
lines changed

packages/openneuro-app/src/scripts/components/accordion/accordion.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22
/* Accordion styles */
33

44
.on-accordion-wrapper {

packages/openneuro-app/src/scripts/components/activity-slider/ActivitySlider.tsx

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Carousel from "react-multi-carousel/lib/Carousel"
66
import type { ArrowProps, ResponsiveType } from "react-multi-carousel/lib/types"
77
import "react-multi-carousel/lib/styles.css"
88
import "./slider.scss"
9+
import { ModalityHexagon } from "../../components/modality-cube/ModalityHexagon"
910

1011
export interface ActivitySliderProps {
1112
className?: string
@@ -62,28 +63,9 @@ export const ActivitySlider = ({
6263
{data.map(({ node }) => (
6364
<div className="activity-slider-node" key={node.id}>
6465
<div className="ds-modality">
65-
<div className="hexagon-wrapper">
66-
{node.latestSnapshot.summary?.primaryModality
67-
? (
68-
<>
69-
<div
70-
className={"hexagon " +
71-
node.latestSnapshot.summary?.primaryModality
72-
.toLowerCase()}
73-
>
74-
</div>
75-
<div className="label">
76-
{node.latestSnapshot.summary?.primaryModality}
77-
</div>
78-
</>
79-
)
80-
: (
81-
<>
82-
<div className="hexagon no-modality"></div>
83-
<div className="label">N/A</div>
84-
</>
85-
)}
86-
</div>
66+
<ModalityHexagon
67+
primaryModality={node.latestSnapshot.summary?.primaryModality}
68+
/>
8769
</div>
8870
<div className="ds-name">
8971
<h4>

packages/openneuro-app/src/scripts/components/activity-slider/slider.scss

Lines changed: 1 addition & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22

33
.activity-slider {
44
h3 {
@@ -32,87 +32,6 @@
3232
margin: 10px 0 0;
3333
}
3434
}
35-
.activity-slider-node {
36-
.hexagon-wrapper {
37-
text-align: center;
38-
margin: 20px auto 0;
39-
position: relative;
40-
display: inline-block;
41-
width: 45px;
42-
height: 45px;
43-
div.label {
44-
position: absolute;
45-
top: 0;
46-
text-align: center;
47-
width: 100%;
48-
left: 0;
49-
right: 0;
50-
bottom: 0;
51-
display: flex;
52-
justify-content: center;
53-
align-items: center;
54-
color: #fff;
55-
font-weight: 600;
56-
font-size: 13px;
57-
}
58-
}
59-
60-
.hexagon {
61-
height: 100%;
62-
width: calc(100% * 0.57735);
63-
display: inline-block;
64-
}
65-
66-
.hexagon:before {
67-
position: absolute;
68-
top: 0;
69-
right: calc((100% / 2) - ((100% * 0.57735) / 2));
70-
background-color: inherit;
71-
height: inherit;
72-
width: inherit;
73-
content: '';
74-
transform: rotateZ(60deg);
75-
}
76-
77-
.hexagon:after {
78-
position: absolute;
79-
top: 0;
80-
right: calc((100% / 2) - ((100% * 0.57735) / 2));
81-
background-color: inherit;
82-
height: inherit;
83-
width: inherit;
84-
content: '';
85-
transform: rotateZ(-60deg);
86-
}
87-
.hexagon {
88-
transition: background-color 0.3s;
89-
background-color: $on-dark-aqua;
90-
91-
&.mri {
92-
background-color: $mri-theme;
93-
}
94-
&.eeg {
95-
background-color: $eeg-theme;
96-
}
97-
98-
&.pet {
99-
background-color: $pet-theme;
100-
}
101-
&.ieeg {
102-
background-color: $ieeg-theme;
103-
}
104-
105-
&.meg {
106-
background-color: $meg-theme;
107-
}
108-
&.eeg {
109-
background-color: $on-light-green;
110-
}
111-
&.nirs{
112-
background-color: $nirs-theme;
113-
}
114-
}
115-
}
11635
}
11736
.react-multi-carousel-dot--active button {
11837
background-color: var(--current-theme-primary);

packages/openneuro-app/src/scripts/components/button/button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22

33
.on-button {
44
font-family: $font-sans;

packages/openneuro-app/src/scripts/components/count-toggle/count-toggle.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22

33
.toggle-btn {
44
border: 1px solid #aaa;

packages/openneuro-app/src/scripts/components/dropdown/dropdown.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22

33
.dropdown-wrapper {
44
display: inline-block;

packages/openneuro-app/src/scripts/components/facets/facet.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22

33
.facet-accordion.on-accordion-wrapper {
44
padding: 0 15px;
@@ -45,7 +45,7 @@
4545
.level-1 > li {
4646
border-top: 1px solid #dfdfdf;
4747
> span:hover {
48-
background-color: var(--current-theme-primary-light);
48+
background-color: var(--current-theme-primary-ultralight);
4949
}
5050

5151
> .label {
@@ -60,7 +60,7 @@
6060
display: flex;
6161
justify-content: flex-start;
6262
&:hover {
63-
background-color: var(--current-theme-primary-light);
63+
background-color: var(--current-theme-primary-ultralight);
6464
}
6565

6666
.label {
@@ -165,7 +165,8 @@
165165
.search-nav .facet-open.modality-facet {
166166
margin: 20px 0;
167167
border: 0;
168-
background: #e5f4f7;
168+
background: var(--current-theme-primary-ultralight);
169+
border: 1px solid var(--current-theme-primary-light);
169170
border-radius: $border-radius-default;
170171
padding: 10px;
171172

packages/openneuro-app/src/scripts/components/footer/footer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22

33
footer {
44
background: $charcoal;

packages/openneuro-app/src/scripts/components/front-page/front-page.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22

33
body {
44
font-family: $font-sans;

packages/openneuro-app/src/scripts/components/header/header.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../scss/variables';
1+
@import '../../scss/variables';
22
header {
33
position: relative;
44
}

0 commit comments

Comments
 (0)