瞎改的一天

This commit is contained in:
julylies 2022-06-19 00:31:24 +08:00
parent 354f998c86
commit 55ff980c13
22 changed files with 140 additions and 191 deletions

View File

@ -4,7 +4,7 @@
<div class="wrap">
<div class="error-page">
<h1>400</h1>
<p>找不到页面啦</p>
<p>嘤嘤嘤,找不到页面啦</p>
<img src="${theme_base!}/source/images/404.png"/>
</div>
</div>

View File

@ -4,7 +4,7 @@
<div class="wrap">
<div class="error-page">
<h1>404</h1>
<p>找不到页面啦</p>
<p>嘤嘤嘤,找不到页面啦</p>
<img src="${theme_base!}/source/images/404.png"/>
</div>
</div>

View File

@ -4,7 +4,7 @@
<div class="wrap">
<div class="error-page">
<h1>500</h1>
<p>出错了</p>
<p>嘤嘤嘤,出错了</p>
<img src="${theme_base!}/source/images/404.png"/>
</div>
</div>

View File

@ -5,46 +5,6 @@
<section class="home-title">
<h1>归档</h1>
</section>
<#--<@categoryTag method="list">
<#list categories as category>
<span><a href="${category.fullPath!}">${category.name!}${category.postCount!}</a></span>
</#list>
</@categoryTag>
</section>
<section class="home-posts">
<@postTag method="archive" type="month">
<div class="post-item">
<#list archives as archive>
<h2>${archive.year?c}-${archive.month?c}</h2>
<ul>
<#list archive.posts?sort_by("createTime")?reverse as post>
<li>
<a href="${post.fullPath!}">${post.title!}</a>
<div class="post-meta">
<time class="date">${post.createTime?string('yyyy-MM-dd')}</time>
<span class="category">
<#list post.categories as category>
<a href="${category.fullPath!}" >
${category.name!}
</a>
</#list>
</span>
<span class="tags">
<#list post.tags as tag>
<a href="${tag.fullPath}" class="tag">
${tag.name}
</a>
</#list>
</span>
<span class="comments">${post.commentCount!}°C</span>
</div>
</li>
</#list>
</ul>
</#list>
</div>
</@postTag>
</section>-->
<section class="home-posts">
<@postTag method="archive" type="month">
<div class="post-item">
@ -63,4 +23,4 @@
</section>
</div>
</main>
<#include "footer.ftl">
<#include "footer.ftl">

View File

@ -1,5 +1,11 @@
<#include "header.ftl">
<@head title="分类:${category.name} - ${blog_title!}" />
<#include "module/module_pageNav.ftl">
<h1>分类:${category.name}</h1>
<#include "module/post-module.ftl">
<main>
<div class="wrap min">
<#include "module/module_post.ftl">
<@pageNav method="categoryPosts" />
</div>
<main>
<#include "footer.ftl">

View File

@ -27,7 +27,9 @@
<meta name="site" content="${blog_url!}">
<meta property="twitter:partner" content="ogwp">
<link rel="canonical" href="${blog_url!}">
<link rel="apple-touch-icon" sizes="180x180" href="${options.blog_favicon!}">
<#if !(options.blog_favicon?? && options.blog_favicon!='')>
<link rel="apple-touch-icon" type="images/x-icon" href="${theme_base!}/source/images/icon.png" sizes="180x180"/>
</#if>
<link rel="alternate" type="application/rss+xml" title="atom 1.0" href="${atom_url!}">
<link href="${theme_base!}/source/css/kico.css" rel="stylesheet" type="text/css"/>
<link href="${theme_base!}/source/css/single.css" rel="stylesheet" type="text/css"/>
@ -74,37 +76,7 @@
<input class="text" type="search" name="keyword" placeholder="搜索什么呢つ﹏⊂" required>
</form>
<nav class="head-menu">
<@menuTag method="tree">
<#list menus?sort_by('priority') as menu>
<#if menu.children?? && menu.children?size gt 0>
<div class="has-child">
</#if >
<a <#if menu.url?? && menu.url?trim?length gt 0> href="${menu.url!}" target="${menu.target!}" </#if>>
<span class="faa-parent animated-hover">
<#if menu.icon?? && menu.icon?trim?length gt 0>
<i class="${menu.icon}" aria-hidden="true"></i>
</#if>${menu.name}
</span>
</a>
<#if menu.children?? && menu.children?size gt 0>
<div class="sub-menu">
<#list menu.children?sort_by('priority') as child>
<a href="${child.url!}" target="${child.target!}">
<span class="faa-parent animated-hover">
<#if child.icon?? && child.icon?trim?length gt 1>
<i class="${child.icon}" aria-hidden="true"></i>
</#if>${child.name}
</span>
</a>
</#list>
</div >
</#if>
<#if menu.children?? && menu.children?size gt 0>
</div >
</#if >
</#list>
</@menuTag>
<#include "module/module_menu.ftl">
</nav>
</header>
</#macro>

View File

