🍎 Anatole主题添加表格样式

pull/21/head
ruibaby 2018-07-08 23:58:16 +08:00
parent bc4e80ee8b
commit 39b986376a
4 changed files with 57 additions and 7 deletions

View File

@ -11,9 +11,9 @@ import cn.hutool.cron.CronUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.ContextRefreshedEvent;
import java.util.List;
import java.util.Map;
@ -28,7 +28,7 @@ import java.util.Map;
*/
@Slf4j
@Configuration
public class StartupConfig implements ApplicationListener<ContextRefreshedEvent> {
public class StartupConfig implements ApplicationListener<ApplicationStartedEvent> {
@Autowired
private OptionsService optionsService;
@ -37,14 +37,14 @@ public class StartupConfig implements ApplicationListener<ContextRefreshedEvent>
private AttachmentService attachmentService;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
public void onApplicationEvent(ApplicationStartedEvent event) {
this.loadActiveTheme();
this.loadOptions();
this.loadFiles();
this.loadThemes();
//启动定时任务
CronUtil.start();
log.info("定时任务启动成功!");
log.info("The scheduled task starts successfully!");
}
/**

View File

@ -121,7 +121,7 @@ public class InstallController {
List<Category> categories = new ArrayList<>();
categories.add(category);
post.setPostTitle("Hello Halo!");
post.setPostContentMd("#Hello Halo!\n" +
post.setPostContentMd("# Hello Halo!\n" +
"欢迎使用Halo进行创作删除这篇文章后赶紧开始吧。");
post.setPostContent("<h1 id=\"h1-hello-halo-\"><a name=\"Hello Halo!\" class=\"reference-link\"></a><span class=\"header-link octicon octicon-link\"></span>Hello Halo!</h1><p>欢迎使用Halo进行创作删除这篇文章后赶紧开始吧。</p>\n");
post.setPostSummary("欢迎使用Halo进行创作删除这篇文章后赶紧开始吧。");

View File

@ -7,6 +7,31 @@
code, tt {
font-size: 1.2em;
}
table {
border-spacing: 0;
border-collapse: collapse;
margin-top: 0;
margin-bottom: 16px;
display: block;
width: 100%;
overflow: auto;
}
table th {
font-weight: 600;
}
table th,
table td {
padding: 6px 13px;
border: 1px solid #dfe2e5;
}
table tr {
background-color: #fff;
border-top: 1px solid #c6cbd1;
}
table tr:nth-child(2n) {
background-color: #f6f8fa;
}
</style>
<#include "module/page-top.ftl">
<div class="autopagerize_page_element">
@ -54,4 +79,4 @@
</div>
</div>
<script type="text/javascript" src="/anatole/source/plugins/prism/prism.js"></script>
<@footer></@footer>
<@footer></@footer>

View File

@ -7,6 +7,31 @@
code, tt {
font-size: 1.2em;
}
table {
border-spacing: 0;
border-collapse: collapse;
margin-top: 0;
margin-bottom: 16px;
display: block;
width: 100%;
overflow: auto;
}
table th {
font-weight: 600;
}
table th,
table td {
padding: 6px 13px;
border: 1px solid #dfe2e5;
}
table tr {
background-color: #fff;
border-top: 1px solid #c6cbd1;
}
table tr:nth-child(2n) {
background-color: #f6f8fa;
}
</style>
<#include "module/page-top.ftl">
<div class="autopagerize_page_element">
@ -74,4 +99,4 @@
</div>
</div>
<script type="text/javascript" src="/anatole/source/plugins/prism/prism.js"></script>
<@footer></@footer>
<@footer></@footer>