🎨 Résolution un peu louche du chevauchement
parent
6afadb05ca
commit
9e844000c1
|
@ -1,4 +1,3 @@
|
|||
|
||||
#results {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
|
|
|
@ -35,12 +35,6 @@ h1 {
|
|||
flex-direction: column;
|
||||
}
|
||||
|
||||
#ninetyPercent {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#page-type {
|
||||
display: inline-block;
|
||||
position: fixed;
|
||||
|
|
|
@ -25,7 +25,15 @@ const piwik = new ReactPiwik({
|
|||
|
||||
export default class Layout extends Component {
|
||||
history = createHistory()
|
||||
|
||||
state = {
|
||||
resultsHeight: 600
|
||||
}
|
||||
componentDidMount(){
|
||||
let resultsEl = document.getElementById('results')
|
||||
this.setState({
|
||||
resultsHeight: resultsEl ? resultsEl.clientHeight : 600
|
||||
})
|
||||
}
|
||||
render() {
|
||||
let displayWarning = ["/simu/", "/regle/", "/regles"].find(
|
||||
t => window.location.href.toString().indexOf(t) > -1
|
||||
|
@ -37,7 +45,7 @@ export default class Layout extends Component {
|
|||
return (
|
||||
<Router history={piwik.connectToHistory(this.history)}>
|
||||
<div id="main">
|
||||
<div id="ninetyPercent">
|
||||
<div>
|
||||
<div id="header">
|
||||
|
||||
{ displayWarning &&
|
||||
|
@ -62,6 +70,7 @@ export default class Layout extends Component {
|
|||
<Route component={Route404} />
|
||||
</Switch>
|
||||
</div>
|
||||
<div id="antiOverlap" style={{height: this.state.resultsHeight + 'px'}}/>
|
||||
<Results />
|
||||
</div>
|
||||
</Router>
|
||||
|
|
Loading…
Reference in New Issue