diff --git a/assets/css/_common/components/reading-progress.scss b/assets/css/_common/components/reading-progress.scss index 791dcc9..b85cdbf 100644 --- a/assets/css/_common/components/reading-progress.scss +++ b/assets/css/_common/components/reading-progress.scss @@ -1,8 +1,8 @@ @if $reading_progress_enable { .reading-progress-bar { --progress: 0; - background: convert($reading_progress_color); - height: convert($reading_progress_height); + background: $reading_progress_color; + height: $reading_progress_height; position: fixed; z-index: $zindex-5; diff --git a/assets/css/_common/outline/header/bookmark.scss b/assets/css/_common/outline/header/bookmark.scss index 28876ce..d40fedc 100644 --- a/assets/css/_common/outline/header/bookmark.scss +++ b/assets/css/_common/outline/header/bookmark.scss @@ -3,22 +3,31 @@ border-bottom: 0; position: fixed; top: -10px; + transition: top .3s; - @include sidebar-toggle-position(true); + -moz-transition:top .3s; + -webkit-transition:top .3s; + -o-transition:top .3s; + + @if not $github_banner_enable { + @include sidebar-toggle-position(true); + } @else { + left: 30px; + } @include tablet-mobile() { display: none; } &::before { - color: convert($bookmark_color); + color: $bookmark_color; font-size: 32px; line-height: 1; @include font-family-icons('\f02e'); } - } - .book-mark-link:hover, .book-mark-link-fixed { - top: -2px; + &:hover { + top: 0px; + } } } diff --git a/assets/css/_common/scaffolding/tags/pdf.scss b/assets/css/_common/scaffolding/tags/pdf.scss index e61cad9..b873a21 100644 --- a/assets/css/_common/scaffolding/tags/pdf.scss +++ b/assets/css/_common/scaffolding/tags/pdf.scss @@ -1,7 +1,7 @@ @if $pdf_enable { .pdfobject-container { iframe, embed { - height: convert($pdf_height); + height: $pdf_height; width: 100%; } } diff --git a/assets/css/_mixins.scss b/assets/css/_mixins.scss index 7685639..9e435a8 100644 --- a/assets/css/_mixins.scss +++ b/assets/css/_mixins.scss @@ -125,9 +125,7 @@ } @mixin sidebar-toggle-position($reverse) { - // TODO how use nth function. - //$alignment : list.nth(sidebar-toggle-alignment($reverse), 0); - $alignment : 0; + $alignment : nth(sidebar-toggle-alignment($reverse), 1); #{$alignment}: $b2t-position-right; @include tablet-mobile() { #{$alignment}: $b2t-position-right-mobile; diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 24f8d44..0e46b87 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -446,18 +446,18 @@ params: # Reading progress bar readingProgress: - enable: false + enable: true # Available values: left | right start: left # Available values: top | bottom - position: top + position: bottom reversed: false color: "#37c6c0" height: 3px # Bookmark Support bookmark: - enable: false + enable: true # Customize the color of the bookmark. color: "#222" # If auto, save the reading progress when closing the page or clicking the bookmark-icon. @@ -466,7 +466,7 @@ params: # `Follow me on GitHub` banner in the top-right corner. githubBanner: - enable: false + enable: true permalink: https://github.com/yourname title: Follow me on GitHub diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 799ac3c..90a2e4d 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -25,7 +25,7 @@ RSSLable: other: "RSS 订阅" CCLinkTitle: other: "共享知识" -BackTop: +BackTopLabel: other: "返回顶部" PostPublishDate: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ecd8a97..162f3f3 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -39,6 +39,7 @@ {{- end }} + {{ partial "widgets" (dict "P" $P) }}
{{- block "main" . }}{{- end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 2c5f04b..c5ed929 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -27,7 +27,7 @@ {{ default $ft.copyright .P.author }}
-{{/* +{{/* TODO