Skip to content

Commit

Permalink
Merge pull request #762 from carolcoral/main
Browse files Browse the repository at this point in the history
change: 首页顶部banner标题支持不超过122px长度的文字
  • Loading branch information
carolcoral authored Jun 26, 2024
2 parents 725860a + 6daedc7 commit 132317e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
18 changes: 18 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ spec:
label: Banner 左侧
if: $get(recentTop).value
value:
bannersBackgroundRollStyle: tags-group-all
bannersBackground: default
bannersTitleBig: <div class="banners-title-big">Halo Theme</div><div class="banners-title-big">Hao</div>
bannersTitleSmall: 更多信息请关注 GitHub
Expand All @@ -312,6 +313,16 @@ spec:
colorTwoDark: "#da980c"
techStack:
children:
- $formkit: select
name: bannersBackgroundRollStyle
id: bannersBackgroundRollStyle
key: bannersBackgroundRollStyle
label: 背景图滚动样式
options:
- label: 垂直滚动
value: tags-group-all
- label: 倾斜滚动
value: tags-group-all45
- $formkit: select
name: bannersBackground
id: bannersBackground
Expand Down Expand Up @@ -1376,6 +1387,7 @@ spec:
gongwangan: true
yingsi: true
yunzhichi: false
footer_banner_padding: 1
style_one:
owner_enable: false
runtime_enable: true
Expand Down Expand Up @@ -1404,6 +1416,12 @@ spec:
value: true
- label: 隐藏
value: false
- $formkit: number
if: $get(default_enable).value
name: footer_banner_padding
id: footer_banner_padding
key: footer_banner_padding
label: 页脚高度
- $formkit: radio
if: $get(default_enable).value
name: dingyue
Expand Down
18 changes: 15 additions & 3 deletions templates/assets/zhheo/zhheoblog.css
Original file line number Diff line number Diff line change
Expand Up @@ -8133,12 +8133,13 @@ div#banners {
border-radius: 60px;
margin-bottom: 12px;
color: var(--heo-white);
width: 94px;
max-width: 170px;
position: relative
}

.banners-link-title {
margin-left: auto
margin-left: auto;
padding-left: 5px;
}
}

Expand Down Expand Up @@ -8170,14 +8171,25 @@ div#banners {

.tags-group-all {
display: flex;
transform: rotate(0)
transform: rotate(0);
}

.tags-group-all45 {
display: flex;
transform: rotate(45deg);
margin-top: -130%;
}

.tags-group-all.nowrapMove {
transform: rotate(0);
padding-bottom: 2rem
}

.tags-group-all45.nowrapMove {
transform: rotate(0);
padding-bottom: 2rem
}

#bannerGroup .tags-group-wrapper {
margin-top: 0;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion templates/modules/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3 class="footer-title">友链</h3>
}
</style>

<div th:if="${theme.config.footer.footerContent.default_enable_group.default_enable}" id="footer-banner">
<div th:if="${theme.config.footer.footerContent.default_enable_group.default_enable}" id="footer-banner" th:style="|padding:${theme.config.footer.footerContent.default_enable_group.footer_banner_padding}rem|">
<div class="footer-banner-links">
<div class="footer-banner-left">
<div id="footer-banner-tips">
Expand Down
2 changes: 1 addition & 1 deletion templates/modules/widgets/banner-group.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="bannerGroup">
<!-- banners -->
<div id="banners">
<div class="tags-group-all">
<div th:class="${theme.config.top.BannerLeft.bannersBackgroundRollStyle}">
<!-- banners 使用默认值-->
<div class="tags-group-wrapper"
th:if="${#strings.equals(theme.config.top.BannerLeft.bannersBackground, 'default')}">
Expand Down
2 changes: 1 addition & 1 deletion theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ spec:
repo: https://github.com/chengzhongxue/halo-theme-hao
settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap"
version: "1.5.3"
version: "1.5.4"
require: ">=2.15.0"

0 comments on commit 132317e

Please sign in to comment.