Skip to content

Commit

Permalink
feat: add the socialAnimation parameter, remove animation from soci…
Browse files Browse the repository at this point in the history
…al links if `false` (#1106)
  • Loading branch information
razonyang authored Feb 13, 2025
1 parent c314550 commit 1a87992
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions assets/main/scss/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ $tocStyleType: '{{ default "none" $params.post.tocStyleType }}';
$enable-viewer: {{ default true $params.viewer }};

$socialColor: {{ default true $params.socialColor }};
$socialAnimation: {{ default true $params.socialAnimation }};
9 changes: 6 additions & 3 deletions assets/main/scss/_social-links.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.social-link {
position: relative;

&:hover {
top: -2px;
transition: top ease 0.5s;
@if $socialAnimation {
&:hover {
top: -2px;
transition: top ease 0.5s;
}

}

@if $socialColor {
Expand Down
1 change: 1 addition & 0 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ viewer = true # Image Viewer

# externalLinkIcon = false

# socialAnimation = false # Remove animation from social links if false.
socialColor = false # Remove color from social links if false.

[sidebar]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ The site parameters are located in `config/_default/params.toml` by default.
| `fontSize.large` | String | `1.1rem` | Large font size.
| `fontSize.extraLarge` | String | `1.2rem` | Extra large font size.
| `social` | Object | - | [Social Links]({{< ref "/docs/widgets/social-links" >}}).
| `socialAnimation` | Boolean | `true` | Remove animation from social links if `false`. |
| `socialColor` | Boolean | `true` | Remove color from social links if `false`. |
| `socialShare` | Boolean | `true` | Turn on/off built-on social share button.
| `searchBar` | Boolean | `true` | Turn on/off built-on search bar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ authors = ["RazonYang"]
| `fontSize.large` | String | `1.1rem` | 大字体
| `fontSize.extraLarge` | String | `1.2rem` | 更大的字体
| `social` | Object | - | [社交链接]({{< ref "/docs/widgets/social-links" >}})。
| `socialAnimation` | Boolean | `true` |`false` 时,移除社交链接的动画。 |
| `socialColor` | Boolean | `true` |`false` 时,移除社交链接的颜色。 |
| `socialShare` | Boolean | `true` | 启用/禁用内置的分享按钮
| `searchBar` | Boolean | `true` | 启用/禁用搜索栏
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ authors = ["RazonYang"]
| `fontSize.large` | String | `1.1rem` | 大字體
| `fontSize.extraLarge` | String | `1.2rem` | 更大的字體
| `social` | Object | - | [社交鏈接]({{< ref "/docs/widgets/social-links" >}})。
| `socialAnimation` | Boolean | `true` |`false` 時間,移除社交鏈接的動畫。 |
| `socialColor` | Boolean | `true` |`false` 時間,移除社交鏈接的顏色。 |
| `socialShare` | Boolean | `true` | 啟用/禁用內置的分享按鈕
| `searchBar` | Boolean | `true` | 啟用/禁用搜索欄
Expand Down

0 comments on commit 1a87992

Please sign in to comment.