Skip to content

Commit 961d8e8

Browse files
Updated CSS for footer and modelListBanner to make they stick to bottom of the page (#48)
1 parent 9a9c637 commit 961d8e8

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed

src/App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import "./Stopgap.scss";
22
import React from "react";
33
import Footer from "./components/Footer/Footer";
44
import Router from "./router/router";
5-
import {BrowserRouter as ReactRouter} from "react-router-dom";
5+
import { BrowserRouter as ReactRouter } from "react-router-dom";
66

77
export default function App() {
88
console.log("App GIT Commit: " + process.env.REACT_APP_VERSION);
99

1010
return (
11-
<div>
11+
<div style={{ display: "flex", flexDirection: "column", minHeight: "100vh", justifyContent: "space-between" }}>
1212
<ReactRouter>
13-
<Router/>
14-
<Footer/>
13+
<Router />
14+
<Footer />
1515
</ReactRouter>
1616
</div>
1717
);

src/components/ExperimentDetails/ExperimentDetailPage.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function ExperimentDetailPage(props) {
4545
const Layout = getLayout();
4646

4747
return (
48-
<div className={getBlock()}>
48+
<div className={getBlock()} style={{ display: "flex", flexDirection: "column", flexGrow: 1 }}>
4949
<Header />
5050
<ExperimentDetailHeader subtitle={"Compare models"} />
5151

@@ -60,12 +60,12 @@ export default function ExperimentDetailPage(props) {
6060
task={props.task}
6161
hasMultipleInputs={props.hasMultipleInputs}
6262
/>
63-
<div className={getElement("scroll-container")}>
63+
{trialComponents && <div className={getElement("scroll-container")}>
6464
<div className={getElement("trial-cards")}>{trialComponents}</div>
65-
</div>
65+
</div>}
6666
</Layout>
6767
{getModal(props)}
68-
<SelectedModelsBanner selectedModels={props.selectedModels} doneChoosingModels={true} />
68+
{props.selectedModels && <SelectedModelsBanner selectedModels={props.selectedModels} doneChoosingModels={true} />}
6969
</div>
7070
);
7171

src/components/ModelList/_SelectedModelsBanner.scss

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
position: sticky;
1010
z-index: 2;
1111
box-shadow: 0px -4px 4px 0px #00000040;
12-
12+
margin-top: auto;
1313
&__red-circle {
1414
border-radius: 150px;
1515
padding: 2px 8px;
@@ -46,7 +46,7 @@
4646
padding-top: 16px;
4747
padding-bottom: 16px;
4848
position: relative;
49-
transition: box-shadow .3s;
49+
transition: box-shadow 0.3s;
5050
z-index: 1;
5151
align-items: flex-start;
5252

@@ -70,7 +70,6 @@
7070
margin-top: 8px;
7171
}
7272
}
73-
7473
}
7574
}
7675

@@ -83,20 +82,18 @@
8382
align-items: center;
8483
display: flex;
8584
margin-top: 24px;
86-
87-
8885
}
8986

9087
&__toggle-icon {
9188
margin-right: 16px;
92-
transition: transform .3s;
89+
transition: transform 0.3s;
9390

9491
&--open {
9592
transform: rotateX(180deg);
9693
}
9794

9895
& path {
99-
transition: fill .3s;
96+
transition: fill 0.3s;
10097
}
10198
}
10299

@@ -105,7 +102,7 @@
105102
text-decoration: none;
106103
color: $white;
107104
margin-right: 64px;
108-
transition: color .3s;
105+
transition: color 0.3s;
109106

110107
&:hover {
111108
color: $electricGreen;
@@ -115,9 +112,8 @@
115112
&__toggle-text {
116113
@include headline3;
117114
color: white;
118-
transition: color .3s;
115+
transition: color 0.3s;
119116
flex-shrink: 0;
120-
121117
}
122118

123119
&__toggle:hover &__toggle-icon path {
@@ -131,7 +127,7 @@
131127
&__remove {
132128
@include linkSmall;
133129
color: white;
134-
transition: color .3s;
130+
transition: color 0.3s;
135131

136132
&:hover {
137133
color: $electricGreen;
@@ -153,7 +149,10 @@
153149
display: flex;
154150
overflow-x: hidden;
155151
max-height: 0;
156-
transition: max-height .3s, padding-top .3s, padding-bottom .3s;
152+
transition:
153+
max-height 0.3s,
154+
padding-top 0.3s,
155+
padding-bottom 0.3s;
157156

158157
@include mobileWidth-lg {
159158
flex-direction: column;

0 commit comments

Comments
 (0)