返回頂部模塊

本頁內容

又稱回到頂部,一個用於返回頂部的按鈕。

Modulegithub.com/hbstack/back-to-top
Repository⭐ Please consider giving a star if your like it.
Stars
Version
Used by
Requirements
License
UsageSee how to use modules.

站點參數

NameTypeRequireDefaultDescription
animationboolean-truefalse 則禁用默認動畫。
icon_heightstring-2em圖標的高度。
icon_namenumber-rocketBootstrap 的圖標名稱。
icon_widthnumber-2em圖標的寬度。
position_bottomnumber-1rem按鈕的 bottom 屬性值。
position_endnumber-1rem按鈕的 right(LTR)或 left(RTL) 屬性值。

hugo.toml

1[params]
2  [params.hb]
3    [params.hb.back_to_top]
4      animation = true
5      icon_height = '2em'
6      icon_name = 'rocket'
7      icon_width = '2em'
8      position_bottom = '1rem'
9      position_end = '1rem'

hugo.yaml

1params:
2  hb:
3    back_to_top:
4      animation: true
5      icon_height: 2em
6      icon_name: rocket
7      icon_width: 2em
8      position_bottom: 1rem
9      position_end: 1rem

hugo.json

 1{
 2   "params": {
 3      "hb": {
 4         "back_to_top": {
 5            "animation": true,
 6            "icon_height": "2em",
 7            "icon_name": "rocket",
 8            "icon_width": "2em",
 9            "position_bottom": "1rem",
10            "position_end": "1rem"
11         }
12      }
13   }
14}
razonyang
2024年7月26日 星期五 2023年2月4日 星期六