mirror of https://github.com/unluckynike/beizhai
标签管理 🤗
This commit is contained in:
parent
9c30f02b79
commit
af0116e1d6
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
2010
log/blog-pro.log
2010
log/blog-pro.log
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
|||
package com.hailin.beizhai.dao;
|
||||
|
||||
import com.hailin.beizhai.po.Tag;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TagRepository extends JpaRepository<Tag,Long> {
|
||||
Tag findByName(String name);
|
||||
|
||||
@Query("select t from Tag t")
|
||||
List<Tag> findTop(Pageable pageable);
|
||||
|
||||
}
|
|
@ -26,7 +26,7 @@ public class Blog {
|
|||
private boolean appreciation;
|
||||
private boolean shareStatement;
|
||||
private boolean commentabled;
|
||||
private boolean published;
|
||||
private boolean published; //发布
|
||||
private boolean recommend;//推荐
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createTime;
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.hailin.beizhai.service;
|
||||
|
||||
import com.hailin.beizhai.po.Tag;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TagService {
|
||||
|
||||
Tag saveTag(Tag tag);
|
||||
|
||||
Tag getTag(Long id);
|
||||
|
||||
Tag getTagByName(String name);
|
||||
|
||||
Page<Tag> listTag(Pageable pageable);
|
||||
|
||||
List<Tag> listTag();
|
||||
|
||||
List<Tag> listTagTop(Integer size);
|
||||
|
||||
List<Tag> listTag(String ids);
|
||||
|
||||
Tag updateTag(Long id, Tag tag);
|
||||
|
||||
void deleteTag(Long id);
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.hailin.beizhai.service;
|
||||
|
||||
import com.hailin.beizhai.NotFoundException;
|
||||
import com.hailin.beizhai.dao.TagRepository;
|
||||
import com.hailin.beizhai.po.Tag;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
@Name: TagServiceImpl
|
||||
@Author: zhouhailin
|
||||
@Date: 2021/2/15
|
||||
@Time: 2:46 下午
|
||||
@Description:
|
||||
*/
|
||||
@Service
|
||||
public class TagServiceImpl implements TagService{
|
||||
|
||||
@Autowired
|
||||
private TagRepository tagRepository;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public Tag saveTag(Tag tag) {
|
||||
return tagRepository.save(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tag getTag(Long id) {
|
||||
return tagRepository.findById(id).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tag getTagByName(String name) {
|
||||
return tagRepository.findByName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<Tag> listTag(Pageable pageable) {
|
||||
return tagRepository.findAll(pageable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tag> listTag() {
|
||||
return tagRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tag> listTagTop(Integer size) {
|
||||
// Sort sort = new Sort(Sort.Direction.DESC, "blogs.size");
|
||||
// Pageable pageable = new PageRequest(0, size, sort);
|
||||
// return tagRepository.findTop(pageable);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Tag> listTag(String ids) { //1,2,3
|
||||
// return tagRepository.findAll(convertToList(ids));
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<Long> convertToList(String ids) {
|
||||
List<Long> list = new ArrayList<>();
|
||||
if (!"".equals(ids) && ids != null) {
|
||||
String[] idarray = ids.split(",");
|
||||
for (int i=0; i < idarray.length;i++) {
|
||||
list.add(new Long(idarray[i]));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public Tag updateTag(Long id, Tag tag) {
|
||||
Tag t = tagRepository.findById(id).get();
|
||||
if (t == null) {
|
||||
throw new NotFoundException("不存在该标签");
|
||||
}
|
||||
BeanUtils.copyProperties(tag,t);
|
||||
return tagRepository.save(t);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void deleteTag(Long id) {
|
||||
tagRepository.deleteById(id);
|
||||
}
|
||||
}
|
|
@ -25,6 +25,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
@RequestMapping("/admin")
|
||||
public class BlogController {
|
||||
|
||||
private static final String INPUT = "admin/blogs-input";
|
||||
private static final String LIST = "admin/blogs";
|
||||
private static final String REDIRECT_LIST = "redirect:admin/blogs";
|
||||
|
||||
@Autowired
|
||||
private BlogService blogService;
|
||||
|
||||
|
@ -35,9 +39,9 @@ public class BlogController {
|
|||
public String blogs(@PageableDefault(size = 3, sort = {"updateTime"}, direction = Sort.Direction.DESC) Pageable pageable,
|
||||
BlogQuery blog,
|
||||
Model model) {
|
||||
model.addAttribute("types",typeService.listType());
|
||||
model.addAttribute("types", typeService.listType());
|
||||
model.addAttribute("page", blogService.listBlog(pageable, blog));
|
||||
return "admin/blogs";
|
||||
return LIST;
|
||||
}
|
||||
|
||||
//局部渲染
|
||||
|
@ -49,6 +53,11 @@ public class BlogController {
|
|||
return "admin/blogs :: blogList";
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("blogs/input")
|
||||
public String input(Model model) {
|
||||
model.addAttribute("blog", new Blog());
|
||||
model.addAttribute("types", typeService.listType());//初始化分类
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
package com.hailin.beizhai.web.admin;
|
||||
|
||||
import com.hailin.beizhai.po.Tag;
|
||||
import com.hailin.beizhai.service.TagService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.web.PageableDefault;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/*
|
||||
@Name: TageController
|
||||
@Author: zhouhailin
|
||||
@Date: 2021/2/15
|
||||
@Time: 11:15 上午
|
||||
@Description:
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/admin")
|
||||
public class TagController {
|
||||
|
||||
private static final String TAGS="admin/tags";
|
||||
private static final String INPUT="admin/tags-input";
|
||||
private static final String REDIRECT_TAG="redirect:/admin/tags";
|
||||
@Autowired
|
||||
private TagService tagService;
|
||||
|
||||
@GetMapping("/tags")
|
||||
public String tags(@PageableDefault(size = 3,sort = {"id"},direction = Sort.Direction.DESC) Pageable pageable,
|
||||
Model model){
|
||||
model.addAttribute("page",tagService.listTag(pageable));
|
||||
return TAGS;
|
||||
}
|
||||
|
||||
@GetMapping("/tags/input")
|
||||
public String input(Model model){
|
||||
model.addAttribute("tag",new Tag());
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
@GetMapping("/tags/{id}/input")
|
||||
public String editInput(@PathVariable Long id, Model model){
|
||||
model.addAttribute("tag",tagService.getTag(id));
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
@PostMapping("tags")
|
||||
public String post(@Valid Tag tag, BindingResult result, RedirectAttributes attributes){
|
||||
Tag tag1=tagService.getTagByName(tag.getName());
|
||||
if (tag1!=null){
|
||||
result.rejectValue("name","nameError","不能添加重复标签");
|
||||
}
|
||||
if (result.hasErrors()){
|
||||
return INPUT;
|
||||
}
|
||||
Tag t=tagService.saveTag(tag);
|
||||
if (t==null){
|
||||
attributes.addFlashAttribute("message","新增失败");
|
||||
}else {
|
||||
attributes.addFlashAttribute("message","新增成功");
|
||||
}
|
||||
return REDIRECT_TAG;
|
||||
}
|
||||
|
||||
@PostMapping("/tags/{id}")
|
||||
public String editPost(@Valid Tag tag, BindingResult result,@PathVariable Long id, RedirectAttributes attributes) {
|
||||
Tag tag1 = tagService.getTagByName(tag.getName());
|
||||
if (tag1 != null) {
|
||||
result.rejectValue("name","nameError","不能添加重复的分类");
|
||||
}
|
||||
if (result.hasErrors()) {
|
||||
return INPUT;
|
||||
}
|
||||
Tag t = tagService.updateTag(id,tag);
|
||||
if (t == null ) {
|
||||
attributes.addFlashAttribute("message", "更新失败");
|
||||
} else {
|
||||
attributes.addFlashAttribute("message", "更新成功");
|
||||
}
|
||||
return REDIRECT_TAG;
|
||||
}
|
||||
|
||||
@GetMapping("/tags/{id}/delete")
|
||||
public String delete(@PathVariable Long id,RedirectAttributes attributes) {
|
||||
tagService.deleteTag(id);
|
||||
attributes.addFlashAttribute("message", "删除成功");
|
||||
return REDIRECT_TAG;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package com.hailin.beizhai.web.admin;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/*
|
||||
@Name: TageController
|
||||
@Author: zhouhailin
|
||||
@Date: 2021/2/15
|
||||
@Time: 11:15 上午
|
||||
@Description:
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/admin")
|
||||
public class TageController {
|
||||
|
||||
@GetMapping("/tags")
|
||||
public String tags(){
|
||||
return "admin/tags";
|
||||
}
|
||||
}
|
|
@ -1,240 +1,222 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>博客发布</title>
|
||||
<title>博客</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--导航-->
|
||||
<nav class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
<div class="ui container">
|
||||
<div class="ui inverted secondary stackable menu">
|
||||
<h2 class="ui teal header item">管理后台</h2>
|
||||
<a href="#" class="active m-item item m-mobile-hide"><i class="mini home icon"></i>博客</a>
|
||||
<a href="#" class=" m-item item m-mobile-hide"><i class="mini idea icon"></i>分类</a>
|
||||
<a href="#" class="m-item item m-mobile-hide"><i class="mini tags icon"></i>标签</a>
|
||||
<div class="right m-item m-mobile-hide menu">
|
||||
<div class="ui dropdown item">
|
||||
<div class="text">
|
||||
<img class="ui avatar image" src="https://unsplash.it/100/100?image=1005">
|
||||
李仁密
|
||||
</div>
|
||||
<!--导航-->
|
||||
<nav th:replace="admin/_fragments :: menu(1)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
|
||||
</nav>
|
||||
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" th:href="@{/admin/blogs/input}" class="teal active item">发布</a>
|
||||
<a href="#" th:href="@{/admin/blogs}" class="item">列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
<form id="blog-form" action="#" th:object="${blog}" th:action="@{/admin/blogs}" method="post" class="ui form">
|
||||
<input type="hidden" name="published" th:value="*{published}">
|
||||
<input type="hidden" name="id" th:value="*{id}">
|
||||
<div class="required field">
|
||||
<div class="ui left labeled input">
|
||||
<div class="ui selection compact teal basic dropdown label">
|
||||
<input type="hidden" value="原创" name="flag" th:value="*{flag}" >
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="text">原创</div>
|
||||
<div class="menu">
|
||||
<a href="#" class="item">注销</a>
|
||||
<div class="item" data-value="原创">原创</div>
|
||||
<div class="item" data-value="转载">转载</div>
|
||||
<div class="item" data-value="翻译">翻译</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" name="title" placeholder="标题" th:value="*{title}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
|
||||
<i class="sidebar icon"></i>
|
||||
</a>
|
||||
</nav>
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" class="teal active item">发布</a>
|
||||
<a href="#" class="item">列表</a>
|
||||
|
||||
<div class="required field">
|
||||
<div id="md-content" style="z-index: 1 !important;">
|
||||
<textarea placeholder="博客内容" name="content" style="display: none" th:text="*{content}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container-small m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
<form action="#" method="post" class="ui form">
|
||||
|
||||
<div class="two fields">
|
||||
<div class="required field">
|
||||
<div class="ui left labeled input">
|
||||
<div class="ui selection compact teal basic dropdown label">
|
||||
<input type="hidden" value="原创" >
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">分类</label>
|
||||
<div class="ui fluid selection dropdown">
|
||||
<input type="hidden" name="type.id" th:value="*{type}!=null ? *{type.id}">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="text">原创</div>
|
||||
<div class="default text">分类</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="原创">原创</div>
|
||||
<div class="item" data-value="转载">转载</div>
|
||||
<div class="item" data-value="翻译">翻译</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" name="title" placeholder="标题">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div id="md-content" style="z-index: 1 !important;">
|
||||
<textarea placeholder="博客内容" name="content" style="display: none">
|
||||
[TOC]
|
||||
|
||||
#### Disabled options
|
||||
|
||||
- TeX (Based on KaTeX);
|
||||
- Emoji;
|
||||
- Task lists;
|
||||
- HTML tags decode;
|
||||
- Flowchart and Sequence Diagram;
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="two fields">
|
||||
<div class="field">
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">分类</label>
|
||||
<div class="ui fluid selection dropdown">
|
||||
<input type="hidden" name="type">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">分类</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="1">错误日志</div>
|
||||
<div class="item" data-value="2">开发者手册</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">标签</label>
|
||||
<div class="ui fluid selection multiple search dropdown">
|
||||
<input type="hidden" name="tag">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">标签</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="1">java</div>
|
||||
<div class="item" data-value="2">JavaScript</div>
|
||||
</div>
|
||||
<div th:each="type : ${types}" class="item" data-value="1" th:data-value="${type.id}" th:text="${type.name}">错误日志</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="ui left labeled input">
|
||||
<label class="ui teal basic label">首图</label>
|
||||
<input type="text" name="indexPicture" placeholder="首图引用地址">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="inline fields">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="recommend" name="recommend" checked class="hidden">
|
||||
<label for="recommend">推荐</label>
|
||||
<div class=" field">
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">标签</label>
|
||||
<div class="ui fluid selection multiple search dropdown">
|
||||
<input type="hidden" name="tagIds" th:value="*{tagIds}" >
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">标签</div>
|
||||
<div class="menu">
|
||||
<div th:each="tag : ${tags}" class="item" data-value="1" th:data-value="${tag.id}" th:text="${tag.name}">java</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="shareInfo" name="shareInfo" class="hidden">
|
||||
<label for="shareInfo">转载声明</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="appreciation" name="appreciation" class="hidden">
|
||||
<label for="appreciation">赞赏</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="comment" name="comment" class="hidden">
|
||||
<label for="comment">评论</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui error message"></div>
|
||||
|
||||
<div class="ui right aligned container">
|
||||
<button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
|
||||
<button class="ui secondary button">保存</button>
|
||||
<button class="ui teal button">发布</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<!--底部footer-->
|
||||
<footer class="ui inverted vertical segment m-padded-tb-massive">
|
||||
<div class="ui center aligned container">
|
||||
<div class="ui inverted divided stackable grid">
|
||||
<div class="three wide column">
|
||||
<div class="ui inverted link list">
|
||||
<div class="item">
|
||||
<img src="../../static/images/wechat.jpg" class="ui rounded image" alt="" style="width: 110px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">
|
||||
<h4 class="ui inverted header m-text-thin m-text-spaced " >最新博客</h4>
|
||||
<div class="ui inverted link list">
|
||||
<a href="#" class="item m-text-thin">用户故事(User Story)</a>
|
||||
<a href="#" class="item m-text-thin">用户故事(User Story)</a>
|
||||
<a href="#" class="item m-text-thin">用户故事(User Story)</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">
|
||||
<h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
|
||||
<div class="ui inverted link list">
|
||||
<a href="#" class="item m-text-thin">Email:lirenmi@163.com</a>
|
||||
<a href="#" class="item m-text-thin">QQ:865729312</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="seven wide column">
|
||||
<h4 class="ui inverted header m-text-thin m-text-spaced ">Blog</h4>
|
||||
<p class="m-text-thin m-text-spaced m-opacity-mini">这是我的个人博客、会分享关于编程、写作、思考相关的任何内容,希望可以给来到这儿的人有所帮助...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui inverted section divider"></div>
|
||||
<p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2016 - 2017 Lirenmi Designed by Lirenmi</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
<div class="required field">
|
||||
<div class="ui left labeled input">
|
||||
<label class="ui teal basic label">首图</label>
|
||||
<input type="text" name="firstPicture" th:value="*{firstPicture}" placeholder="首图引用地址">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="required field">
|
||||
<textarea name="description" th:text="*{description}" placeholder="博客描述..." maxlength="200"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="inline fields">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="recommend" name="recommend" checked th:checked="*{recommend}" class="hidden">
|
||||
<label for="recommend">推荐</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="shareStatement" name="shareStatement" th:checked="*{shareStatement}" class="hidden">
|
||||
<label for="shareStatement">转载声明</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="appreciation" name="appreciation" th:checked="*{appreciation}" class="hidden">
|
||||
<label for="appreciation">赞赏</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="commentabled" name="commentabled" th:checked="*{commentabled}" class="hidden">
|
||||
<label for="commentabled">评论</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui error message"></div>
|
||||
|
||||
<div class="ui right aligned container">
|
||||
<button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
|
||||
<button type="button" id="save-btn" class="ui secondary button">保存</button>
|
||||
<button type="button" id="publish-btn" class="ui teal button">发布</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<!--底部footer-->
|
||||
<footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<script src="../../static/lib/editormd/editormd.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
||||
<script>
|
||||
|
||||
//初始化Markdown编辑器
|
||||
var contentEditor;
|
||||
$(function() {
|
||||
contentEditor = editormd("md-content", {
|
||||
width : "100%",
|
||||
height : 640,
|
||||
syncScrolling : "single",
|
||||
path : "../../static/lib/editormd/lib/"
|
||||
});
|
||||
});
|
||||
$('.menu.toggle').click(function () {
|
||||
$('.m-item').toggleClass('m-mobile-hide');
|
||||
<script>
|
||||
|
||||
//初始化Markdown编辑器
|
||||
var contentEditor;
|
||||
$(function() {
|
||||
contentEditor = editormd("md-content", {
|
||||
width : "100%",
|
||||
height : 640,
|
||||
syncScrolling : "single",
|
||||
// path : "../static/lib/editormd/lib/"
|
||||
path : "/lib/editormd/lib/"
|
||||
});
|
||||
});
|
||||
$('.menu.toggle').click(function () {
|
||||
$('.m-item').toggleClass('m-mobile-hide');
|
||||
});
|
||||
|
||||
$('.ui.dropdown').dropdown({
|
||||
on : 'hover'
|
||||
});
|
||||
$('.ui.dropdown').dropdown({
|
||||
on : 'hover'
|
||||
});
|
||||
|
||||
$('.ui.form').form({
|
||||
fields : {
|
||||
title : {
|
||||
identifier: 'title',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客标题'
|
||||
}]
|
||||
}
|
||||
$('#save-btn').click(function () {
|
||||
$('[name="published"]').val(false);
|
||||
$('#blog-form').submit();
|
||||
});
|
||||
|
||||
|
||||
$('#publish-btn').click(function () {
|
||||
$('[name="published"]').val(true);
|
||||
$('#blog-form').submit();
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.ui.form').form({
|
||||
fields : {
|
||||
title : {
|
||||
identifier: 'title',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客标题'
|
||||
}]
|
||||
},
|
||||
content : {
|
||||
identifier: 'content',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客内容'
|
||||
}]
|
||||
},
|
||||
typeId : {
|
||||
identifier: 'type.id',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客分类'
|
||||
}]
|
||||
},
|
||||
firstPicture : {
|
||||
identifier: 'firstPicture',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客首图'
|
||||
}]
|
||||
},
|
||||
description : {
|
||||
identifier: 'description',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客描述'
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
|
||||
|
||||
</footer>
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>标签新增</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--导航-->
|
||||
<nav th:replace="admin/_fragments :: menu(3)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
|
||||
</nav>
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" th:href="@{/admin/tags/input}" class="active item">新增</a>
|
||||
<a href="#" th:href="@{/admin/tags}" class="teal item">列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container-small m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
<form action="#" method="post" th:object="${tag}" th:action="*{id}==null ? @{/admin/tags} : @{/admin/tags/{id}(id=*{id})} " class="ui form">
|
||||
<input type="hidden" name="id" th:value="*{id}">
|
||||
<div class=" field">
|
||||
<div class="ui left labeled input">
|
||||
<label class="ui teal basic label">名称</label>
|
||||
<input type="text" name="name" placeholder="分类名称" th:value="*{name}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui error message"></div>
|
||||
<!--/*/
|
||||
<div class="ui negative message" th:if="${#fields.hasErrors('name')}" >
|
||||
<i class="close icon"></i>
|
||||
<div class="header">验证失败</div>
|
||||
<p th:errors="*{name}">提交信息不符合规则</p>
|
||||
</div>
|
||||
/*/-->
|
||||
<div class="ui right aligned container">
|
||||
<button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
|
||||
<button class="ui teal submit button">提交</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<!--底部footer-->
|
||||
<footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
|
||||
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
||||
<script>
|
||||
|
||||
$('.menu.toggle').click(function () {
|
||||
$('.m-item').toggleClass('m-mobile-hide');
|
||||
});
|
||||
|
||||
$('.ui.dropdown').dropdown({
|
||||
on : 'hover'
|
||||
});
|
||||
|
||||
$('.ui.form').form({
|
||||
fields : {
|
||||
title : {
|
||||
identifier: 'name',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '请输入标签名称'
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -3,7 +3,7 @@
|
|||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>博客标签</title>
|
||||
<title>标签管理</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
|
@ -13,63 +13,65 @@
|
|||
<nav th:replace="admin/_fragments :: menu(3)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
</nav>
|
||||
|
||||
<h1>标签</h1>
|
||||
<!--<!–中间内容–>-->
|
||||
<!--<div class="m-container-small m-padded-tb-big">-->
|
||||
<!-- <div class="ui container">-->
|
||||
<!-- <div class="ui success message" th:unless="${#strings.isEmpty(message)}">-->
|
||||
<!-- <i class="close icon"></i>-->
|
||||
<!-- <div class="header">提示:</div>-->
|
||||
<!-- <p th:text="${message}">恭喜,操作成功!</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- <table class="ui celled table">-->
|
||||
<!-- <thead>-->
|
||||
<!-- <tr>-->
|
||||
<!-- <th></th>-->
|
||||
<!-- <th>名称</th>-->
|
||||
<!-- <th>操作</th>-->
|
||||
<!-- </tr>-->
|
||||
<!-- </thead>-->
|
||||
<!-- <tbody>-->
|
||||
<!-- <tr th:each="type,iterStat : ${page.content}">-->
|
||||
<!-- <td th:textr="${iterStat.count}">1</td>-->
|
||||
<!-- <td th:text="${type.name}">刻意练习清单</td>-->
|
||||
<!-- <td>-->
|
||||
<!-- <a href="#" th:href="@{/admin/types/{id}/input(id=${type.id})}" class="ui mini teal basic button">编辑</a>-->
|
||||
<!-- <a href="#" th:href="@{/admin/types/{id}/delete(id=${type.id})}" class="ui mini red basic button">删除</a>-->
|
||||
<!-- </td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- </tbody>-->
|
||||
<!-- <tfoot>-->
|
||||
<!-- <tr>-->
|
||||
<!-- <th colspan="6" >-->
|
||||
<!-- <div class="ui mini pagination menu" th:if="${page.totalPages}>1">-->
|
||||
<!-- <a th:href="@{/admin/types(page=${page.number}-1)}" class=" item" th:unless="${page.first}">上一页</a>-->
|
||||
<!-- <a th:href="@{/admin/types(page=${page.number}+1)}" class=" item" th:unless="${page.last}">下一页</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a href="#" th:href="@{/admin/types/input}" class="ui mini right floated teal basic button">新增</a>-->
|
||||
<!-- </th>-->
|
||||
<!-- </tr>-->
|
||||
<!-- </tfoot>-->
|
||||
<!-- </table>-->
|
||||
<!-- </div>-->
|
||||
<!--</div>-->
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" th:href="@{/admin/tags/input}" class="item">新增</a>
|
||||
<a href="#" th:href="@{/admin/tags}" class="teal active item">列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container-small m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
<div class="ui success message" th:unless="${#strings.isEmpty(message)}">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">提示:</div>
|
||||
<p th:text="${message}">恭喜,操作成功!</p>
|
||||
</div>
|
||||
<table class="ui compact teal table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>名称</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="tag,iterStat : ${page.content}">
|
||||
<td th:text="${iterStat.count}">1</td>
|
||||
<td th:text="${tag.name}">刻意练习清单</td>
|
||||
<td>
|
||||
<a href="#" th:href="@{/admin/tags/{id}/input(id=${tag.id})}" class="ui mini teal basic button">编辑</a>
|
||||
<a href="#" th:href="@{/admin/tags/{id}/delete(id=${tag.id})}" class="ui mini red basic button">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="6" >
|
||||
<div class="ui mini pagination menu" th:if="${page.totalPages}>1">
|
||||
<a th:href="@{/admin/tags(page=${page.number}-1)}" class=" item" th:unless="${page.first}">上一页</a>
|
||||
<a th:href="@{/admin/tags(page=${page.number}+1)}" class=" item" th:unless="${page.last}">下一页</a>
|
||||
</div>
|
||||
<a href="#" th:href="@{/admin/tags/input}" class="ui mini right floated teal basic button">新增</a>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<!--底部footer-->
|
||||
<footer th:replace="admin/_fragments ::footer" class="ui inverted vertical segment m-padded-tb-massive">
|
||||
|
||||
<footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
||||
<script>
|
||||
$('.menu.toggle').click(function () {
|
||||
$('.m-item').toggleClass('m-mobile-hide');
|
||||
|
@ -79,14 +81,13 @@
|
|||
on : 'hover'
|
||||
});
|
||||
|
||||
//消息隐藏
|
||||
//消息提示关闭初始化
|
||||
$('.message .close')
|
||||
.on("click",function (){
|
||||
$(this)
|
||||
.closest('.message')
|
||||
.transition('fade');
|
||||
})
|
||||
.on('click', function () {
|
||||
$(this)
|
||||
.closest('.message')
|
||||
.transition('fade');
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -3,7 +3,7 @@
|
|||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>博客管理</title>
|
||||
<title>分类</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
|
@ -119,7 +119,7 @@
|
|||
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>博客分类</title>
|
||||
<title>分类</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
|
@ -13,6 +13,15 @@
|
|||
<nav th:replace="admin/_fragments :: menu(2)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
</nav>
|
||||
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" th:href="@{/admin/types/input}" class="item">新增</a>
|
||||
<a href="#" th:href="@{/admin/types}" class="teal active item">列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container-small m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
|
@ -21,7 +30,7 @@
|
|||
<div class="header">提示:</div>
|
||||
<p th:text="${message}">恭喜,操作成功!</p>
|
||||
</div>
|
||||
<table class="ui celled table">
|
||||
<table class="ui compact teal table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -64,7 +73,7 @@
|
|||
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
Binary file not shown.
|
@ -1,240 +1,222 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>博客发布</title>
|
||||
<title>博客</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--导航-->
|
||||
<nav class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
<div class="ui container">
|
||||
<div class="ui inverted secondary stackable menu">
|
||||
<h2 class="ui teal header item">管理后台</h2>
|
||||
<a href="#" class="active m-item item m-mobile-hide"><i class="mini home icon"></i>博客</a>
|
||||
<a href="#" class=" m-item item m-mobile-hide"><i class="mini idea icon"></i>分类</a>
|
||||
<a href="#" class="m-item item m-mobile-hide"><i class="mini tags icon"></i>标签</a>
|
||||
<div class="right m-item m-mobile-hide menu">
|
||||
<div class="ui dropdown item">
|
||||
<div class="text">
|
||||
<img class="ui avatar image" src="https://unsplash.it/100/100?image=1005">
|
||||
李仁密
|
||||
</div>
|
||||
<!--导航-->
|
||||
<nav th:replace="admin/_fragments :: menu(1)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
|
||||
</nav>
|
||||
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" th:href="@{/admin/blogs/input}" class="teal active item">发布</a>
|
||||
<a href="#" th:href="@{/admin/blogs}" class="item">列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
<form id="blog-form" action="#" th:object="${blog}" th:action="@{/admin/blogs}" method="post" class="ui form">
|
||||
<input type="hidden" name="published" th:value="*{published}">
|
||||
<input type="hidden" name="id" th:value="*{id}">
|
||||
<div class="required field">
|
||||
<div class="ui left labeled input">
|
||||
<div class="ui selection compact teal basic dropdown label">
|
||||
<input type="hidden" value="原创" name="flag" th:value="*{flag}" >
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="text">原创</div>
|
||||
<div class="menu">
|
||||
<a href="#" class="item">注销</a>
|
||||
<div class="item" data-value="原创">原创</div>
|
||||
<div class="item" data-value="转载">转载</div>
|
||||
<div class="item" data-value="翻译">翻译</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" name="title" placeholder="标题" th:value="*{title}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
|
||||
<i class="sidebar icon"></i>
|
||||
</a>
|
||||
</nav>
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" class="teal active item">发布</a>
|
||||
<a href="#" class="item">列表</a>
|
||||
|
||||
<div class="required field">
|
||||
<div id="md-content" style="z-index: 1 !important;">
|
||||
<textarea placeholder="博客内容" name="content" style="display: none" th:text="*{content}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container-small m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
<form action="#" method="post" class="ui form">
|
||||
|
||||
<div class="two fields">
|
||||
<div class="required field">
|
||||
<div class="ui left labeled input">
|
||||
<div class="ui selection compact teal basic dropdown label">
|
||||
<input type="hidden" value="原创" >
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">分类</label>
|
||||
<div class="ui fluid selection dropdown">
|
||||
<input type="hidden" name="type.id" th:value="*{type}!=null ? *{type.id}">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="text">原创</div>
|
||||
<div class="default text">分类</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="原创">原创</div>
|
||||
<div class="item" data-value="转载">转载</div>
|
||||
<div class="item" data-value="翻译">翻译</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" name="title" placeholder="标题">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div id="md-content" style="z-index: 1 !important;">
|
||||
<textarea placeholder="博客内容" name="content" style="display: none">
|
||||
[TOC]
|
||||
|
||||
#### Disabled options
|
||||
|
||||
- TeX (Based on KaTeX);
|
||||
- Emoji;
|
||||
- Task lists;
|
||||
- HTML tags decode;
|
||||
- Flowchart and Sequence Diagram;
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="two fields">
|
||||
<div class="field">
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">分类</label>
|
||||
<div class="ui fluid selection dropdown">
|
||||
<input type="hidden" name="type">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">分类</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="1">错误日志</div>
|
||||
<div class="item" data-value="2">开发者手册</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">标签</label>
|
||||
<div class="ui fluid selection multiple search dropdown">
|
||||
<input type="hidden" name="tag">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">标签</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="1">java</div>
|
||||
<div class="item" data-value="2">JavaScript</div>
|
||||
</div>
|
||||
<div th:each="type : ${types}" class="item" data-value="1" th:data-value="${type.id}" th:text="${type.name}">错误日志</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="ui left labeled input">
|
||||
<label class="ui teal basic label">首图</label>
|
||||
<input type="text" name="indexPicture" placeholder="首图引用地址">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="inline fields">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="recommend" name="recommend" checked class="hidden">
|
||||
<label for="recommend">推荐</label>
|
||||
<div class=" field">
|
||||
<div class="ui left labeled action input">
|
||||
<label class="ui compact teal basic label">标签</label>
|
||||
<div class="ui fluid selection multiple search dropdown">
|
||||
<input type="hidden" name="tagIds" th:value="*{tagIds}" >
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">标签</div>
|
||||
<div class="menu">
|
||||
<div th:each="tag : ${tags}" class="item" data-value="1" th:data-value="${tag.id}" th:text="${tag.name}">java</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="shareInfo" name="shareInfo" class="hidden">
|
||||
<label for="shareInfo">转载声明</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="appreciation" name="appreciation" class="hidden">
|
||||
<label for="appreciation">赞赏</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="comment" name="comment" class="hidden">
|
||||
<label for="comment">评论</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui error message"></div>
|
||||
|
||||
<div class="ui right aligned container">
|
||||
<button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
|
||||
<button class="ui secondary button">保存</button>
|
||||
<button class="ui teal button">发布</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<!--底部footer-->
|
||||
<footer class="ui inverted vertical segment m-padded-tb-massive">
|
||||
<div class="ui center aligned container">
|
||||
<div class="ui inverted divided stackable grid">
|
||||
<div class="three wide column">
|
||||
<div class="ui inverted link list">
|
||||
<div class="item">
|
||||
<img src="../../static/images/wechat.jpg" class="ui rounded image" alt="" style="width: 110px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">
|
||||
<h4 class="ui inverted header m-text-thin m-text-spaced " >最新博客</h4>
|
||||
<div class="ui inverted link list">
|
||||
<a href="#" class="item m-text-thin">用户故事(User Story)</a>
|
||||
<a href="#" class="item m-text-thin">用户故事(User Story)</a>
|
||||
<a href="#" class="item m-text-thin">用户故事(User Story)</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">
|
||||
<h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
|
||||
<div class="ui inverted link list">
|
||||
<a href="#" class="item m-text-thin">Email:lirenmi@163.com</a>
|
||||
<a href="#" class="item m-text-thin">QQ:865729312</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="seven wide column">
|
||||
<h4 class="ui inverted header m-text-thin m-text-spaced ">Blog</h4>
|
||||
<p class="m-text-thin m-text-spaced m-opacity-mini">这是我的个人博客、会分享关于编程、写作、思考相关的任何内容,希望可以给来到这儿的人有所帮助...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui inverted section divider"></div>
|
||||
<p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2016 - 2017 Lirenmi Designed by Lirenmi</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
<div class="required field">
|
||||
<div class="ui left labeled input">
|
||||
<label class="ui teal basic label">首图</label>
|
||||
<input type="text" name="firstPicture" th:value="*{firstPicture}" placeholder="首图引用地址">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="required field">
|
||||
<textarea name="description" th:text="*{description}" placeholder="博客描述..." maxlength="200"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="inline fields">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="recommend" name="recommend" checked th:checked="*{recommend}" class="hidden">
|
||||
<label for="recommend">推荐</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="shareStatement" name="shareStatement" th:checked="*{shareStatement}" class="hidden">
|
||||
<label for="shareStatement">转载声明</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="appreciation" name="appreciation" th:checked="*{appreciation}" class="hidden">
|
||||
<label for="appreciation">赞赏</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" id="commentabled" name="commentabled" th:checked="*{commentabled}" class="hidden">
|
||||
<label for="commentabled">评论</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui error message"></div>
|
||||
|
||||
<div class="ui right aligned container">
|
||||
<button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
|
||||
<button type="button" id="save-btn" class="ui secondary button">保存</button>
|
||||
<button type="button" id="publish-btn" class="ui teal button">发布</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<!--底部footer-->
|
||||
<footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<script src="../../static/lib/editormd/editormd.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
||||
<script>
|
||||
|
||||
//初始化Markdown编辑器
|
||||
var contentEditor;
|
||||
$(function() {
|
||||
contentEditor = editormd("md-content", {
|
||||
width : "100%",
|
||||
height : 640,
|
||||
syncScrolling : "single",
|
||||
path : "../../static/lib/editormd/lib/"
|
||||
});
|
||||
});
|
||||
$('.menu.toggle').click(function () {
|
||||
$('.m-item').toggleClass('m-mobile-hide');
|
||||
<script>
|
||||
|
||||
//初始化Markdown编辑器
|
||||
var contentEditor;
|
||||
$(function() {
|
||||
contentEditor = editormd("md-content", {
|
||||
width : "100%",
|
||||
height : 640,
|
||||
syncScrolling : "single",
|
||||
// path : "../static/lib/editormd/lib/"
|
||||
path : "/lib/editormd/lib/"
|
||||
});
|
||||
});
|
||||
$('.menu.toggle').click(function () {
|
||||
$('.m-item').toggleClass('m-mobile-hide');
|
||||
});
|
||||
|
||||
$('.ui.dropdown').dropdown({
|
||||
on : 'hover'
|
||||
});
|
||||
$('.ui.dropdown').dropdown({
|
||||
on : 'hover'
|
||||
});
|
||||
|
||||
$('.ui.form').form({
|
||||
fields : {
|
||||
title : {
|
||||
identifier: 'title',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客标题'
|
||||
}]
|
||||
}
|
||||
$('#save-btn').click(function () {
|
||||
$('[name="published"]').val(false);
|
||||
$('#blog-form').submit();
|
||||
});
|
||||
|
||||
|
||||
$('#publish-btn').click(function () {
|
||||
$('[name="published"]').val(true);
|
||||
$('#blog-form').submit();
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.ui.form').form({
|
||||
fields : {
|
||||
title : {
|
||||
identifier: 'title',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客标题'
|
||||
}]
|
||||
},
|
||||
content : {
|
||||
identifier: 'content',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客内容'
|
||||
}]
|
||||
},
|
||||
typeId : {
|
||||
identifier: 'type.id',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客分类'
|
||||
}]
|
||||
},
|
||||
firstPicture : {
|
||||
identifier: 'firstPicture',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客首图'
|
||||
}]
|
||||
},
|
||||
description : {
|
||||
identifier: 'description',
|
||||
rules: [{
|
||||
type : 'empty',
|
||||
prompt: '标题:请输入博客描述'
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
|
||||
|
||||
</footer>
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>博客管理</title>
|
||||
<title>分类</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
|
@ -119,7 +119,7 @@
|
|||
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head th:replace="admin/_fragments :: head(~{::title})">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>博客分类</title>
|
||||
<title>分类</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
|
||||
<link rel="stylesheet" href="../../static/css/me.css">
|
||||
</head>
|
||||
|
@ -13,6 +13,15 @@
|
|||
<nav th:replace="admin/_fragments :: menu(2)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
|
||||
</nav>
|
||||
|
||||
<div class="ui attached pointing menu">
|
||||
<div class="ui container">
|
||||
<div class="right menu">
|
||||
<a href="#" th:href="@{/admin/types/input}" class="item">新增</a>
|
||||
<a href="#" th:href="@{/admin/types}" class="teal active item">列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--中间内容-->
|
||||
<div class="m-container-small m-padded-tb-big">
|
||||
<div class="ui container">
|
||||
|
@ -21,7 +30,7 @@
|
|||
<div class="header">提示:</div>
|
||||
<p th:text="${message}">恭喜,操作成功!</p>
|
||||
</div>
|
||||
<table class="ui celled table">
|
||||
<table class="ui compact teal table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -64,7 +73,7 @@
|
|||
|
||||
</footer>
|
||||
|
||||
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
|
||||
<!--/*/<th:block th:replace="admin/_fragments :: script">/*/-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
|
||||
<!--/*/</th:block>/*/-->
|
||||
|
|
Loading…
Reference in New Issue