@ -1,4 +1,10 @@
<#include "header.ftl">
<@head title="${blog_title!}"/>
<#include "module/post-module.ftl">
<@head title="${blog_title!}" />
<#include "module/module_pageNav.ftl">
<main>
<div class="wrap min">
<#include "module/module_post.ftl">
<@pageNav method="index" />
</div>
<main>
<#include "footer.ftl">

View File

@ -1,4 +1,4 @@
<#include "header.ftl">
<@head title="友情链接 -${blog_title!}" />
<#include "module/links-module.ftl">
<#include "module/module_links.ftl">
<#include "footer.ftl">

View File

@ -1,7 +1,7 @@
<#macro comment target,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}"/>
<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>

View File

@ -1,27 +0,0 @@
<div class="wrap min">
<h1>友情链接</h1>
<article>
<div class="links">
<@linkTag method="listTeams">
<#list teams as item>
<#--><@global.comment target=sheet type="sheet" />-->
<h3 class="link-title">
<span class="fake-title">${((item.team!'')?length>0)?string((item.team!''), '小伙伴们')}</span>
</h3>
<ul class="link-items fontSmooth">
<#list item.links?sort_by('priority')?reverse as link>
<li class="link-item">
<a class="link-item-inner effect-apollo" href="${link.url!}" title="${link.name!}" target="_blank">
<img class="lazyload" src="${link.logo!}" >
<#--<img class="lazyload" data-src="${link.logo!}" src="${theme_base!}/source/images/svg/loader/trans.ajax-spinner-preloader.svg" onerror="imgError(this)">-->
<span class="sitename">${link.name!}</span>
<div class="linkdes">${link.description!}</div>
</a>
</li>
</#list>
</ul>
</#list>
</@linkTag>
</div>
</article>

View File

@ -1,16 +0,0 @@
<@menuTag method="list">
<#--
?sort_by('priority'):根据菜单的排序编号排序
-->
<#list menus?sort_by('priority') as menu>
<li>
<a href="${menu.url}" target="${menu.target!}">
<#if menu.icon?? && menu.icon?trim?length gt 0>
<i class="${menu.icon}" aria-hidden="true">
</i>
</#if>
${menu.name}
</a>
</li>
</#list>
</@menuTag>

24
module/module_links.ftl Normal file
View File

@ -0,0 +1,24 @@
<h1>友情链接</h1>
<article>
<div class="links">
<@linkTag method="listTeams">
<#list teams as item>
<h3 class="link-title">
<span class="fake-title">${((item.team!'')?length>0)?string((item.team!''), '小伙伴们')}</span>
</h3>
<ul class="link-items fontSmooth">
<#list item.links?sort_by('priority')?reverse as link>
<li class="link-item">
<a class="link-item-inner effect-apollo" href="${link.url!}" title="${link.name!}" target="_blank">
<img class="lazyload" data-src="${theme_base!}/source/images/svg/loader/trans.ajax-spinner-preloader.svg" src="${link.logo!}" onerror="imgError(this)">
<span class="sitename">${link.name!}</span>
<div class="linkdes">${link.description!}</div>
</a>
</li>
</#list>
</ul>
</#list>
</@linkTag>
</div>
</article>

31
module/module_menu.ftl Normal file
View File

@ -0,0 +1,31 @@
<@menuTag method="tree">
<#list menus?sort_by('priority') as menu>
<#if menu.children?? && menu.children?size gt 0>
<div class="has-child">
</#if >
<a <#if menu.url?? && menu.url?trim?length gt 0> href="${menu.url!}" target="${menu.target!}" </#if>>
<span class="faa-parent animated-hover">
<#if menu.icon?? && menu.icon?trim?length gt 0>
<i class="${menu.icon}" aria-hidden="true"></i>
</#if>${menu.name}
</span>
</a>
<#if menu.children?? && menu.children?size gt 0>
<div class="sub-menu">
<#list menu.children?sort_by('priority') as child>
<a href="${child.url!}" target="${child.target!}">
<span class="faa-parent animated-hover">
<#if child.icon?? && child.icon?trim?length gt 1>
<i class="${child.icon}" aria-hidden="true"></i>
</#if>${child.name}
</span>
</a>
</#list>
</div >
</#if>
<#if menu.children?? && menu.children?size gt 0>
</div >
</#if >
</#list>
</@menuTag>

27
module/module_pageNav.ftl Normal file
View File

@ -0,0 +1,27 @@
<#macro pageNav method>
<section class="page-navigator">
<@paginationTag method="${method}" slug="${slug!}" page="${posts.number}" keyword="${keyword}" total="${posts.totalPages}" display="3">
<#if pagination.hasPrev>
<span class="prev">
<a href="${pagination.prevPageFullPath!}" title="上一页">«</a>
</span>
</#if>
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<span class="current">
<a href="${number.fullPath!}">${number.page!}</a>
</span>
<#else>
<span>
<a href="${number.fullPath!}">${number.page!}</a>
</span>
</#if>
</#list>
<#if pagination.hasNext>
<span class="next">
<a href="${pagination.nextPageFullPath!}" title="下一页">»</a>
</span>
</#if>
</@paginationTag>
</section>
</#macro>

