mirror of https://github.com/halo-dev/halo
Change page to sheet.
parent
01df671446
commit
56f5577356
|
@ -20,7 +20,7 @@ import java.util.List;
|
||||||
* @date : 2019-03-21
|
* @date : 2019-03-21
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class ContentPageController {
|
public class ContentSheetController {
|
||||||
|
|
||||||
|
|
||||||
private final PostService postService;
|
private final PostService postService;
|
||||||
|
@ -29,9 +29,9 @@ public class ContentPageController {
|
||||||
|
|
||||||
private final ThemeService themeService;
|
private final ThemeService themeService;
|
||||||
|
|
||||||
public ContentPageController(PostService postService,
|
public ContentSheetController(PostService postService,
|
||||||
CommentService commentService,
|
CommentService commentService,
|
||||||
ThemeService themeService) {
|
ThemeService themeService) {
|
||||||
this.postService = postService;
|
this.postService = postService;
|
||||||
this.commentService = commentService;
|
this.commentService = commentService;
|
||||||
this.themeService = themeService;
|
this.themeService = themeService;
|
||||||
|
@ -64,8 +64,8 @@ public class ContentPageController {
|
||||||
* @param model model
|
* @param model model
|
||||||
* @return template path: themes/{theme}/post
|
* @return template path: themes/{theme}/post
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/p/{url}")
|
@GetMapping(value = "/s/{url}")
|
||||||
public String getPage(@PathVariable(value = "url") String url,
|
public String sheet(@PathVariable(value = "url") String url,
|
||||||
@RequestParam(value = "cp", defaultValue = "1") Integer cp,
|
@RequestParam(value = "cp", defaultValue = "1") Integer cp,
|
||||||
Model model) {
|
Model model) {
|
||||||
final Post post = postService.getByUrl(url);
|
final Post post = postService.getByUrl(url);
|
||||||
|
@ -102,6 +102,6 @@ public class ContentPageController {
|
||||||
// if (StrUtil.isNotEmpty(post.getCustomTpl())) {
|
// if (StrUtil.isNotEmpty(post.getCustomTpl())) {
|
||||||
// return this.render(post.getCustomTpl());
|
// return this.render(post.getCustomTpl());
|
||||||
// }
|
// }
|
||||||
return themeService.render("page");
|
return themeService.render("sheet");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue