移除我的装备模板,改为插件方式
This commit is contained in:
parent
e917fc7964
commit
b9c257f1b4
|
@ -135,3 +135,41 @@ spec:
|
||||||
- $formkit: "textarea"
|
- $formkit: "textarea"
|
||||||
name: "description"
|
name: "description"
|
||||||
label: "分组描述"
|
label: "分组描述"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1alpha1
|
||||||
|
kind: AnnotationSetting
|
||||||
|
metadata:
|
||||||
|
generateName: annotation-setting-
|
||||||
|
spec:
|
||||||
|
targetRef:
|
||||||
|
group: core.halo.run
|
||||||
|
kind: EquipmentGroup
|
||||||
|
formSchema:
|
||||||
|
- $formkit: "textarea"
|
||||||
|
name: "description"
|
||||||
|
label: "分组描述"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1alpha1
|
||||||
|
kind: AnnotationSetting
|
||||||
|
metadata:
|
||||||
|
generateName: annotation-setting-
|
||||||
|
spec:
|
||||||
|
targetRef:
|
||||||
|
group: core.halo.run
|
||||||
|
kind: Equipment
|
||||||
|
formSchema:
|
||||||
|
- $formkit: "text"
|
||||||
|
name: "model"
|
||||||
|
label: "装备型号/版本"
|
||||||
|
- $formkit: "text"
|
||||||
|
name: "button"
|
||||||
|
label: "左下角按钮显示文字"
|
||||||
|
value: "详情"
|
||||||
|
- $formkit: "text"
|
||||||
|
name: "link"
|
||||||
|
label: "左下角按钮跳转链接"
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org"
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"
|
||||||
th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'page',title = ${singlePage.spec.title + ' | ' + site.title}, head = ~{::head})}">
|
th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'equipments',title = ${title + ' | ' + site.title}, head = ~{::head},_title = ${title})}">
|
||||||
<th:block th:fragment="head">
|
<th:block th:fragment="head">
|
||||||
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = ${singlePage.spec.title},
|
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = ${_title},
|
||||||
_permalink = ${singlePage.status.permalink},
|
_permalink = '/equipments',
|
||||||
_cover = ${singlePage.spec.cover},
|
_cover = ${theme.config.other.opengraph.image},
|
||||||
_excerpt = ${singlePage.status.excerpt},
|
_excerpt = ${site.seo.description},
|
||||||
_type = 'website')}"></th:block>
|
_type = 'website')}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<!-- 头部导航栏 -->
|
<!-- 头部导航栏 -->
|
||||||
<header class="not-top-img" id="page-header">
|
<header class="not-top-img" id="page-header">
|
||||||
<nav th:replace="~{modules/nav :: nav(title = ${singlePage.spec.title})}"></nav>
|
<nav th:replace="~{modules/nav :: nav(title = ${_title})}"></nav>
|
||||||
</header>
|
</header>
|
||||||
<main class="layout hide-aside" id="content-inner">
|
<main class="layout hide-aside" id="content-inner">
|
||||||
<div id="page">
|
<div id="page">
|
||||||
|
@ -24,36 +24,35 @@
|
||||||
detail = ${theme.config.equipment.detail},
|
detail = ${theme.config.equipment.detail},
|
||||||
buttonUrl = '',
|
buttonUrl = '',
|
||||||
buttonTitle = '')}" ></div>
|
buttonTitle = '')}" ></div>
|
||||||
<div id="equipment" th:if="${not #lists.isEmpty(theme.config.equipment.category_list)}"
|
<div id="equipment" th:if="${not #lists.isEmpty(groups)}">
|
||||||
th:with="categoryList = ${theme.config.equipment.category_list}">
|
<th:block th:each="group : ${groups}">
|
||||||
<th:block th:each="category : ${categoryList}">
|
|
||||||
<div class="equipment-item">
|
<div class="equipment-item">
|
||||||
<h2 class="equipment-item-title">[[${category.category_name}]]</h2>
|
<h2 class="equipment-item-title">[[${group.spec.displayName}]]</h2>
|
||||||
<div class="equipment-item-description">[[${category.description}]]</div>
|
<div class="equipment-item-description">[[${#annotations.get(group, 'description')}]]</div>
|
||||||
<div class="equipment-item-content" th:with="equipmentList = ${category.equipment_list}">
|
<div class="equipment-item-content" th:with="equipmentList = ${group.equipments}">
|
||||||
|
|
||||||
<div class="equipment-item-content-item" th:each="equipment : ${equipmentList}">
|
<div class="equipment-item-content-item" th:each="equipment : ${equipmentList}">
|
||||||
<div class="equipment-item-content-item-cover">
|
<div class="equipment-item-content-item-cover">
|
||||||
<img class="equipment-item-content-item-image"
|
<img class="equipment-item-content-item-image"
|
||||||
th:alt="${equipment.name}"
|
th:alt="${equipment.spec.displayName}"
|
||||||
th:src="${isLazyload ? loadingImg : equipment.img}"
|
th:src="${isLazyload ? loadingImg : equipment.spec.url}"
|
||||||
th:data-lazy-src="${ isLazyload ? equipment.img : ''}">
|
th:data-lazy-src="${ isLazyload ? equipment.spec.url : ''}">
|
||||||
</div>
|
</div>
|
||||||
<div class="equipment-item-content-item-info">
|
<div class="equipment-item-content-item-info">
|
||||||
<div class="equipment-item-content-item-name"
|
<div class="equipment-item-content-item-name"
|
||||||
th:onclick="rm.rightmenuCopyText([[${equipment.name}]]);btf.snackbarShow('已复制装备名称');">
|
th:onclick="rm.rightmenuCopyText([[${equipment.spec.displayName}]]);btf.snackbarShow('已复制装备名称');">
|
||||||
[[${equipment.name}]]
|
[[${equipment.spec.displayName}]]
|
||||||
</div>
|
</div>
|
||||||
<div class="equipment-item-content-item-specification">[[${equipment.model}]]
|
<div class="equipment-item-content-item-specification">[[${#annotations.get(equipment, 'model')}]]
|
||||||
</div>
|
</div>
|
||||||
<div class="equipment-item-content-item-description">
|
<div class="equipment-item-content-item-description">
|
||||||
[[${equipment.description}]]
|
[[${equipment.spec.description}]]
|
||||||
</div>
|
</div>
|
||||||
<div class="equipment-item-content-item-toolbar">
|
<div class="equipment-item-content-item-toolbar">
|
||||||
<a class="equipment-item-content-item-link" th:href="${equipment.url}"
|
<a class="equipment-item-content-item-link" th:href="${#annotations.get(equipment, 'link')}"
|
||||||
target="_blank">[[${equipment.button}]]</a>
|
target="_blank">[[${#annotations.get(equipment, 'button')}]]</a>
|
||||||
<a class="bber-reply"
|
<a class="bber-reply"
|
||||||
th:onclick="rightMenuCommentText([['"'+${equipment.name}+' '+${equipment.model}+' '+${equipment.description}+'"']]);"
|
th:onclick="rightMenuCommentText([['"'+${equipment.spec.displayName}+' '+${#annotations.get(equipment, 'model')}+' '+${equipment.spec.description}+'"']]);"
|
||||||
data-pjax-state="">
|
data-pjax-state="">
|
||||||
<i class="haofont hao-icon-message" style="font-size: 17px;"></i>
|
<i class="haofont hao-icon-message" style="font-size: 17px;"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -197,8 +196,8 @@
|
||||||
<th:block
|
<th:block
|
||||||
th:replace="~{modules/comment :: comment(group = 'content.halo.run',
|
th:replace="~{modules/comment :: comment(group = 'content.halo.run',
|
||||||
kind = 'SinglePage',
|
kind = 'SinglePage',
|
||||||
name = ${singlePage.metadata.name},
|
name = 'equipment',
|
||||||
allowComment = ${singlePage.spec.allowComment})}"/>
|
allowComment = true)}"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</main>
|
</main>
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = '404', title = '404')}"
|
<html lang="en" th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = '404', title = '404', head = null)}"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = '500', title = '500')}"
|
<html lang="en" th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = '500', title = '500', head = null)}"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = ${site.title},
|
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = ${site.title},
|
||||||
_permalink = '',
|
_permalink = '',
|
||||||
_cover = ${theme.config.other.opengraph.image},
|
_cover = ${theme.config.other.opengraph.image},
|
||||||
_excerpt = '',
|
_excerpt = ${site.seo.description},
|
||||||
_type = 'website')}"></th:block>
|
_type = 'website')}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
th:with="newcommentnumber = ${#conversions.convert(theme.config.sidebar.newcomment.newcommentnumber, 'java.lang.Integer') >= 0 ? theme.config.sidebar.newcommentnumber : 5}">
|
th:with="newcommentnumber = ${#conversions.convert(theme.config.sidebar.newcomment.newcommentnumber, 'java.lang.Integer') >= 0 ? theme.config.sidebar.newcommentnumber : 5}">
|
||||||
<div th:each="comment,iterStat : ${commentFinder.list(null, 1, newcommentnumber)}" class="aside-list-item"
|
<div th:each="comment,iterStat : ${commentFinder.list(null, 1, newcommentnumber)}" class="aside-list-item"
|
||||||
th:with="page = ${comment.spec.subjectRef.kind == 'Post' ? postFinder.getByName(comment.spec.subjectRef.name) :
|
th:with="page = ${comment.spec.subjectRef.kind == 'Post' ? postFinder.getByName(comment.spec.subjectRef.name) :
|
||||||
comment.spec.subjectRef.kind == 'SinglePage' && not #strings.contains('photos,links,moments', comment.spec.subjectRef.name) ? singlePageFinder.getByName(comment.spec.subjectRef.name) : null},
|
comment.spec.subjectRef.kind == 'SinglePage' && not #strings.contains('photos,links,moments,equipment', comment.spec.subjectRef.name) ? singlePageFinder.getByName(comment.spec.subjectRef.name) : null},
|
||||||
url = ${page == null? '/' : page.status.permalink + '#comment-' + comment.metadata.name}">
|
url = ${page == null? '/' : page.status.permalink + '#comment-' + comment.metadata.name}">
|
||||||
<span th:text="${commentIndex}"></span>
|
<span th:text="${commentIndex}"></span>
|
||||||
<a class="thumbnail" th:href="${url}" data-pjax-state="">
|
<a class="thumbnail" th:href="${url}" data-pjax-state="">
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org"
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"
|
||||||
th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'moments',title = ${title + ' | ' + site.title}, head = ~{::head})}">
|
th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'moments',title = ${title + ' | ' + site.title}, head = ~{::head}, _title = ${title})}">
|
||||||
<th:block th:fragment="head">
|
<th:block th:fragment="head">
|
||||||
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = '瞬间',
|
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = ${_title},
|
||||||
_permalink = '/moments',
|
_permalink = '/moments',
|
||||||
_cover = ${theme.config.other.opengraph.image},
|
_cover = ${theme.config.other.opengraph.image},
|
||||||
_excerpt = ${site.seo.description},
|
_excerpt = ${site.seo.description},
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<!-- 头部导航栏 -->
|
<!-- 头部导航栏 -->
|
||||||
<header class="not-top-img" id="page-header">
|
<header class="not-top-img" id="page-header">
|
||||||
<nav th:replace="~{modules/nav :: nav(title = '瞬间')}"></nav>
|
<nav th:replace="~{modules/nav :: nav(title = ${_title})}"></nav>
|
||||||
</header>
|
</header>
|
||||||
<main class="layout hide-aside" id="content-inner">
|
<main class="layout hide-aside" id="content-inner">
|
||||||
<div id="page">
|
<div id="page">
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<script data-pjax th:inline="javascript">
|
<script data-pjax th:inline="javascript">
|
||||||
var postsData = [[${ postFinder.listAll() }]];
|
var postsData = [[${ postFinder.listAll() }]];
|
||||||
var pageData = [[${ singlePageFinder.list(1, 50) }]];
|
var pageData = [[${ singlePageFinder.list(1, 50) }]];
|
||||||
var articles = [{ path: '/links', title: '友链' }, { path: '/bangumis', title: '追番' }, { path: '/moments', title: '瞬间' }, { path: '/photos', title: '图库' }];
|
var articles = [{ path: '/links', title: '友链' }, { path: '/bangumis', title: '追番' }, { path: '/equipment', title: '我的装备' }, { path: '/moments', title: '瞬间' }, { path: '/photos', title: '图库' }];
|
||||||
|
|
||||||
if (postsData.length > 0) {
|
if (postsData.length > 0) {
|
||||||
postsData.map((item) => {
|
postsData.map((item) => {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org"
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"
|
||||||
th:replace="~{modules/layouts/layout :: layout(content = ~{::content},htmlType = 'photos',title = ${title + ' | ' + site.title}, head = ~{::head})}">
|
th:replace="~{modules/layouts/layout :: layout(content = ~{::content},htmlType = 'photos',title = ${title + ' | ' + site.title}, head = ~{::head},_title = ${title})}">
|
||||||
<th:block th:fragment="head">
|
<th:block th:fragment="head">
|
||||||
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = '图库',
|
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = ${_title},
|
||||||
_permalink = '/photos',
|
_permalink = '/photos',
|
||||||
_cover = ${theme.config.other.opengraph.image},
|
_cover = ${theme.config.other.opengraph.image},
|
||||||
_excerpt = ${site.seo.description},
|
_excerpt = ${site.seo.description},
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<div class="page" id="body-wrap">
|
<div class="page" id="body-wrap">
|
||||||
<!-- 头部导航栏 -->
|
<!-- 头部导航栏 -->
|
||||||
<header class="not-top-img" id="page-header">
|
<header class="not-top-img" id="page-header">
|
||||||
<nav th:replace="~{modules/nav :: nav(title = '图库')}"></nav>
|
<nav th:replace="~{modules/nav :: nav(title = ${_title})}"></nav>
|
||||||
</header>
|
</header>
|
||||||
<main class="layout hide-aside" id="content-inner">
|
<main class="layout hide-aside" id="content-inner">
|
||||||
<div id="page">
|
<div id="page">
|
||||||
|
|
|
@ -37,10 +37,6 @@ spec:
|
||||||
description: 待办清单页面
|
description: 待办清单页面
|
||||||
screenshot:
|
screenshot:
|
||||||
file: todolist.html
|
file: todolist.html
|
||||||
- name: 我的装备页面模版
|
|
||||||
description: 我的装备页面
|
|
||||||
screenshot:
|
|
||||||
file: equipment.html
|
|
||||||
- name: 相册页面模版
|
- name: 相册页面模版
|
||||||
description: 相册页面
|
description: 相册页面
|
||||||
screenshot:
|
screenshot:
|
||||||
|
|
Loading…
Reference in New Issue