Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
8947626797 |
58
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
58
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -1,58 +0,0 @@
|
||||
name: BUG 提交
|
||||
description: 提交 Bug 反馈
|
||||
title: 'bug:'
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
id: preface
|
||||
attributes:
|
||||
value: |
|
||||
感谢你花时间填写此错误报告!在开始之前,我们非常推荐阅读一遍[《开源最佳实践》](https://github.com/LinuxSuRen/open-source-best-practice),这会在很大程度上提高我们彼此的效率。
|
||||
- type: markdown
|
||||
id: environment
|
||||
attributes:
|
||||
value: "## 环境信息"
|
||||
- type: input
|
||||
id: halo-version
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "是什么 Halo 版本出现了此问题?"
|
||||
description: "可以在管理后台的关于页面中找到。"
|
||||
- type: input
|
||||
id: dream-version
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "使用的 Dream 版本是多少?"
|
||||
description: "可以在主题 `theme.yaml` 文件中找到。"
|
||||
- type: input
|
||||
id: site-url
|
||||
attributes:
|
||||
label: "在线博客地址"
|
||||
description: "如果可以的话,请提供你的博客地址。这可能会帮助我们更好的定位问题。"
|
||||
placeholder: "ex. https://blog.nineya.com"
|
||||
validations:
|
||||
required: false
|
||||
- type: markdown
|
||||
id: details
|
||||
attributes:
|
||||
value: "## 详细信息"
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: "BUG 内容"
|
||||
description: "较详细的描述 BUG 导致了什么问题。"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: "相关 Console 日志输出"
|
||||
description: "浏览器界面按 `F12` 进入开发者工具,请复制并粘贴任何相关的控制台日志输出。 这将自动格式化为代码,因此无需反引号。"
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: additional-information
|
||||
attributes:
|
||||
label: "附加信息"
|
||||
description: "如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。"
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: 加入主题交流群
|
||||
url: https://qm.qq.com/cgi-bin/qm/qr?k=X7p7Bs21cgtkQ0dRfzmBsuWqNNQc10hn&jump_from=webapi
|
||||
about: 如果问题描述起来较于复杂,欢迎加入 Dream 主题交流群进行提问。
|
35
.github/ISSUE_TEMPLATE/custom_config.yml
vendored
35
.github/ISSUE_TEMPLATE/custom_config.yml
vendored
@ -1,35 +0,0 @@
|
||||
name: 定制化配置
|
||||
description: 提交定制化配置疑问
|
||||
title: 'custom:'
|
||||
labels: [custom]
|
||||
body:
|
||||
- type: markdown
|
||||
id: preface
|
||||
attributes:
|
||||
value: "你好!感谢你为 Dream 提交定制化配置建议。在开始之前,我们非常推荐阅读一遍[《开源最佳实践》](https://github.com/LinuxSuRen/open-source-best-practice),这会在很大程度上提高我们彼此的效率。"
|
||||
- type: markdown
|
||||
id: environment
|
||||
attributes:
|
||||
value: "## 环境信息"
|
||||
- type: input
|
||||
id: dream-version
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "你当前使用的 Dream 版本"
|
||||
description: "可以在主题 `theme.yaml` 文件中找到。"
|
||||
- type: markdown
|
||||
id: details
|
||||
attributes:
|
||||
value: "## 详细信息"
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: "描述一下此定制化内容"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: additional-information
|
||||
attributes:
|
||||
label: "补充信息"
|
||||
description: "如果你还有其他需要提供的信息或解决思路,可以在这里填写。"
|
41
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
41
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@ -1,41 +0,0 @@
|
||||
name: 新特性建议
|
||||
description: 提交新特性建议
|
||||
title: 'feat:'
|
||||
body:
|
||||
- type: markdown
|
||||
id: preface
|
||||
attributes:
|
||||
value: "你好!感谢你为 Dream 提交新特性建议。在开始之前,我们非常推荐阅读一遍[《开源最佳实践》](https://github.com/LinuxSuRen/open-source-best-practice),这会在很大程度上提高我们彼此的效率。"
|
||||
- type: markdown
|
||||
id: environment
|
||||
attributes:
|
||||
value: "## 环境信息"
|
||||
- type: input
|
||||
id: halo-version
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "你当前使用的 Halo 版本"
|
||||
description: "可以在管理后台的关于页面中找到。"
|
||||
- type: input
|
||||
id: dream-version
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "你当前使用的 Dream 版本"
|
||||
description: "可以在主题 `theme.yaml` 文件中找到。"
|
||||
- type: markdown
|
||||
id: details
|
||||
attributes:
|
||||
value: "## 详细信息"
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: "描述一下此特性"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: additional-information
|
||||
attributes:
|
||||
label: "附加信息"
|
||||
description: "如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。"
|
36
README.md
36
README.md
@ -15,30 +15,11 @@
|
||||
本仓库为 `Halo 2.x` 主题仓库,如果你使用的是 `Halo 1.x` ,请前往:https://github.com/nineya/halo-theme-dream
|
||||
|
||||
## 一、预览
|
||||
|
||||

|
||||
|
||||
本人为原作者主题进行二次开发
|
||||
预览:[主题预览](https://github.com/nineya/halo-theme-dream/discussions/72)
|
||||
> 如果你有计划长期使用 `Dream` 主题,也来[这里](https://github.com/nineya/halo-theme-dream/discussions/72)留下你的博客链接吧。
|
||||
|
||||
|
||||
|
||||
## 二、说明
|
||||
|
||||
梦之城,童话梦境,动漫类型博客主题。
|
||||
|
||||
关于主题使用上的一些问题可以参见 [主题使用手册-基础篇](https://blog.nineya.com/archives/94.html)
|
||||
|
||||
如有疑问,欢迎加入 <a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=X7p7Bs21cgtkQ0dRfzmBsuWqNNQc10hn&jump_from=webapi">Dream 主题交流群:638168592</a>
|
||||
|
||||
欢迎参与主题开发的一些<a href="https://github.com/nineya/halo-theme-dream/discussions">问题探讨</a>
|
||||
|
||||
欢迎关注微信公众号《玖涯菜菜子》,主题版本更新消息与要点说明将在公众号发布。
|
||||
|
||||

|
||||
|
||||
|
||||
## 三、版本适配关系
|
||||
## 二、版本适配关系
|
||||
|
||||
| 主题版本 | 适配Halo版本 | 测试用Halo版本 |
|
||||
| ----------- | --------------------------- | -------------- |
|
||||
@ -46,9 +27,7 @@
|
||||
|
||||
|
||||
|
||||
## 四、安装 & 更新
|
||||
|
||||
|
||||
## 三、安装 & 更新
|
||||
|
||||
1. 进入主题 `Release` 界面:https://github.com/nineya/halo-theme-dream2.0/releases 下载主题压缩包 `halo-theme-dream.zip` 压缩包文件;
|
||||
2. 进入博客后台管理 `主题->主题管理->安装主题`,选择下载的 `halo-theme-dream.zip` 安装包进行上传;
|
||||
@ -57,7 +36,7 @@
|
||||
|
||||
|
||||
|
||||
## 五、参与主题开发
|
||||
## 四、主题开发
|
||||
|
||||
> 推荐使用 IDEA 进行主题开发,能够比较好的支持 FreeMarker。
|
||||
|
||||
@ -75,10 +54,3 @@
|
||||
- `npm run release --tag=$version` 发布模式执行主题打包操作,将自动更新主题中的版本号,并使用这个版本标签重新创建 `FreeCDN` 清单文件。
|
||||
|
||||
|
||||
|
||||
|
||||
## 六、打赏项目
|
||||
|
||||
感谢您对本项目的喜爱,您的打赏是对本项目最好的支持!
|
||||
|
||||

|
||||
|
@ -93,6 +93,12 @@ spec:
|
||||
label: 关闭
|
||||
- value: ""
|
||||
label: 跟随默认配置
|
||||
- $formkit: text
|
||||
name: link_group_name
|
||||
label: 链接页指定分组
|
||||
value: ""
|
||||
placeholder: '请输入链接分组'
|
||||
help: '当模板选择快捷链接时,可填选该项,目前值获取只能在链接分组配置后,去数据库查看。'
|
||||
- $formkit: text
|
||||
name: tips
|
||||
label: 文章提示
|
||||
|
@ -1,7 +1,7 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Setting
|
||||
metadata:
|
||||
name: theme-dream-setting
|
||||
name: theme-pika-setting
|
||||
spec:
|
||||
forms:
|
||||
- group: basic_info
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 65 KiB |
@ -1,19 +1,24 @@
|
||||
<html lang="zh" xmlns:th="https://www.thymeleaf.org"
|
||||
th:class="${theme.config.basic_style.theme_style}"
|
||||
th:fragment="layout (title, canonical, content, isPost)">
|
||||
<!-- 这个是没有样式的 -->
|
||||
<th:block th:if="${!#strings.equals('',param._pjax)}"
|
||||
th:with="contributor = ${contributorFinder.getContributor(theme.config.basic_info.metadata_name)}">
|
||||
<th:block th:replace="~{common/head :: head}"/>
|
||||
<body>
|
||||
<div class="column-main">
|
||||
<th:block th:replace="${content}"/>
|
||||
column-main123
|
||||
</div>
|
||||
common/scripts
|
||||
<th:block th:replace="~{common/scripts}"/>
|
||||
</body>
|
||||
</th:block>
|
||||
<!-- 有样式的 -->
|
||||
<th:block th:unless="${!#strings.equals('',param._pjax)}"
|
||||
th:with="stats = ${siteStatsFinder.getStats()},
|
||||
contributor = ${contributorFinder.getContributor(theme.config.basic_info.metadata_name)}">
|
||||
<!--菜单-->
|
||||
<th:block th:replace="~{common/head :: head}"/>
|
||||
<body>
|
||||
<th:block th:replace="~{common/navbar}"/>
|
||||
@ -23,13 +28,17 @@
|
||||
<section class="section">
|
||||
<div th:class="${theme.config.basic_style.sidebar_column != 'all' ? 'container two-column' : 'container' }">
|
||||
<div class="columns">
|
||||
<!--中间的主题内容-->
|
||||
<div class="column column-main">
|
||||
<!--显示什么外部传入-->
|
||||
<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: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:block th:replace="~{common/widget :: widget('right')}"/>
|
||||
|
@ -1,7 +1,8 @@
|
||||
<!--文章主体-->
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="article (post, type)"
|
||||
th:with="updateInterval = ${T(java.lang.Math).floor((#dates.createNow().getTime()/1000.0 - post.status.lastModifyTime.getEpochSecond())/86400.0).intValue()}">
|
||||
|
||||
<!--头部图片-->
|
||||
<div th:if="${!#strings.isEmpty(post.spec.cover)}" class="card widget">
|
||||
<div class="cover-image" th:style="'background-image: url(' + ${post.spec.cover} + ')'">
|
||||
<div th:if="${type == 'Post' && !#lists.isEmpty(post.categories)}" class="category">
|
||||
@ -21,19 +22,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--失效提示-->
|
||||
<div th:if="${!#strings.isEmpty(theme.config.post.invalid_tips_day) && updateInterval > T(java.lang.Long).parseLong(theme.config.post.invalid_tips_day)}"
|
||||
class="card tips brightness"><i class="fa fa-times click-close" data-close=".tips"></i>本文最后更新于
|
||||
[[${#dates.format(post.status.lastModifyTime,'yyyy-MM-dd')}]],距今已有 [[${updateInterval}]]
|
||||
天,若文章内容或图片链接失效,请留言反馈。
|
||||
</div>
|
||||
|
||||
<!--提示文本1-->
|
||||
<div th:if="${!#strings.isEmpty(post.metadata.annotations.get('tips'))}" class="card tips brightness"><i
|
||||
class="fa fa-times click-close" data-close=".tips"></i>[[${post.metadata.annotations.tips}]]
|
||||
</div>
|
||||
|
||||
<!--内容主题-->
|
||||
<div class="card">
|
||||
<div class="card-content main">
|
||||
<!--头部图片为空时,显示文本-->
|
||||
<th:block th:if="${#strings.isEmpty(post.spec.cover)}">
|
||||
<h1 class="title" th:text="${post.spec.title}"></h1>
|
||||
<div class="meta">
|
||||
@ -53,18 +57,21 @@
|
||||
<hr/>
|
||||
</th:block>
|
||||
|
||||
<!--内容-->
|
||||
<div th:data-id="${post.metadata.name}" th:data-target="${type}" class="main-content article"
|
||||
th:utext="${post.content.content}">
|
||||
</div>
|
||||
|
||||
<!--赞-->
|
||||
<th:block th:replace="~{main/admire}"/>
|
||||
|
||||
<!--为文章时显示分类-->
|
||||
<div th:if="${type == 'Post' && !#lists.isEmpty(post.tags)}" class="article-operation">
|
||||
<div class="level-item">
|
||||
<a th:each=" tag : ${post.tags}" th:href="${tag.status.permalink}"
|
||||
th:text="${tag.spec.displayName}"></a>
|
||||
</div>
|
||||
</div>
|
||||
<!--版权信息和分享-->
|
||||
<th:bolck th:if="${enableCopyright || enableShare}">
|
||||
<hr/>
|
||||
<th:block th:if="${enableCopyright}">
|
||||
|
67
templates/quick_link.html
Normal file
67
templates/quick_link.html
Normal file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = ${singlePage.spec.title + ' - ' + site.title}, canonical = @{/links}, content = ~{::content (${singlePage})}, isPost = false)}">
|
||||
<th:block th:fragment="content (post)" th:with="defaultAvatar = ${#strings.defaultString(post.metadata.annotations.links_default_avatar, #theme.assets('/img/avatar.svg'))}">
|
||||
<!--头部图片-->
|
||||
<div th:if="${!#strings.isEmpty(post.spec.cover)}" class="card widget">
|
||||
<div class="cover-image" th:style="'background-image: url(' + ${post.spec.cover} + ')'">
|
||||
<div class="details">
|
||||
<h1 class="title" th:text="${post.spec.title}"></h1>
|
||||
<ul class="breadcrumb">
|
||||
<li th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd HH:mm')}"></li>
|
||||
<li><i class="fa fa-eye"></i>[[${post.stats.visit}]]</li>
|
||||
<li th:if="${post.spec.allowComment}" class="is-hidden-mobile"><i class="fa fa-comments-o"></i>[[${post.stats.comment}]]
|
||||
</li>
|
||||
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
||||
<li><i class="fa fa-pencil"></i>[[${#strings.length(#strings.trim(post.content.content))}]]</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--未指定分组时-->
|
||||
<div class="card">
|
||||
<div class="card-content main">
|
||||
<h1 class="title" th:text="${contributor.displayName} + '收藏栏'"></h1>
|
||||
<div class="main-content">
|
||||
<th:block th:each="group : ${linkFinder.groupBy()}">
|
||||
<div th:if="${!#lists.isEmpty(group.links)}" class="links">
|
||||
<h3 class="link-title"
|
||||
th:text="${#strings.defaultString(group.spec.displayName, '秘密')}"
|
||||
th:id="'toc' + ${groupStat.index}"></h3>
|
||||
<ul class="link-items">
|
||||
<li th:each="link : ${group.links}">
|
||||
<a class="links-item" th:href="${link.spec.url}" rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
th:title="${link.spec.description}">
|
||||
<img th:if="${#strings.isEmpty(link.spec.logo)}" class="not-gallery"
|
||||
th:title="${link.spec.displayName}" th:src="${defaultAvatar}"
|
||||
th:alt="${link.spec.displayName}">
|
||||
<img th:unless="${#strings.isEmpty(link.spec.logo)}" class="not-gallery"
|
||||
th:title="${link.spec.displayName}" th:src="${defaultAvatar}"
|
||||
th:data-url="${link.spec.logo}"
|
||||
th:data-default="${defaultAvatar}"
|
||||
onload="if(!this.finish){this.finish=true;this.src=this.getAttribute('data-url')}"
|
||||
onerror="this.onerror='';if (this.finish) {this.src=this.getAttribute('data-default')} else {this.finish=true;this.src=this.getAttribute('data-url')}"
|
||||
th:alt="${link.spec.displayName}">
|
||||
<span class="link-name" th:text="${link.spec.displayName}"></span>
|
||||
<div class="link-desc"
|
||||
th:text="${#strings.defaultString(link.spec.description, '暂无介绍')}"></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-content" id="comment-wrapper"
|
||||
th:if="${pluginFinder.available('PluginCommentWidget') && enableComment}">
|
||||
<h3 class="comment-title">评论</h3>
|
||||
<div class="widget-comment" th:data-id="${theme.config.page_config.link_comment_id}"
|
||||
data-target="SinglePage"></div>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
</th:block>
|
28
theme.yaml
28
theme.yaml
@ -2,26 +2,32 @@ apiVersion: theme.halo.run/v1alpha1
|
||||
kind: Theme
|
||||
metadata:
|
||||
# 主题id,唯一
|
||||
name: theme-dream
|
||||
name: theme-pika
|
||||
spec:
|
||||
# 主题名称
|
||||
displayName: Dream
|
||||
displayName: pika
|
||||
author:
|
||||
# 作者名称
|
||||
name: nineya
|
||||
name: jecyp
|
||||
# 作者网址
|
||||
website: https://blog.nineya.com
|
||||
website: https://www.jecyp.com
|
||||
# 主题描述
|
||||
description: '梦之城,童话梦境'
|
||||
description: '我的世界'
|
||||
# 主题logo地址
|
||||
logo: /themes/theme-dream/assets/img/logo.png
|
||||
logo: /themes/theme-pika/assets/img/logo.png
|
||||
# 主题地址
|
||||
website: https://github.com/nineya/halo-theme-dream2.0
|
||||
website: https://www.gitea.jecyp.com/nineya/halo-theme-dream2.0
|
||||
# 主题github开源地址
|
||||
repo: https://github.com/nineya/halo-theme-dream2.0.git
|
||||
settingName: theme-dream-setting
|
||||
configMapName: theme-dream-configMap
|
||||
repo: https://www.gitea.jecyp.com/nineya/halo-theme-dream2.0.git
|
||||
settingName: theme-pika-setting
|
||||
configMapName: theme-pika-configMap
|
||||
# 版本号
|
||||
version: 1.0.4
|
||||
version: 0.0.1
|
||||
# 最低支持的 Halo 版本
|
||||
require: ">=2.0.0"
|
||||
# 独立页面的自定义模板配置
|
||||
customTemplates:
|
||||
page:
|
||||
- name: 快捷链接
|
||||
description: 链接收藏页面
|
||||
file: quick_link.html
|
Loading…
Reference in New Issue
Block a user