From: Grégoire Aubert Date: Wed, 6 Jun 2018 09:56:47 +0000 (+0200) Subject: SONAR-10612 Fix footer of documentation page X-Git-Tag: 7.5~1070 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3676583b19547def4c0824c4a9c3c499a2a5c7b3;p=sonarqube.git SONAR-10612 Fix footer of documentation page --- diff --git a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx index 50f5672de0e..fc84c6d4c43 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx @@ -48,6 +48,11 @@ export default class App extends React.PureComponent { componentDidMount() { this.mounted = true; this.fetchContent(this.props.params.splat || 'index'); + + const footer = document.getElementById('footer'); + if (footer) { + footer.classList.add('page-footer-with-sidebar', 'documentation-footer'); + } } componentWillReceiveProps(nextProps: Props) { @@ -60,6 +65,11 @@ export default class App extends React.PureComponent { componentWillUnmount() { this.mounted = false; + + const footer = document.getElementById('footer'); + if (footer) { + footer.classList.remove('page-footer-with-sidebar', 'documentation-footer'); + } } fetchContent = (path: string) => { diff --git a/server/sonar-web/src/main/js/apps/documentation/styles.css b/server/sonar-web/src/main/js/apps/documentation/styles.css index 089f3e36189..3b0071d3f25 100644 --- a/server/sonar-web/src/main/js/apps/documentation/styles.css +++ b/server/sonar-web/src/main/js/apps/documentation/styles.css @@ -25,3 +25,8 @@ margin-bottom: calc(4 * var(--gridSize)); font-size: 20px; } + +.documentation-footer div, +.documentation-footer .page-footer-menu { + max-width: 740px; +}