mirror of https://github.com/halo-dev/halo
Change ctx to context.
parent
18975dd7f7
commit
9e1edd26bc
|
@ -88,14 +88,14 @@ public class FreemarkerConfigAwareListener {
|
||||||
|
|
||||||
private void loadOptionsConfig() throws TemplateModelException {
|
private void loadOptionsConfig() throws TemplateModelException {
|
||||||
configuration.setSharedVariable("options", optionService.listOptions());
|
configuration.setSharedVariable("options", optionService.listOptions());
|
||||||
configuration.setSharedVariable("ctx", optionService.getBlogBaseUrl());
|
configuration.setSharedVariable("context", optionService.getBlogBaseUrl());
|
||||||
log.debug("Loaded options");
|
log.debug("Loaded options");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadThemeConfig() throws TemplateModelException {
|
private void loadThemeConfig() throws TemplateModelException {
|
||||||
ThemeProperty activatedTheme = themeService.getActivatedTheme();
|
ThemeProperty activatedTheme = themeService.getActivatedTheme();
|
||||||
configuration.setSharedVariable("theme", activatedTheme);
|
configuration.setSharedVariable("theme", activatedTheme);
|
||||||
configuration.setSharedVariable("static", activatedTheme.getFolderName());
|
configuration.setSharedVariable("static", optionService.getBlogBaseUrl() + "/" + activatedTheme.getFolderName());
|
||||||
configuration.setSharedVariable("settings", themeSettingService.listAsMapBy(themeService.getActivatedThemeId()));
|
configuration.setSharedVariable("settings", themeSettingService.listAsMapBy(themeService.getActivatedThemeId()));
|
||||||
log.debug("Loaded theme and settings");
|
log.debug("Loaded theme and settings");
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,15 @@ public interface PostService extends BasePostService<Post> {
|
||||||
@NonNull
|
@NonNull
|
||||||
List<ArchiveMonthVO> listMonthArchives();
|
List<ArchiveMonthVO> listMonthArchives();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import post from markdown document.
|
||||||
|
*
|
||||||
|
* @param markdown markdown document.
|
||||||
|
* @return imported post
|
||||||
|
*/
|
||||||
|
@NonNull
|
||||||
|
Post importMarkdown(@NonNull String markdown);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts to detail vo.
|
* Converts to detail vo.
|
||||||
*
|
*
|
||||||
|
|
|
@ -45,6 +45,15 @@ public interface SheetService extends BasePostService<Sheet> {
|
||||||
@Override
|
@Override
|
||||||
Sheet getBy(PostStatus status, String url);
|
Sheet getBy(PostStatus status, String url);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import sheet from markdown document.
|
||||||
|
*
|
||||||
|
* @param markdown markdown document.
|
||||||
|
* @return imported sheet
|
||||||
|
*/
|
||||||
|
@NonNull
|
||||||
|
Sheet importMarkdown(@NonNull String markdown);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts to list dto page.
|
* Converts to list dto page.
|
||||||
*
|
*
|
||||||
|
@ -53,6 +62,4 @@ public interface SheetService extends BasePostService<Sheet> {
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
Page<SheetListVO> convertToListVo(@NonNull Page<Sheet> sheetPage);
|
Page<SheetListVO> convertToListVo(@NonNull Page<Sheet> sheetPage);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import run.halo.app.model.vo.PostListVO;
|
||||||
import run.halo.app.repository.PostRepository;
|
import run.halo.app.repository.PostRepository;
|
||||||
import run.halo.app.service.*;
|
import run.halo.app.service.*;
|
||||||
import run.halo.app.utils.DateUtils;
|
import run.halo.app.utils.DateUtils;
|
||||||
|
import run.halo.app.utils.MarkdownUtils;
|
||||||
import run.halo.app.utils.ServiceUtils;
|
import run.halo.app.utils.ServiceUtils;
|
||||||
|
|
||||||
import javax.persistence.criteria.Predicate;
|
import javax.persistence.criteria.Predicate;
|
||||||
|
@ -272,6 +273,19 @@ public class PostServiceImpl extends BasePostServiceImpl<Post> implements PostSe
|
||||||
return archives;
|
return archives;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Post importMarkdown(String markdown) {
|
||||||
|
Assert.notNull(markdown, "Markdown document must not be null");
|
||||||
|
|
||||||
|
// Render markdown to html document.
|
||||||
|
String content = MarkdownUtils.renderMarkdown(markdown);
|
||||||
|
|
||||||
|
// Gets frontMatter
|
||||||
|
Map<String, List<String>> frontMatter = MarkdownUtils.getFrontMatter(markdown);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PostDetailVO convertToDetailVo(Post post) {
|
public PostDetailVO convertToDetailVo(Post post) {
|
||||||
return convertTo(post,
|
return convertTo(post,
|
||||||
|
|
|
@ -15,6 +15,7 @@ import run.halo.app.repository.SheetRepository;
|
||||||
import run.halo.app.service.OptionService;
|
import run.halo.app.service.OptionService;
|
||||||
import run.halo.app.service.SheetCommentService;
|
import run.halo.app.service.SheetCommentService;
|
||||||
import run.halo.app.service.SheetService;
|
import run.halo.app.service.SheetService;
|
||||||
|
import run.halo.app.utils.MarkdownUtils;
|
||||||
import run.halo.app.utils.ServiceUtils;
|
import run.halo.app.utils.ServiceUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -94,6 +95,19 @@ public class SheetServiceImpl extends BasePostServiceImpl<Sheet> implements Shee
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sheet importMarkdown(String markdown) {
|
||||||
|
Assert.notNull(markdown, "Markdown document must not be null");
|
||||||
|
|
||||||
|
// Render markdown to html document.
|
||||||
|
String content = MarkdownUtils.renderMarkdown(markdown);
|
||||||
|
|
||||||
|
// Gets frontMatter
|
||||||
|
Map<String, List<String>> frontMatter = MarkdownUtils.getFrontMatter(markdown);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Sheet removeById(Integer id) {
|
public Sheet removeById(Integer id) {
|
||||||
Sheet sheet = super.removeById(id);
|
Sheet sheet = super.removeById(id);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<#list archive.posts?sort_by("createTime")?reverse as post>
|
<#list archive.posts?sort_by("createTime")?reverse as post>
|
||||||
<div class="listing-item">
|
<div class="listing-item">
|
||||||
<div class="listing-post">
|
<div class="listing-post">
|
||||||
<a href="${ctx!}/archives/${post.url!}" title="${post.title!}">${post.title!}</a>
|
<a href="${context!}/archives/${post.url!}" title="${post.title!}">${post.title!}</a>
|
||||||
<div class="post-time">
|
<div class="post-time">
|
||||||
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,17 +12,17 @@
|
||||||
<#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="${ctx!}/">上一页</a>
|
<a class="btn" role="navigation" href="${context!}/">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
<#else >
|
<#else >
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${ctx!}/page/${posts.number}">上一页</a>
|
<a class="btn" role="navigation" href="${context!}/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="${ctx!}/page/${posts.number+2}">下一页</a>
|
<a class="btn" role="navigation" href="${context!}/page/${posts.number+2}">下一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -12,17 +12,17 @@
|
||||||
<#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="${ctx!}/">上一页</a>
|
<a class="btn" role="navigation" href="${context!}/">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
<#else >
|
<#else >
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${ctx!}/page/${posts.number}">上一页</a>
|
<a class="btn" role="navigation" href="${context!}/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="${ctx!}/page/${posts.number+2}">下一页</a>
|
<a class="btn" role="navigation" href="${context!}/page/${posts.number+2}">下一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
<meta name="description" content="${description!}" />
|
<meta name="description" content="${description!}" />
|
||||||
<@verification />
|
<@verification />
|
||||||
<@favicon />
|
<@favicon />
|
||||||
<link href="/${static!}/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
|
<link href="${static!}/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
|
||||||
<link rel="stylesheet" href="/${static!}/source/css/blog_basic.min.css?version=88107691fe">
|
<link rel="stylesheet" href="${static!}/source/css/blog_basic.min.css?version=88107691fe">
|
||||||
<link href="/${static!}/source/css/style.min.css" type="text/css" rel="stylesheet" />
|
<link href="${static!}/source/css/style.min.css" type="text/css" rel="stylesheet" />
|
||||||
<link rel="alternate" type="application/rss+xml" title="atom 1.0" href="/atom.xml">
|
<link rel="alternate" type="application/rss+xml" title="atom 1.0" href="/atom.xml">
|
||||||
<style>
|
<style>
|
||||||
<#if !settings.post_title_uppper!true>
|
<#if !settings.post_title_uppper!true>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<body>
|
<body>
|
||||||
</#macro>
|
</#macro>
|
||||||
<#macro footer>
|
<#macro footer>
|
||||||
<script type="text/javascript" src="/${static!}/source/js/jquery.min.js"></script>
|
<script type="text/javascript" src="${static!}/source/js/jquery.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var url = location.href;
|
var url = location.href;
|
||||||
var urlstatus = false;
|
var urlstatus = false;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<img src="${settings.icon!'/${static!}/source/images/logo.png'}" />
|
<img src="${settings.icon!'${static!}/source/images/logo.png'}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="post animated fadeInDown">
|
<div class="post animated fadeInDown">
|
||||||
<div class="post-title">
|
<div class="post-title">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="${ctx!}/archives/${post.url}">${post.title}</a>
|
<a href="${context!}/archives/${post.url}">${post.title}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
@ -19,11 +19,11 @@
|
||||||
<i class="fa fa-sun-o"></i>
|
<i class="fa fa-sun-o"></i>
|
||||||
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
||||||
<i class="fa fa-comment-o"></i>
|
<i class="fa fa-comment-o"></i>
|
||||||
<a href="${ctx!}/archives/${post.url}#comment_widget">Comments</a>
|
<a href="${context!}/archives/${post.url}#comment_widget">Comments</a>
|
||||||
<#if post.tags?size gt 0>
|
<#if post.tags?size gt 0>
|
||||||
<i class="fa fa-tag"></i>
|
<i class="fa fa-tag"></i>
|
||||||
<#list post.tags as tag>
|
<#list post.tags as tag>
|
||||||
<a href="${ctx!}/tags/${tag.slugName}" class="tag"> ${tag.name}</a>
|
<a href="${context!}/tags/${tag.slugName}" class="tag"> ${tag.name}</a>
|
||||||
</#list>
|
</#list>
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="sidebar animated fadeInDown">
|
<div class="sidebar animated fadeInDown">
|
||||||
<div class="logo-title">
|
<div class="logo-title">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img src="${options.blog_logo!'/${static!}/source/images/logo@2x.png'}" style="width:127px;<#if settings.avatar_circle!false>border-radius:50%</#if>" />
|
<img src="${options.blog_logo!'${static!}/source/images/logo@2x.png'}" style="width:127px;<#if settings.avatar_circle!false>border-radius:50%</#if>" />
|
||||||
<h3 title="">
|
<h3 title="">
|
||||||
<a href="${ctx!}">${options.blog_title!'Anatole'}</a>
|
<a href="${context!}">${options.blog_title!'Anatole'}</a>
|
||||||
</h3>
|
</h3>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<#if settings.hitokoto!false>
|
<#if settings.hitokoto!false>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<#if settings.rss!true>
|
<#if settings.rss!true>
|
||||||
<li>
|
<li>
|
||||||
<a target="_blank" href="${ctx!}/atom.xml">
|
<a target="_blank" href="${context!}/atom.xml">
|
||||||
<i class="fa fa-rss"></i>
|
<i class="fa fa-rss"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -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="${static!}/source/plugins/gallery/css/main.css" />
|
<link rel="stylesheet" href="${static!}/source/plugins/gallery/css/main.css" />
|
||||||
<noscript><link rel="stylesheet" href="/${static!}/plugins/gallery/css/noscript.css" /></noscript>
|
<noscript><link rel="stylesheet" href="${static!}/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">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<@head title="${post.title!} · ${options.blog_title!'Anatole'}" keywords="${post.title!},${options.seo_keywords!'Anatole'},${tagWords!}" description="${post.summary!'Anatole'}"></@head>
|
<@head title="${post.title!} · ${options.blog_title!'Anatole'}" keywords="${post.title!},${options.seo_keywords!'Anatole'},${tagWords!}" description="${post.summary!'Anatole'}"></@head>
|
||||||
<#include "module/sidebar.ftl">
|
<#include "module/sidebar.ftl">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<link href="/${static!}/source/plugins/prism/prism.css" type="text/css" rel="stylesheet" />
|
<link href="${static!}/source/plugins/prism/prism.css" type="text/css" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
code, tt {
|
code, tt {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
|
@ -52,11 +52,11 @@
|
||||||
<i class="fa fa-sun-o"></i>
|
<i class="fa fa-sun-o"></i>
|
||||||
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
||||||
<i class="fa fa-comment-o"></i>
|
<i class="fa fa-comment-o"></i>
|
||||||
<a href="${ctx!}/archives/${post.url}#comment_widget">Comments</a>
|
<a href="${context!}/archives/${post.url}#comment_widget">Comments</a>
|
||||||
<#if tags?size gt 0>
|
<#if tags?size gt 0>
|
||||||
<i class="fa fa-tag"></i>
|
<i class="fa fa-tag"></i>
|
||||||
<#list tags as tag>
|
<#list tags as tag>
|
||||||
<a href="${ctx!}/tags/${tag.slugName}" class="tag"> ${tag.name}</a>
|
<a href="${context!}/tags/${tag.slugName}" class="tag"> ${tag.name}</a>
|
||||||
</#list>
|
</#list>
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
</div>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
class="fa fa-weibo"></a>
|
class="fa fa-weibo"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="twitter">
|
<div class="twitter">
|
||||||
<a href="http://twitter.com/home?status=${ctx!}/archives/${post.url} ,${options.blog_title!},${post.title},;"
|
<a href="http://twitter.com/home?status=${context!}/archives/${post.url} ,${options.blog_title!},${post.title},;"
|
||||||
class="fa fa-twitter"></a>
|
class="fa fa-twitter"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,12 +81,12 @@
|
||||||
<ul class="clearfix">
|
<ul class="clearfix">
|
||||||
<#if nextPost??>
|
<#if nextPost??>
|
||||||
<li class="next pagbuttons">
|
<li class="next pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${ctx!}/archives/${nextPost.url}" title="${nextPost.title}">下一篇</a>
|
<a class="btn" role="navigation" href="${context!}/archives/${nextPost.url}" title="${nextPost.title}">下一篇</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
<#if prePost??>
|
<#if prePost??>
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${ctx!}/archives/${prePost.url}" title="${prePost.title}">上一篇</a>
|
<a class="btn" role="navigation" href="${context!}/archives/${prePost.url}" title="${prePost.title}">上一篇</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -99,5 +99,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="/${static!}/source/plugins/prism/prism.js"></script>
|
<script type="text/javascript" src="${static!}/source/plugins/prism/prism.js"></script>
|
||||||
<@footer></@footer>
|
<@footer></@footer>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<@head title="${post.title!} · ${options.blog_title!'Anatole'}" keywords="${post.title!},${options.seo_keywords!'Anatole'}" description="${post.summary!'Anatole'}"></@head>
|
<@head title="${post.title!} · ${options.blog_title!'Anatole'}" keywords="${post.title!},${options.seo_keywords!'Anatole'}" description="${post.summary!'Anatole'}"></@head>
|
||||||
<#include "module/sidebar.ftl">
|
<#include "module/sidebar.ftl">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<link href="/${static!}/source/plugins/prism/prism.css" type="text/css" rel="stylesheet" />
|
<link href="${static!}/source/plugins/prism/prism.css" type="text/css" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
code, tt {
|
code, tt {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<i class="fa fa-sun-o"></i>
|
<i class="fa fa-sun-o"></i>
|
||||||
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
<span class="date">${post.createTime?string("yyyy-MM-dd")}</span>
|
||||||
<i class="fa fa-comment-o"></i>
|
<i class="fa fa-comment-o"></i>
|
||||||
<a href="${ctx!}/archives/${post.url!}#comment_widget">Comments</a>
|
<a href="${context!}/archives/${post.url!}#comment_widget">Comments</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
class="fa fa-weibo"></a>
|
class="fa fa-weibo"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="twitter">
|
<div class="twitter">
|
||||||
<a href="http://twitter.com/home?status=${ctx!}/archives/${post.url!} ,${options.blog_title!},${post.title!},;"
|
<a href="http://twitter.com/home?status=${context!}/archives/${post.url!} ,${options.blog_title!},${post.title!},;"
|
||||||
class="fa fa-twitter"></a>
|
class="fa fa-twitter"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -79,5 +79,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="/${static!}/source/plugins/prism/prism.js"></script>
|
<script type="text/javascript" src="${static!}/source/plugins/prism/prism.js"></script>
|
||||||
<@footer></@footer>
|
<@footer></@footer>
|
||||||
|
|
|
@ -12,17 +12,17 @@
|
||||||
<#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="${ctx!}/">上一页</a>
|
<a class="btn" role="navigation" href="${context!}/">上一页</a>
|
||||||
</li>
|
</li>
|
||||||
<#else >
|
<#else >
|
||||||
<li class="pre pagbuttons">
|
<li class="pre pagbuttons">
|
||||||
<a class="btn" role="navigation" href="${ctx!}/page/${posts.number}">上一页</a>
|
<a class="btn" role="navigation" href="${context!}/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="${ctx!}/page/${posts.number+2}">下一页</a>
|
<a class="btn" role="navigation" href="${context!}/page/${posts.number+2}">下一页</a>
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue