mirror of https://github.com/halo-dev/halo
🍎 Anatole主题添加表格样式
parent
bc4e80ee8b
commit
39b986376a
|
@ -11,9 +11,9 @@ import cn.hutool.cron.CronUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.context.event.ApplicationStartedEvent;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.event.ContextRefreshedEvent;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -28,7 +28,7 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
public class StartupConfig implements ApplicationListener<ContextRefreshedEvent> {
|
public class StartupConfig implements ApplicationListener<ApplicationStartedEvent> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OptionsService optionsService;
|
private OptionsService optionsService;
|
||||||
|
@ -37,14 +37,14 @@ public class StartupConfig implements ApplicationListener<ContextRefreshedEvent>
|
||||||
private AttachmentService attachmentService;
|
private AttachmentService attachmentService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
public void onApplicationEvent(ApplicationStartedEvent event) {
|
||||||
this.loadActiveTheme();
|
this.loadActiveTheme();
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
this.loadFiles();
|
this.loadFiles();
|
||||||
this.loadThemes();
|
this.loadThemes();
|
||||||
//启动定时任务
|
//启动定时任务
|
||||||
CronUtil.start();
|
CronUtil.start();
|
||||||
log.info("定时任务启动成功!");
|
log.info("The scheduled task starts successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class InstallController {
|
||||||
List<Category> categories = new ArrayList<>();
|
List<Category> categories = new ArrayList<>();
|
||||||
categories.add(category);
|
categories.add(category);
|
||||||
post.setPostTitle("Hello Halo!");
|
post.setPostTitle("Hello Halo!");
|
||||||
post.setPostContentMd("#Hello Halo!\n" +
|
post.setPostContentMd("# Hello Halo!\n" +
|
||||||
"欢迎使用Halo进行创作,删除这篇文章后赶紧开始吧。");
|
"欢迎使用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.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进行创作,删除这篇文章后赶紧开始吧。");
|
post.setPostSummary("欢迎使用Halo进行创作,删除这篇文章后赶紧开始吧。");
|
||||||
|
|
|
@ -7,6 +7,31 @@
|
||||||
code, tt {
|
code, tt {
|
||||||
font-size: 1.2em;
|
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>
|
</style>
|
||||||
<#include "module/page-top.ftl">
|
<#include "module/page-top.ftl">
|
||||||
<div class="autopagerize_page_element">
|
<div class="autopagerize_page_element">
|
||||||
|
@ -54,4 +79,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="/anatole/source/plugins/prism/prism.js"></script>
|
<script type="text/javascript" src="/anatole/source/plugins/prism/prism.js"></script>
|
||||||
<@footer></@footer>
|
<@footer></@footer>
|
||||||
|
|
|
@ -7,6 +7,31 @@
|
||||||
code, tt {
|
code, tt {
|
||||||
font-size: 1.2em;
|
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>
|
</style>
|
||||||
<#include "module/page-top.ftl">
|
<#include "module/page-top.ftl">
|
||||||
<div class="autopagerize_page_element">
|
<div class="autopagerize_page_element">
|
||||||
|
@ -74,4 +99,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="/anatole/source/plugins/prism/prism.js"></script>
|
<script type="text/javascript" src="/anatole/source/plugins/prism/prism.js"></script>
|
||||||
<@footer></@footer>
|
<@footer></@footer>
|
||||||
|
|
Loading…
Reference in New Issue