diff --git a/client/scss/base/base.scss b/client/scss/base/base.scss index ed39b57d..6d8a688e 100644 --- a/client/scss/base/base.scss +++ b/client/scss/base/base.scss @@ -72,6 +72,15 @@ a { display: none !important; } +.is-hidden-until-scroll { + max-height: 0; + overflow: hidden; + transition: all .6s ease; +} +.is-sticky .is-hidden-until-scroll { + max-height: 30px; +} + .is-hidden-mobile { @include mobile { display: none !important; diff --git a/server/views/pages/view.pug b/server/views/pages/view.pug index a87ecbb1..999428f6 100644 --- a/server/views/pages/view.pug +++ b/server/views/pages/view.pug @@ -65,7 +65,7 @@ block content .sidebar-label span Page Contents ul.sidebar-menu - li: a(href='#root', title='Top of Page') + li.is-hidden-until-scroll: a(href='#root', title='Top of Page') i.icon-arrow-up2 +tocMenu(pageData.tree)