@salesforcedevs/docs-components 1.3.194-docfooter2-alpha → 1.3.194-docfooter4-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.194-docfooter2-alpha",
3
+ "version": "1.3.194-docfooter4-alpha",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -9,6 +9,7 @@
9
9
  var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
10
10
  )
11
11
  );
12
+ --dx-c-footer-nosignup-height: 452px;
12
13
 
13
14
  display: block;
14
15
  }
@@ -61,7 +62,7 @@ dx-toc {
61
62
  flex-direction: row;
62
63
  justify-content: center;
63
64
  max-width: var(--dx-g-doc-content-max-width);
64
- min-height: 300px;
65
+ min-height: calc(100vh - var(--dx-c-footer-nosignup-height));
65
66
  margin: auto;
66
67
  padding: 0 var(--dx-g-global-header-padding-horizontal);
67
68
  }
@@ -48,7 +48,7 @@
48
48
  ></dx-toc>
49
49
  </div>
50
50
  </div>
51
- <div if:false={isXMLDoc} class="footer-container">
51
+ <div class="footer-container">
52
52
  <dx-footer variant="no-signup"></dx-footer>
53
53
  </div>
54
54
  </div>
@@ -93,10 +93,6 @@ export default class ContentLayout extends LightningElement {
93
93
  return this.contentLoaded && typeof Sprig !== "undefined";
94
94
  }
95
95
 
96
- get isXMLDoc(): boolean {
97
- return this.sidebarHeader === "Pages";
98
- }
99
-
100
96
  private searchSyncer = new SearchSyncer({
101
97
  callbacks: {
102
98
  onSearchChange: (nextSearchString: string): void => {
@@ -165,6 +165,7 @@ export default class DocXmlContent extends LightningElementWithState<{
165
165
  this.apiDomain,
166
166
  this.allLanguages
167
167
  );
168
+ this.hidePageFooter();
168
169
  this.fetchDocument().then(() => (this.loaded = true));
169
170
  window.addEventListener("popstate", this.handlePopState);
170
171
 
@@ -766,4 +767,16 @@ export default class DocXmlContent extends LightningElementWithState<{
766
767
  headTag[0].appendChild(robotsMeta);
767
768
  }
768
769
  }
770
+
771
+ /** Now footer for /docs will be part of content-layout. As XML docs are rendered using base.njk
772
+ * which bydefault has the footer, we need a hide the page footer.
773
+ */
774
+ private hidePageFooter(): void {
775
+ const footerEle = document.querySelector(
776
+ ".footer-container"
777
+ ) as HTMLElement;
778
+ if (footerEle) {
779
+ footerEle.style.display = "none";
780
+ }
781
+ }
769
782
  }