View File

@ -1,5 +1,5 @@
<main>
<div class="wrap min">
<#--判断主页显示社交链接-->
<#if is_index??>
<section class="home-title">
<h1>${blog_title!}</h1>
@ -11,6 +11,7 @@
</div>
</section>
</#if>
<#--判断页面显示标题-->
<#if is_tag??>
<section class="home-title">
<h1>包含“${tag.name}”标签的文章</h1>
@ -26,13 +27,16 @@
<h1>包含“${keyword!}”关键字的文章</h1>
</section>
</#if>
<#--显示文章-->
<section class="home-posts">
<#list posts.content as post>
<div class="post-item">
<h2>
<a href="${post.fullPath!}">${post.title!}</a>
</h2>
<#--显示文章简介-->
<p>${post.summary!}</p>
<#--文章标签等-->
<div class="post-meta">
<time class="date">
${post.createTime?string('yyyy-MM-dd')!}
@ -58,32 +62,4 @@
</div>
</div>
</#list>
</section>
<section class="page-navigator">
<@paginationTag method="index" slug="${slug!}" page="${posts.number}" total="${posts.totalPages}" display="3">
<#-- <@paginationTag method="${method!}" slug="${slug!}" page="${posts.number}" total="${posts.totalPages}" display="3">-->
<#if pagination.hasPrev>
<span class="prev">
<a href="${pagination.prevPageFullPath!}" title="上一页">«</a>
</span>
</#if>
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<span class="current">
<a href="${number.fullPath!}">${number.page!}</a>
</span>
<#else>
<span>
<a href="${number.fullPath!}">${number.page!}</a>
</span>
</#if>
</#list>
<#if pagination.hasNext>
<span class="next">
<a href="${pagination.nextPageFullPath!}" title="下一页">»</a>
</span>
</#if>
</@paginationTag>
</section>
</div>
</main>
</section>

View File

@ -1,28 +0,0 @@
<#macro pagination method='index' slug="" display = "3">
<section class="page-navigator">
<#-- <@paginationTag method="index" slug="${slug!}" page="${posts.number}" total="${posts.totalPages}" display="3">-->
<@paginationTag method="${method!}" slug="${slug!}" page="${posts.number}" total="${posts.totalPages}" display="3">
<#if pagination.hasPrev>
<span class="prev">
<a href="${pagination.prevPageFullPath!}" title="上一页">«</a>
</span>
</#if>
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<span class="current">
<a href="${number.fullPath!}">${number.page!}</a>
</span>
<#else>
<span>
<a href="${number.fullPath!}">${number.page!}</a>
</span>
</#if>
</#list>
<#if pagination.hasNext>
<span class="next">
<a href="${pagination.nextPageFullPath!}" title="下一页">»</a>
</span>
</#if>
</@paginationTag>
</section>
</#macro>

View File

@ -1,4 +1,10 @@
<#include "header.ftl">
<@head title="page -${blog_title!}" />
<#include "module/post-module.ftl">
<#include "module/module_pageNav.ftl">
<main>
<div class="wrap min">
<#include "module/module_post.ftl">
<@pageNav method="page" />
</div>
<main>
<#include "footer.ftl">

View File

@ -1,4 +1,10 @@
<#include "header.ftl">
<@head title="搜索结果:${keyword!} - ${blog_title!}"/>
<#include "module/post-module.ftl">
<#include "module/module_pageNav.ftl">
<main>
<div class="wrap min">
<#include "module/module_post.ftl">
<@pageNav method="search" />
</div>
<main>
<#include "footer.ftl">

View File

@ -5,7 +5,7 @@ general:
name: favicon
label: 站点图标
type: attachment
default: 'https://api.lixingyong.com/api/images'
default: ''
description: '在这里填入一张 png 图片地址(<a>192x192px</a>),不填则使用默认图标'
background:
name: background

View File

@ -2,7 +2,7 @@
<@head title="${sheet.title!} - ${blog_title!}" />
<div class="wrap min">
<main>
<#include "module/post-module.ftl">
<#include "module/module_post.ftl">
</main>
</div>
<#include "footer.ftl">

View File

@ -3,7 +3,7 @@
<div class="wrap min">
<main>
${sheet.formatContent!}
<#include "module/links-module.ftl">
<#include "module/module_links.ftl">
</main>
<@global.comment target=sheet type="sheet" />
</div>

View File

@ -1,4 +1,10 @@
<#include "header.ftl">
<@head title="标签:${tag.name} - ${blog_title!}" />
<#include "module/post-module.ftl">
<#include "module/module_pageNav.ftl">
<main>
<div class="wrap min">
<#include "module/module_post.ftl">
<@pageNav method="tagPosts" />
</div>
<main>
<#include "footer.ftl">