]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10612 Fix footer of documentation page
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Wed, 6 Jun 2018 09:56:47 +0000 (11:56 +0200)
committerSonarTech <sonartech@sonarsource.com>
Fri, 8 Jun 2018 18:20:51 +0000 (20:20 +0200)
server/sonar-web/src/main/js/apps/documentation/components/App.tsx
server/sonar-web/src/main/js/apps/documentation/styles.css

index 50f5672de0eb50812094fbdbb9227d37447a9e2d..fc84c6d4c43ed8f36681ca5bb3d8b42e91b321ea 100644 (file)
@@ -48,6 +48,11 @@ export default class App extends React.PureComponent<Props, State> {
   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<Props, State> {
 
   componentWillUnmount() {
     this.mounted = false;
+
+    const footer = document.getElementById('footer');
+    if (footer) {
+      footer.classList.remove('page-footer-with-sidebar', 'documentation-footer');
+    }
   }
 
   fetchContent = (path: string) => {
index 089f3e361894e7b61347079bcdf8cbcec4afce82..3b0071d3f25e58acb23b41baffcf4ef22bb683c4 100644 (file)
@@ -25,3 +25,8 @@
   margin-bottom: calc(4 * var(--gridSize));
   font-size: 20px;
 }
+
+.documentation-footer div,
+.documentation-footer .page-footer-menu {
+  max-width: 740px;
+}