1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 13:44:15 +00:00

Hide ToC when scrolling to bottom.

This commit is contained in:
Cotes Chung
2019-11-27 17:08:54 +08:00
parent 54ed9bcc18
commit bd5e8be215
4 changed files with 28 additions and 24 deletions

View File

@@ -352,12 +352,12 @@ body {
-webkit-transition: transform 0.4s ease;
}
#main>div.row>div:nth-child(1),
#main>div.row>div:nth-child(2) {
#main>div.row:first-child>div:nth-child(1),
#main>div.row:first-child>div:nth-child(2) {
margin-top: 3rem; /* same as the height of topbar */
}
#main>div.row>div:first-child {
#main>div.row:first-child>div:first-child {
min-height: calc(100vh - 3rem - 6rem); /* 3rem for topbar, 6rem for footer */
}
@@ -806,7 +806,7 @@ div.tooltip-inner { /* Overrided BS4 Tooltip */
@media all and (max-width: 576px) {
#main>div.row>div:first-child {
#main>div.row:first-child>div:first-child {
min-height: calc(100vh - 3rem - 10rem); /* topbar is 3rem and footer is 10rem */
}
@@ -969,8 +969,8 @@ div.tooltip-inner { /* Overrided BS4 Tooltip */
top: 0 !important;
}
#main>div.row>div:nth-child(1),
#main>div.row>div:nth-child(2) {
#main>div.row:first-child>div:nth-child(1),
#main>div.row:first-child>div:nth-child(2) {
margin-top: 0;
}

View File

@@ -108,33 +108,33 @@
right: 1rem;
}
#comment-wrap {
#post-extend-wrap {
min-height: 2rem;
}
/*
The following resposive design aim to make #comment-wrap margin-right same as pannel's width
The following resposive design aim to make #post-extend-wrap margin-right same as pannel's width
*/
@media all and (min-width: 1201px) {
#comment-wrap {
#post-extend-wrap {
margin-right: 25%;
}
}
@media all and (min-width: 1460px) {
#comment-wrap {
#post-extend-wrap {
margin-right: 300px;
}
}
@media all and (min-width: 1650px) {
#comment-wrap {
#post-extend-wrap {
margin-right: calc((100% - 1150px) / 10 + 300px);
}
}
@media all and (min-width: 1700px) {
#comment-wrap {
#post-extend-wrap {
margin-right: calc((100% - 1150px) / 8 + 300px);
}
}