mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 14:19:52 +08:00
独立配置文件
This commit is contained in:
parent
91733c0c56
commit
7b03c2ce53
10
README.md
10
README.md
@ -1,6 +1,3 @@
|
||||
<p align="center">
|
||||
<img src="https://cdn.jsdelivr.net/gh/nineya/halo-theme-dream2.0/screenshot.png" alt="halo-theme-dream2.0" width="180">
|
||||
</p>
|
||||
<h1 align="center">halo-theme-dream2.0</h1>
|
||||
|
||||
<p align="center">
|
||||
@ -15,14 +12,15 @@
|
||||
## Plus版
|
||||
|
||||
- 文档:https://www.sw0.top/docs/halo-theme-dream2.0
|
||||
- **V1.1.0版本起不在使用原主题配置文件,因此升级后均需要重新配置主题,配置一次后,后续升级无需再次配置。**
|
||||
|
||||
|
||||
|
||||
## 版本适配关系
|
||||
|
||||
| 主题版本 | 适配Halo版本 | 测试用Halo版本 |
|
||||
| ----------- | --------------------------- | -------------- |
|
||||
| x.x | 2.6.0+ | 2.14.0 |
|
||||
| 主题版本 | 适配Halo版本 | 测试用Halo版本 |
|
||||
| ----------- |----------| -------------- |
|
||||
| x.x | 2.12.0+ | 2.14.0 |
|
||||
|
||||
|
||||
|
||||
|
@ -162,7 +162,7 @@ spec:
|
||||
- $formkit: "text"
|
||||
name: "icon"
|
||||
label: "图标"
|
||||
placeholder: '请输入菜单图标,支持RemixIcon V4.2.0'
|
||||
placeholder: '请输入菜单图标,支持RemixIcon'
|
||||
- $formkit: "text"
|
||||
name: "desc"
|
||||
label: "描述"
|
||||
|
10
package.json
10
package.json
@ -14,20 +14,22 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nineya/halo-theme-dream2.0.git"
|
||||
"url": "git+https://github.com/zsjy/halo-theme-dream2.0-plus"
|
||||
},
|
||||
"keywords": [
|
||||
"halo",
|
||||
"dream",
|
||||
"nineya",
|
||||
"halo-theme",
|
||||
"halo-theme-dream"
|
||||
"halo-theme-dream",
|
||||
"halo-theme-dream2",
|
||||
"halo-theme-dream2.0-plus"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/nineya/halo-theme-dream2.0/issues"
|
||||
"url": "https://github.com/zsjy/halo-theme-dream2.0-plus/issues"
|
||||
},
|
||||
"homepage": "https://github.com/nineya/halo-theme-dream2.0#readme",
|
||||
"homepage": "https://github.com/zsjy/halo-theme-dream2.0-plus#readme",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.15.5",
|
||||
"@babel/plugin-transform-runtime": "^7.15.0",
|
||||
|
BIN
preview.png
BIN
preview.png
Binary file not shown.
Before Width: | Height: | Size: 2.6 MiB |
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
@ -1,7 +1,7 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Setting
|
||||
metadata:
|
||||
name: theme-dream-setting
|
||||
name: theme-dream2-plus-setting
|
||||
spec:
|
||||
forms:
|
||||
- group: basic_info
|
||||
@ -215,20 +215,19 @@ spec:
|
||||
value: '#5d93db'
|
||||
- $formkit: select
|
||||
name: web_font
|
||||
id: web_font
|
||||
label: 博客字体
|
||||
value: 'default'
|
||||
options:
|
||||
- value: 'default'
|
||||
label: 默认字体
|
||||
- value: 'WenCang.woff2'
|
||||
label: 问藏书房体
|
||||
- value: 'AlimamaDaoLiTi.woff2'
|
||||
label: 阿里巴巴刀隶体
|
||||
- value: 'custom'
|
||||
label: 自定义
|
||||
- $formkit: attachment
|
||||
name: custom_font
|
||||
label: 自定义博客字体
|
||||
validation: required
|
||||
if: $get(web_font).value == 'custom'
|
||||
placeholder: '请输入/选择字体路径'
|
||||
help: '自定义博客字体,在博客字体选项为自定义时生效。支持woff2/woff/ttf/eot/svg格式的字体文件链接,建议使用woff2格式。'
|
||||
- $formkit: repeater
|
||||
@ -264,36 +263,6 @@ spec:
|
||||
label: 仅显示左侧
|
||||
- value: 'only-right'
|
||||
label: 仅显示右侧
|
||||
- value: 'module-left'
|
||||
label: 模块化(左侧)
|
||||
- value: 'module-right'
|
||||
label: 模块化(右侧)
|
||||
- $formkit: repeater
|
||||
name: module_options
|
||||
label: 模块化布局选项
|
||||
help: 可填写 1~6 个链接。
|
||||
children:
|
||||
- $formkit: text
|
||||
name: tag
|
||||
label: 标签
|
||||
- $formkit: text
|
||||
name: title
|
||||
label: 标题
|
||||
- $formkit: text
|
||||
name: url
|
||||
label: 地址
|
||||
- $formkit: attachment
|
||||
name: image
|
||||
label: 背景图
|
||||
- $formkit: radio
|
||||
name: target
|
||||
label: 打开方式
|
||||
value: '_blank'
|
||||
options:
|
||||
- value: '_blank'
|
||||
label: 新窗口
|
||||
- value: '_self'
|
||||
label: 原窗口
|
||||
- $formkit: radio
|
||||
name: left_sidebar_sticky
|
||||
label: 左侧边栏悬浮
|
||||
@ -728,7 +697,7 @@ spec:
|
||||
value:
|
||||
- type: post
|
||||
- type: category
|
||||
- type: comment
|
||||
- type: tag
|
||||
children:
|
||||
- $formkit: select
|
||||
name: type
|
||||
@ -755,7 +724,7 @@ spec:
|
||||
- $formkit: repeater
|
||||
name: custom_options
|
||||
label: 社交渠道
|
||||
help: 图标目前仅支持 RemixIcon V4.2.0。
|
||||
help: 图标支持 RemixIcon。
|
||||
value:
|
||||
- name: QQ聊天
|
||||
icon: 'ri-qq-fill'
|
||||
@ -1249,8 +1218,8 @@ spec:
|
||||
if: $get(effects_lantern_mode).value != 'none'
|
||||
label: 灯笼特效文本定义
|
||||
value:
|
||||
effects_lantern_left: 喜
|
||||
effects_lantern_right: 庆
|
||||
effects_lantern_left: 欢
|
||||
effects_lantern_right: 迎
|
||||
children:
|
||||
- $formkit: text
|
||||
name: effects_lantern_left
|
||||
@ -1261,7 +1230,7 @@ spec:
|
||||
- $formkit: radio
|
||||
name: effects_sakura_mode
|
||||
label: 樱花飘落特效显示模式
|
||||
value: day
|
||||
value: none
|
||||
options:
|
||||
- value: none
|
||||
label: 不显示
|
||||
|
@ -2216,102 +2216,6 @@ button.swiper-pagination-bullet {
|
||||
}
|
||||
}
|
||||
|
||||
.model {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
|
||||
.card.widget {
|
||||
flex-grow: 1;
|
||||
min-height: 140px;
|
||||
position: relative;
|
||||
background-position: 50% 50% !important;
|
||||
background-size: cover !important;
|
||||
|
||||
& + .card.widget {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
&[style] {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.tag {
|
||||
transform: translateX(10px);
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
color: #f6f6f6;
|
||||
font-size: 1.15rem;
|
||||
font-weight: 600;
|
||||
text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
||||
padding: 0 5px;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tag {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 0;
|
||||
color: #f6f6f6;
|
||||
font-size: 1rem;
|
||||
padding: 2px 12px;
|
||||
background: var(--theme);
|
||||
transform: translateX(-105%);
|
||||
transition: transform 0.2s;
|
||||
height: unset;
|
||||
line-height: normal;
|
||||
}
|
||||
}
|
||||
|
||||
&-index {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
.swiper {
|
||||
width: 70%;
|
||||
|
||||
&-slide {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-side {
|
||||
width: 30%;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
&-attach {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
align-items: unset;
|
||||
|
||||
&-2 {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
&-3 {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
|
||||
&-4 {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section {
|
||||
padding: 6rem 0.75rem 3rem 0.75rem;
|
||||
|
||||
@ -3426,15 +3330,13 @@ button.swiper-pagination-bullet {
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
//display: inline;
|
||||
//background: linear-gradient(to bottom, transparent 60%, var(--bg-g) 0);
|
||||
|
||||
&:before, &:after {
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:before {
|
||||
&:not(:first-child):before {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
@ -4171,25 +4073,6 @@ button.swiper-pagination-bullet {
|
||||
}
|
||||
}
|
||||
|
||||
.model {
|
||||
&-index {
|
||||
flex-direction: column;
|
||||
|
||||
.swiper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&-side {
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
&-attach-4 {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-slide-details {
|
||||
|
||||
&-title {
|
||||
@ -4250,10 +4133,6 @@ button.swiper-pagination-bullet {
|
||||
}
|
||||
}
|
||||
|
||||
.model-attach-3 {
|
||||
grid-template-columns: none;
|
||||
}
|
||||
|
||||
.navbar .container {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
@ -4347,18 +4226,6 @@ button.swiper-pagination-bullet {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.model {
|
||||
&-index-side {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&-attach {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: @table-min-width) {
|
||||
.container {
|
||||
|
||||
|
2
templates/assets/css/style.min.css
vendored
2
templates/assets/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
<th:block xmlns:th="https://www.thymeleaf.org">
|
||||
<style th:inline="css"
|
||||
th:with="fontSrc = ${theme.config.basic_style.web_font != 'default' ? theme.config.basic_style.web_font == 'custom' ? theme.config.basic_style.custom_font : #theme.assets('/font/' + theme.config.basic_style.web_font) : ''},
|
||||
th:with="fontSrc = ${theme.config.basic_style.web_font != 'default' ? theme.config.basic_style.custom_font : ''},
|
||||
fontFormat = ${fontSrc.endsWith('.ttf') ? 'truetype' : fontSrc.endsWith('.eot') ? 'embedded-opentype' : fontSrc.replaceAll('^.*\.([\w]+)$', '$1')}">
|
||||
[(${#strings.isEmpty(fontSrc) ? '' : '
|
||||
@font-face {
|
||||
|
@ -27,11 +27,11 @@
|
||||
<th:block th:replace="${content}"/>
|
||||
</div>
|
||||
<th:block
|
||||
th:if="${theme.config.basic_style.sidebar_column!='only-right' && theme.config.basic_style.sidebar_column!='module-left'}">
|
||||
th:if="${theme.config.basic_style.sidebar_column!='only-right'}">
|
||||
<th:block th:replace="~{common/widget :: widget('left')}"/>
|
||||
</th:block>
|
||||
<th:block
|
||||
th:if="${theme.config.basic_style.sidebar_column!='only-left' && theme.config.basic_style.sidebar_column!='module-right'}">
|
||||
th:if="${theme.config.basic_style.sidebar_column!='only-left'}">
|
||||
<th:block th:replace="~{common/widget :: widget('right')}"/>
|
||||
</th:block>
|
||||
</div>
|
||||
|
@ -14,44 +14,14 @@
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
||||
<th:block th:if="${posts.first}" th:fragment="firstIndex"
|
||||
th:with="moduleSize = ${#lists.isEmpty(theme.config.basic_style.module_options) ? 0 : #lists.size(theme.config.basic_style.module_options)}, isModule = ${(theme.config.basic_style.sidebar_column=='module-left' || theme.config.basic_style.sidebar_column=='module-right') && moduleSize > 0}">
|
||||
<th:block th:if="${isModule}">
|
||||
<div class="model model-index">
|
||||
<th:block th:replace="~{::carousel}"/>
|
||||
<div class="model model-index-side">
|
||||
<th:block th:each="index : ${#numbers.sequence(0, 1)}">
|
||||
<th:block th:if="${index < moduleSize}">
|
||||
<th:block th:replace="~{::buildModule (${theme.config.basic_style.module_options.get(index)})}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<div th:if="${moduleSize > 2}" class="'model model-attach model-attach-' + ${moduleSize - 2}">
|
||||
<th:block th:each="index : ${#numbers.sequence(2, 5)}">
|
||||
<th:block th:if="${index < moduleSize}">
|
||||
<th:block th:replace="~{::buildModule (${theme.config.basic_style.module_options.get(index)})}"/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</th:block>
|
||||
<th:block th:unless="${isModule}">
|
||||
<th:block th:if="${posts.first}" th:fragment="firstIndex">
|
||||
<th:block>
|
||||
<th:block th:replace="~{::carousel}"/>
|
||||
</th:block>
|
||||
<div th:if="${!#strings.isEmpty(theme.config.basic_info.index_inform)}" class="card tips brightness"
|
||||
th:utext="${theme.config.basic_info.index_inform}"></div>
|
||||
</th:block>
|
||||
|
||||
<th:block th:fragment="buildModule (option)">
|
||||
<a th:class="'card widget brightness ' + ${option.title != ''? 'bg-shadow' : ''}"
|
||||
th:target="${option.target}"
|
||||
th:style="'background-image: url(' + ${option.image} + ')'"
|
||||
th:href="${option.url}">
|
||||
<div class="title" th:href="${option.title}"></div>
|
||||
<div class="tag" th:text="${option.tag}"></div>
|
||||
</a>
|
||||
</th:block>
|
||||
|
||||
<th:block th:fragment="carousel">
|
||||
<div th:if="${!#lists.isEmpty(theme.config.basic_style.carousel_options)}" class="card widget swiper">
|
||||
<div class="swiper-wrapper">
|
||||
|
12
theme.yaml
12
theme.yaml
@ -8,7 +8,7 @@ spec:
|
||||
displayName: Dream2.0 Plus
|
||||
author:
|
||||
# 作者名称
|
||||
name: 智识家
|
||||
name: 智识家园
|
||||
# 作者网址
|
||||
website: https://www.sw0.top
|
||||
customTemplates:
|
||||
@ -20,14 +20,14 @@ spec:
|
||||
# 主题描述
|
||||
description: '梦之城,童话梦境'
|
||||
# 主题logo地址
|
||||
logo: /themes/theme-dream/assets/img/logo.png
|
||||
logo: /themes/theme-dream2-plus/assets/img/logo.png
|
||||
# 主题地址
|
||||
website: https://github.com/zsjy/halo-theme-dream2.0-plus
|
||||
# 主题github开源地址
|
||||
repo: https://github.com/zsjy/halo-theme-dream2.0-plus.git
|
||||
settingName: theme-dream-setting
|
||||
configMapName: theme-dream-configMap
|
||||
settingName: theme-dream2-plus-setting
|
||||
configMapName: theme-dream2-plus-configMap
|
||||
# 版本号
|
||||
version: 1.0.6
|
||||
version: 1.0.6.00012
|
||||
# 最低支持的 Halo 版本
|
||||
require: ">=2.6.0"
|
||||
require: ">=2.12.0"
|
Loading…
x
Reference in New Issue
Block a user