Skip to content

Commit

Permalink
feat(v2): add sticky footer (#1855)
Browse files Browse the repository at this point in the history
* feat(v2): add sticky footer

* Update CHANGELOG-2.x.md

* Update CHANGELOG-2.x.md
  • Loading branch information
lex111 authored and yangshun committed Oct 23, 2019
1 parent b65c1b2 commit 68d5adf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG-2.x.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Docusaurus 2 Changelog

## Unreleased

- Add sticky footer.

## 2.0.0-alpha.30

- Fix babel transpilation include/exclude logic to be more efficient. This also fix a very weird bug `TypeError: Cannot assign to read only property 'exports' of object '#<Object>'` if your website path contains `docusaurus` word in it.

## 2.0.0-alpha.29
Expand All @@ -11,6 +16,7 @@
- New UI for webpack compilation progress bar.

## 2.0.0-alpha.28

- Further reduce memory usage to avoid heap memory allocation failure.
- Fix `keywords` frontmatter for SEO not working properly.
- Fix `swizzle` command not passing context properly to theme packages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function Layout(props) {
<meta name="twitter:card" content="summary" />
</Head>
<Navbar />
{children}
<main className="main">{children}</main>
{!noFooter && <Footer />}
</React.Fragment>
);
Expand Down
15 changes: 15 additions & 0 deletions packages/docusaurus-theme-classic/src/theme/Layout/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,23 @@
* LICENSE file in the root directory of this source tree.
*/

html,
body {
height: 100%;
}

body {
margin: 0;
padding-top: var(--ifm-navbar-height);
transition: var(--ifm-transition-fast) ease color;
}

body > div {
height: 100%;
display: flex;
flex-direction: column;
}

.main {
flex: 1 0 auto;
}

0 comments on commit 68d5adf

Please sign in to comment.