mirror of https://github.com/halo-dev/halo
Update anatole theme.
parent
feeecc30b2
commit
297bde97d2
|
@ -9,6 +9,7 @@ import run.halo.app.model.freemarker.method.RecentCommentsMethod;
|
||||||
import run.halo.app.model.freemarker.method.RecentPostsMethod;
|
import run.halo.app.model.freemarker.method.RecentPostsMethod;
|
||||||
import run.halo.app.model.freemarker.tag.*;
|
import run.halo.app.model.freemarker.tag.*;
|
||||||
import run.halo.app.service.OptionService;
|
import run.halo.app.service.OptionService;
|
||||||
|
import run.halo.app.service.UserService;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
|
|
||||||
|
@ -28,6 +29,9 @@ public class FreeMarkerAutoConfiguration {
|
||||||
@Autowired
|
@Autowired
|
||||||
private OptionService optionsService;
|
private OptionService optionsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PostTagDirective postTagDirective;
|
private PostTagDirective postTagDirective;
|
||||||
|
|
||||||
|
@ -59,6 +63,7 @@ public class FreeMarkerAutoConfiguration {
|
||||||
public void setSharedVariable() {
|
public void setSharedVariable() {
|
||||||
try {
|
try {
|
||||||
configuration.setSharedVariable("options", optionsService.listOptions());
|
configuration.setSharedVariable("options", optionsService.listOptions());
|
||||||
|
configuration.setSharedVariable("user",userService.getCurrentUser().orElse(null));
|
||||||
//Freemarker custom tags
|
//Freemarker custom tags
|
||||||
configuration.setSharedVariable("categoryTag", categoryTagDirective);
|
configuration.setSharedVariable("categoryTag", categoryTagDirective);
|
||||||
configuration.setSharedVariable("commentTag", commentTagDirective);
|
configuration.setSharedVariable("commentTag", commentTagDirective);
|
||||||
|
|
|
@ -6,23 +6,23 @@
|
||||||
<div class="autopagerize_page_element">
|
<div class="autopagerize_page_element">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<#include "module/post_entry.ftl">
|
<#include "module/post_entry.ftl">
|
||||||
<#if posts.pages gt 1>
|
<#if posts.totalPages gt 1>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<ul class="clearfix">
|
<ul class="clearfix">
|
||||||
<#if posts.hasPrevious()>
|
<#if posts.hasPrevious()>
|
||||||
<#if posts.page == 1>
|
<#if posts.number == 1>
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/categories/${category.slugName!}">上一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
<#else >
|
<#else >
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/categories/${category.slugName!}/page/${posts.page}">上一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.number}">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#if posts.hasNext()>
|
<#if posts.hasNext()>
|
||||||
<li class="next pagbuttons">
|
<li class="next pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/categories/${category.slugName!}/page/${posts.page+2}">下一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.number+2}">下一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<link rel="stylesheet" href="anatole/source/plugins/gallery/css/main.css" />
|
<link rel="stylesheet" href="anatole/source/plugins/gallery/css/main.css" />
|
||||||
<noscript><link rel="stylesheet" href="anatole/source/plugins/gallery/css/noscript.css" /></noscript>
|
<noscript><link rel="stylesheet" href="/source/plugins/gallery/css/noscript.css" /></noscript>
|
||||||
</head>
|
</head>
|
||||||
<body class="is-loading-0 is-loading-1 is-loading-2">
|
<body class="is-loading-0 is-loading-1 is-loading-2">
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
|
@ -6,23 +6,23 @@
|
||||||
<div class="autopagerize_page_element">
|
<div class="autopagerize_page_element">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<#include "module/post_entry.ftl">
|
<#include "module/post_entry.ftl">
|
||||||
<#if posts.pages gt 1>
|
<#if posts.totalPages gt 1>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<ul class="clearfix">
|
<ul class="clearfix">
|
||||||
<#if posts.hasPrevious()>
|
<#if posts.hasPrevious()>
|
||||||
<#if posts.page == 1>
|
<#if posts.number == 1>
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/">上一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
<#else >
|
<#else >
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.page}">上一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.number}">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#if posts.hasNext()>
|
<#if posts.hasNext()>
|
||||||
<li class="next pagbuttons">
|
<li class="next pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.page+2}">下一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.number+2}">下一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="page-top animated fadeInDown">
|
<div class="page-top animated fadeInDown">
|
||||||
<div class="nav">
|
<div class="nav">
|
||||||
<@commonTag method="menus">
|
<@menuTag method="list">
|
||||||
<#list menus?sort_by('sort') as menu>
|
<#list menus?sort_by('sort') as menu>
|
||||||
<li>
|
<li>
|
||||||
<a href="${menu.url}" target="${menu.target!}">${menu.name} </a>
|
<a href="${menu.url}" target="${menu.target!}">${menu.name} </a>
|
||||||
</li>
|
</li>
|
||||||
</#list>
|
</#list>
|
||||||
</@commonTag>
|
</@menuTag>
|
||||||
</div>
|
</div>
|
||||||
<div class="information">
|
<div class="information">
|
||||||
<div class="back_btn">
|
<div class="back_btn">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<#if (options.anatole_style_hitokoto!'false')=="true">
|
<#if (options.anatole_style_hitokoto!'false')=="true">
|
||||||
<p id="yiyan">获取中...</p>
|
<p id="yiyan">获取中...</p>
|
||||||
<#else >
|
<#else >
|
||||||
<p>${user.userDesc!'A other Halo theme'}</p>
|
<p>${user.description!'A other Halo theme'}</p>
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,23 +6,23 @@
|
||||||
<div class="autopagerize_page_element">
|
<div class="autopagerize_page_element">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<#include "module/post_entry.ftl">
|
<#include "module/post_entry.ftl">
|
||||||
<#if posts.pages gt 1>
|
<#if posts.totalPages gt 1>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<ul class="clearfix">
|
<ul class="clearfix">
|
||||||
<#if posts.hasPrevious()>
|
<#if posts.hasPrevious()>
|
||||||
<#if posts.number == 1>
|
<#if posts.number == 1>
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/tags/${tag.slugName}">上一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
<#else >
|
<#else >
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/tags/${tag.slugName}/page/${posts.page}">上一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.number}">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#if posts.hasNext()>
|
<#if posts.hasNext()>
|
||||||
<li class="next pagbuttons">
|
<li class="next pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${options.blog_url!}/tags/${tag.slugName}/page/${posts.page+2}">下一页</a>
|
<a class="btn" role="navigation" href="${options.blog_url!}/page/${posts.number+2}">下一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue