Initial commit

This commit is contained in:
2021-12-28 08:36:20 +08:00
commit c7703a1cba
17 changed files with 321 additions and 0 deletions

7
module/comment.ftl Normal file
View File

@@ -0,0 +1,7 @@
<#macro comment post,type>
<#if !post.disallowComment!false>
<script src="//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
<script src="${options.comment_internal_plugin_js!'//cdn.jsdelivr.net/gh/halo-dev/halo-comment@latest/dist/halo-comment.min.js'}"></script>
<halo-comment id="${post.id?c}" type="${type}"/>
</#if>
</#macro>

31
module/macro.ftl Normal file
View File

@@ -0,0 +1,31 @@
<#macro layout title>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="${meta_keywords!}"/>
<meta name="description" content="${meta_description!}" />
<#--
公共 head 代码详情请参考https://docs.halo.run/zh/developer-guide/theme/public-template-tag
包含Favicon自定义 head 等
-->
<@global.head />
<title>${title}</title>
</head>
<body>
<#include "menu.ftl">
<#nested >
<#--
公共底部代码详情请参考https://docs.halo.run/zh/developer-guide/theme/public-template-tag
包含:统计代码,底部信息
-->
<@global.footer />
</body>
</html>
</#macro>

10
module/menu.ftl Normal file
View File

@@ -0,0 +1,10 @@
<@menuTag method="list">
<#--
?sort_by('priority'):根据菜单的排序编号排序
-->
<#list menus?sort_by('priority') as menu>
<li>
<a href="${menu.url}" target="${menu.target!}">${menu.name} </a>
</li>
</#list>
</@menuTag>