Skip to content

Commit d0f3f86

Browse files
Amir SohelAmir Sohel
authored andcommitted
footer position
1 parent de160ee commit d0f3f86

File tree

6 files changed

+29
-13
lines changed

6 files changed

+29
-13
lines changed

src/App.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import Home from'./Components/Views/Home'
33
import Header from './Components/Header'
4-
import Footer from './Components/Footer'
54
import './App.scss';
65
import { BrowserRouter as Router } from "react-router-dom"
76
import { Route, Switch } from "react-router"
@@ -18,7 +17,6 @@ function App() {
1817
{/* <Home /> */}
1918
</Switch>
2019
</Router>
21-
<Footer/>
2220
</div>
2321
);
2422
}

src/App.scss

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,7 @@ button {
278278
.css-y1c0xs, [data-css-y1c0xs] {
279279
max-height: 190px;
280280
}
281-
.css-13azwyo .p-5 {
282-
padding: 10px !important;
283-
font-size: 13px;
284-
}
281+
285282

286283
.mobile-theme {
287284
position: absolute;
@@ -314,11 +311,18 @@ button {
314311

315312

316313
@media (max-width:767px){
314+
.search {width: 100%;}
315+
.search-result p {
316+
font-size: 13px;
317+
padding: 10px !important;
318+
margin: 0 !important;
319+
}
317320
.mob-font-size-13 {font-size: 13px;}
318321
.search-wrapper {
319322
height: 0;
320323
transition: all 0.4s;
321324
overflow: hidden;
325+
margin-right: 0;
322326
}
323327
.search_icon{display: block;}
324328
.Search-result {width: 100%;}
@@ -333,3 +337,13 @@ button {
333337
}
334338

335339

340+
.app-wrapper {
341+
position: relative;
342+
min-height: calc(100vh - 170px);
343+
}
344+
345+
footer {
346+
position: absolute;
347+
bottom: 0;
348+
height: 30px;
349+
}

src/Components/Header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ function Header() {
7777
</a>
7878
{searchUsers && (
7979
<div className="Search-result">
80-
<ul class="search-result">
80+
<ul className="search-result">
8181
<ScrollToBottom>
8282
{searchUsers.length > 0
8383
? searchUsers
84-
: Loader.section_loading}
84+
: Loader.user_not_found}
8585
</ScrollToBottom>
8686
</ul>
8787
</div>

src/Components/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22

33
function Layout (props) {
4-
return <div className="container">{props.children}</div>
4+
return <div className="app-wrapper"><div className="container">{props.children}</div></div>
55
}
66

77
export default Layout

src/Components/Views/BasicInfo.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ function BasicInformation(props) {
8585
<span>Forks</span>
8686
</div>
8787
</div>
88-
89-
9088
</div>
9189
</div>
9290
</div>

src/Components/Views/Home.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import DataProvider from "../../Data-provider"
66
import PieChart from "../Charts/PieChart";
77
import BarChart from "../Charts/BarChart";
88
import Loader from "../Extras/Loader";
9+
import Footer from '../Footer'
10+
911

1012

1113
class Home extends React.Component {
@@ -116,8 +118,9 @@ class Home extends React.Component {
116118

117119

118120
<div>
119-
{this.state.basicLoaded && this.state.basicInfo ?
121+
120122
<Layout>
123+
{this.state.basicLoaded && this.state.basicInfo ? <div>
121124
{/* CONDITIONAL REDERING OF BASIC INFO */}
122125
{this.state.basicLoaded ? <BasicInformation basicInfo={this.state.basicInfo} aggregateData={this.state.aggregateData} /> : Loader.section_loading}
123126
{/* PINNED SECTION */}
@@ -190,7 +193,10 @@ class Home extends React.Component {
190193
</div>
191194
</div>
192195
</section>
193-
</Layout> : Loader.user_not_found}
196+
</div> : Loader.user_not_found}
197+
<Footer/>
198+
</Layout>
199+
194200
</div>
195201
);
196202
}

0 commit comments

Comments
 (0)