Skip to content

Commit

Permalink
pref: 社交网络增加自定义选项
Browse files Browse the repository at this point in the history
  • Loading branch information
LIlGG committed Dec 8, 2023
1 parent 4bd9d6c commit 746f870
Show file tree
Hide file tree
Showing 70 changed files with 212,350 additions and 433 deletions.
67 changes: 59 additions & 8 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,22 @@ spec:
- $formkit: repeater
name: items
label: 社交网络
value: []
children:
- $formkit: select
name: type
key: type
label: 类型
value: preset
options:
- label: 预设
value: preset
- label: 自定义
value: custom
- $formkit: select
if: "$value.type == preset"
name: icon
label: 图标
key: icon
label: 预设图标
options:
- label: 微信
value: wechat.png
Expand Down Expand Up @@ -265,28 +276,59 @@ spec:
value: email.svg
- label: Stack Overflow
value: stackoverflow.svg
- $formkit: text
name: url
label: 链接
- $formkit: attachment
if: "$value.type === custom"
name: custom_icon
key: custom_icon
accepts:
- 'image/*'
max: 1
label: 自定义图标
validation: "required"
- $formkit: radio
name: url_type
label: 链接类型
key: url_type
label: 展示形式
value: normal
help: "如果选择了图片类型,那么在访客点击之后会使用弹框的形式加载"
options:
- label: 跳转链接
value: normal
- label: 图片
value: image
- $formkit: text
if: "$value.url_type == normal"
name: url
key: url
label: 链接
validation: "required"
- $formkit: attachment
if: "$value.url_type == image"
name: image
key: image
label: 图片
accepts:
- 'image/*'
max: 1
validation: "required"
- $formkit: repeater
name: mobile_items
label: 移动端侧边栏社交网络
value: []
children:
- $formkit: select
name: type
key: type
label: 类型
value: preset
options:
- label: 预设
value: preset
- label: 自定义
value: custom
- $formkit: select
name: icon
key: icon
label: 图标
if: "$value.type === preset"
options:
- label: 微信
value: wechat.png
Expand Down Expand Up @@ -322,6 +364,15 @@ spec:
value: email.svg
- label: Stack Overflow
value: stackoverflow.svg
- $formkit: attachment
if: "$value.type === custom"
name: custom_icon
key: custom_icon
accepts:
- 'image/*'
max: 1
label: 自定义图标
validation: "required"
- $formkit: text
name: url
label: 链接
Expand Down
6 changes: 3 additions & 3 deletions src/css/common/components/screen/img-box/social.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
filter: FlipH;
}

& .wechat {
& .social-image {
height: 2rem;
width: 2rem;
position: relative;

& .wechatInner {
& .social-image-inner {
width: 8rem;
height: 8rem;
padding: 0.625rem;
Expand Down Expand Up @@ -66,7 +66,7 @@
}
}

&:hover .wechatInner {
&:hover .social-image-inner {
transform: translate3d(0, 16px, 0);
opacity: 1;
visibility: visible;
Expand Down
154 changes: 0 additions & 154 deletions templates/assets/dist/assets/APlayer.min-1b5a4167.js

This file was deleted.

1,164 changes: 1,164 additions & 0 deletions templates/assets/dist/assets/APlayer.min-4c1eacf9.js

Large diffs are not rendered by default.

Loading

0 comments on commit 746f870

Please sign in to comment.