对博客进行了优化置顶,收藏,热度等操作
This commit is contained in:
56
README.md
56
README.md
@@ -1,56 +0,0 @@
|
||||
# 狂神的小社区开源版
|
||||
|
||||

|
||||
|
||||
### 介绍
|
||||
|
||||
> 社区开源版本,精简了代码,改变为单体项目,方便大家一键启动!
|
||||
|
||||
> 地址:http://www.quinn.com/
|
||||
|
||||
项目架子主要依赖:
|
||||
- SpringBoot 2.3.0
|
||||
- MySQL 5.7
|
||||
- MyBatisPlus 3.0.5
|
||||
- swagger
|
||||
- fastjson
|
||||
- thymeleaf
|
||||
- editormd
|
||||
- layer
|
||||
- bootstrap
|
||||
- springsecurity
|
||||
- 代码自动生成
|
||||
|
||||
### 安装教程
|
||||
|
||||
1. 执行SQL,创建数据库
|
||||
2. 项目导入IDEA 启动
|
||||
3. 访问测试!
|
||||
4. 自行根据代码逻辑填充测试数据,查看即可!
|
||||
|
||||
### 目录说明
|
||||
```shell script
|
||||
src/main/java/com/quinn
|
||||
- config 配置类
|
||||
- controller controller
|
||||
- generator 代码生成器
|
||||
- mapper mapper
|
||||
- pojo pojo
|
||||
- result 统一返回结果
|
||||
- service service
|
||||
- utils 工具类
|
||||
- vo vo对象
|
||||
QuinnApplication 启动类
|
||||
|
||||
src/resources
|
||||
- static 静态资源
|
||||
- templates 页面模板
|
||||
- application-dev.properties 配置文件
|
||||
|
||||
quinn.sql 数据库文件
|
||||
```
|
||||
|
||||
### 如何加入狂神的小社区
|
||||
|
||||
http://mp.weixin.qq.com/mp/homepage?__biz=Mzg2NTAzMTExNg==&hid=5&sn=5732bda552bcb476e55f678983edfb51&scene=18#wechat_redirect
|
||||
|
||||
|
||||
@@ -20,4 +20,11 @@ public interface QuinnConstant {
|
||||
*/
|
||||
String SOURCE_PASSWORD = "926462";
|
||||
|
||||
String APPEND_PASSWORD = "wangna&limengqi";
|
||||
|
||||
String NEW_SOURCE_PASSWORD = "limengqi&wangna";
|
||||
|
||||
String EDIT_SOURCE_FIRST = "lw@";
|
||||
String EDIT_SOURCE_LAST = "#";
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class AboutController {
|
||||
|
||||
@GetMapping("/about")
|
||||
public String userIndexBlog(Model model){
|
||||
Page<About> pageParam = new Page<>(1, 50);
|
||||
Page<About> pageParam = new Page<>(1, 20);
|
||||
aboutService.page(pageParam,new QueryWrapper<About>().orderByDesc("gmt_create"));
|
||||
// 结果
|
||||
List<About> sayList = pageParam.getRecords();
|
||||
|
||||
17
src/main/java/com/quinn/controller/BaseModelController.java
Normal file
17
src/main/java/com/quinn/controller/BaseModelController.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.quinn.controller;
|
||||
|
||||
import com.quinn.pojo.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class BaseModelController {
|
||||
|
||||
protected String getLoginUserId(HttpServletRequest request){
|
||||
User user = (User) request.getSession().getAttribute("loginUser");
|
||||
if (user != null){
|
||||
return user.getUid();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
* @author limqsh
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Controller
|
||||
//@Controller
|
||||
public class BlogCategoryController {
|
||||
|
||||
@Autowired
|
||||
@@ -31,7 +31,8 @@ public class BlogCategoryController {
|
||||
@Autowired
|
||||
BlogService blogService;
|
||||
|
||||
@GetMapping("/blog/category/{bid}/{page}/{limit}")
|
||||
@Deprecated
|
||||
// @GetMapping("/blog/category/{bid}/{page}/{limit}")
|
||||
public String blogPage(
|
||||
@PathVariable int bid,
|
||||
@PathVariable int page,
|
||||
|
||||
@@ -5,17 +5,26 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.quinn.pojo.Blog;
|
||||
import com.quinn.pojo.BlogCategory;
|
||||
import com.quinn.pojo.BlogStar;
|
||||
import com.quinn.pojo.Comment;
|
||||
import com.quinn.service.BlogCategoryService;
|
||||
import com.quinn.service.BlogService;
|
||||
import com.quinn.service.BlogStarService;
|
||||
import com.quinn.service.CommentService;
|
||||
import com.quinn.utils.QuinnUtils;
|
||||
import com.quinn.vo.BlogStarReq;
|
||||
import com.quinn.vo.QuestionWriteForm;
|
||||
import com.quinn.vo.StarValue;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -27,7 +36,7 @@ import java.util.List;
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Controller
|
||||
public class BlogController {
|
||||
public class BlogController extends BaseModelController{
|
||||
|
||||
@Autowired
|
||||
BlogCategoryService blogCategoryService;
|
||||
@@ -35,18 +44,23 @@ public class BlogController {
|
||||
BlogService blogService;
|
||||
@Autowired
|
||||
CommentService commentService;
|
||||
@Resource
|
||||
BlogStarService blogStarService;
|
||||
|
||||
// 列表展示
|
||||
@GetMapping("/blog")
|
||||
public String blogList(Model model){
|
||||
|
||||
Page<Blog> pageParam = new Page<>(1, 10);
|
||||
blogService.page(pageParam,new QueryWrapper<Blog>().orderByDesc("gmt_create"));
|
||||
blogService.page(pageParam,new QueryWrapper<Blog>().orderByDesc("sort").orderByDesc("gmt_create"));
|
||||
// 结果
|
||||
List<Blog> blogList = pageParam.getRecords();
|
||||
model.addAttribute("blogList",blogList);
|
||||
model.addAttribute("pageParam",pageParam);
|
||||
|
||||
List<Blog> topBlogList = blogService.getTopBlog();
|
||||
model.addAttribute("topBlogList",topBlogList);
|
||||
|
||||
// 分类信息
|
||||
List<BlogCategory> categoryList = blogCategoryService.list(null);
|
||||
model.addAttribute("categoryList",categoryList);
|
||||
@@ -64,13 +78,16 @@ public class BlogController {
|
||||
page = 1;
|
||||
}
|
||||
Page<Blog> pageParam = new Page<>(page, limit);
|
||||
blogService.page(pageParam,new QueryWrapper<Blog>().orderByDesc("gmt_create"));
|
||||
blogService.page(pageParam,new QueryWrapper<Blog>().orderByDesc("sort").orderByDesc("gmt_create"));
|
||||
|
||||
// 结果
|
||||
List<Blog> blogList = pageParam.getRecords();
|
||||
model.addAttribute("blogList",blogList);
|
||||
model.addAttribute("pageParam",pageParam);
|
||||
|
||||
List<Blog> topBlogList = blogService.getTopBlog();
|
||||
model.addAttribute("topBlogList",topBlogList);
|
||||
|
||||
// 分类信息
|
||||
List<BlogCategory> categoryList = blogCategoryService.list(null);
|
||||
model.addAttribute("categoryList",categoryList);
|
||||
@@ -115,16 +132,52 @@ public class BlogController {
|
||||
|
||||
// 阅读文章
|
||||
@GetMapping("/blog/read/{bid}")
|
||||
public String read(@PathVariable("bid") String bid,Model model){
|
||||
public String read(HttpServletRequest request, @PathVariable("bid") String bid, Model model){
|
||||
Blog blog = blogService.getOne(new QueryWrapper<Blog>().eq("bid", bid));
|
||||
blog.setViews(blog.getViews()+1);
|
||||
blogService.updateById(blog);
|
||||
model.addAttribute("blog",blog);
|
||||
|
||||
StarValue starValue = new StarValue();
|
||||
starValue.setStar(false);
|
||||
String loginUserId = getLoginUserId(request);
|
||||
if (!StringUtils.isEmpty(loginUserId)){
|
||||
List<BlogStar> stars = blogStarService.list(new QueryWrapper<BlogStar>().eq("user_id", loginUserId));
|
||||
if (!CollectionUtils.isEmpty(stars)){
|
||||
starValue.setStar(true);
|
||||
}
|
||||
}
|
||||
model.addAttribute("starValue",starValue);
|
||||
|
||||
List<Comment> commentList = commentService.list(new QueryWrapper<Comment>().eq("topic_id", bid).orderByDesc("gmt_create"));
|
||||
model.addAttribute("commentList",commentList);
|
||||
return "blog/read";
|
||||
}
|
||||
|
||||
// 收藏
|
||||
@PostMapping("/blog/star")
|
||||
public synchronized String toStar(BlogStarReq blogStarReq, Model model){
|
||||
StarValue starValue = new StarValue();
|
||||
starValue.setStar(false);
|
||||
List<BlogStar> list = blogStarService.list(new QueryWrapper<BlogStar>()
|
||||
.eq("user_id", blogStarReq.getUserId()).eq("topic_id", blogStarReq.getTopicId()));
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
list.forEach(x->{
|
||||
blogStarService.removeById(x);
|
||||
});
|
||||
starValue.setStar(false);
|
||||
} else {
|
||||
BlogStar blogStar = new BlogStar();
|
||||
blogStar.setTopicId(blogStarReq.getTopicId());
|
||||
blogStar.setUserId(blogStarReq.getUserId());
|
||||
blogStar.setGmtCreate(QuinnUtils.getTime());
|
||||
blogStarService.save(blogStar);
|
||||
starValue.setStar(true);
|
||||
}
|
||||
model.addAttribute("starValue",starValue);
|
||||
return "blog/read::star_refresh";
|
||||
}
|
||||
|
||||
// 编辑问题
|
||||
@GetMapping("/blog/editor/{uid}/{bid}")
|
||||
public synchronized String toEditor(@PathVariable("uid") String uid,
|
||||
@@ -188,8 +241,5 @@ public class BlogController {
|
||||
return "redirect:/blog/read/"+bid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
59
src/main/java/com/quinn/controller/SearchController.java
Normal file
59
src/main/java/com/quinn/controller/SearchController.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package com.quinn.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.quinn.common.QuinnConstant;
|
||||
import com.quinn.pojo.About;
|
||||
import com.quinn.pojo.Source;
|
||||
import com.quinn.service.SourceService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author limqsh
|
||||
* @since 2022-05-01
|
||||
*/
|
||||
@Controller
|
||||
public class SearchController {
|
||||
|
||||
@Resource
|
||||
SourceService sourceService;
|
||||
|
||||
@PostMapping("/search")
|
||||
public String searchAll(String findWhat,Model model){
|
||||
if (StringUtils.isEmpty(findWhat)){
|
||||
return "index";
|
||||
}
|
||||
if (QuinnConstant.NEW_SOURCE_PASSWORD.equals(findWhat)){
|
||||
return "source/uploadSource";
|
||||
}
|
||||
if (QuinnConstant.APPEND_PASSWORD.equals(findWhat)){
|
||||
return "page/append";
|
||||
}
|
||||
if (findWhat.startsWith(QuinnConstant.EDIT_SOURCE_FIRST)){
|
||||
findWhat = findWhat.substring(findWhat.indexOf(QuinnConstant.EDIT_SOURCE_FIRST) + QuinnConstant.EDIT_SOURCE_FIRST.length());
|
||||
if (!StringUtils.isEmpty(findWhat) && findWhat.endsWith(QuinnConstant.EDIT_SOURCE_LAST)){
|
||||
findWhat = findWhat.substring(0,findWhat.lastIndexOf(QuinnConstant.EDIT_SOURCE_LAST));
|
||||
}
|
||||
if (!StringUtils.isEmpty(findWhat)){
|
||||
Source sid = sourceService.getOne(new QueryWrapper<Source>().eq("sid", findWhat));
|
||||
if (sid!=null){
|
||||
return "redirect:/tracy/mcgrady/lmq/love/wn/" + findWhat;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "index";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,15 +43,15 @@ public class CodeGenerator {
|
||||
PackageConfig pc = new PackageConfig();
|
||||
pc.setModuleName("quinn");
|
||||
pc.setParent("com");
|
||||
// pc.setController("controller");
|
||||
pc.setController("controller");
|
||||
pc.setEntity("pojo");
|
||||
// pc.setService("service");
|
||||
// pc.setMapper("mapper");
|
||||
pc.setService("service");
|
||||
pc.setMapper("mapper");
|
||||
mpg.setPackageInfo(pc);
|
||||
|
||||
// 5、策略配置
|
||||
StrategyConfig strategy = new StrategyConfig();
|
||||
strategy.setInclude("qn_source");//设置要映射的表名
|
||||
strategy.setInclude("qn_blog_star");//设置要映射的表名
|
||||
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略
|
||||
strategy.setTablePrefix("qn_");//设置表前缀不生成
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.quinn.mapper;
|
||||
import com.quinn.pojo.Blog;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface BlogMapper extends BaseMapper<Blog> {
|
||||
|
||||
List<Blog> getTopBlog();
|
||||
}
|
||||
|
||||
16
src/main/java/com/quinn/mapper/BlogStarMapper.java
Normal file
16
src/main/java/com/quinn/mapper/BlogStarMapper.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.quinn.mapper;
|
||||
|
||||
import com.quinn.pojo.BlogStar;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author limqsh
|
||||
* @since 2022-05-08
|
||||
*/
|
||||
public interface BlogStarMapper extends BaseMapper<BlogStar> {
|
||||
|
||||
}
|
||||
@@ -2,4 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.quinn.mapper.BlogMapper">
|
||||
|
||||
<select id="getTopBlog" resultType="com.quinn.pojo.Blog">
|
||||
select bid,title,(star + views) as views from qn_blog where sort = 0
|
||||
order by (star + views) desc limit 5;
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -44,6 +44,9 @@ public class Blog implements Serializable {
|
||||
@ApiModelProperty(value = "排序 0 普通 1 置顶")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "收藏")
|
||||
private Integer star;
|
||||
|
||||
@ApiModelProperty(value = "浏览量")
|
||||
private Integer views;
|
||||
|
||||
|
||||
45
src/main/java/com/quinn/pojo/BlogStar.java
Normal file
45
src/main/java/com/quinn/pojo/BlogStar.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.quinn.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author limqsh
|
||||
* @since 2022-05-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("qn_blog_star")
|
||||
@ApiModel(value="BlogStar对象", description="")
|
||||
public class BlogStar implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "收藏主题id")
|
||||
private String topicId;
|
||||
|
||||
@ApiModelProperty(value = "收藏者id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "收藏创建时间")
|
||||
private Date gmtCreate;
|
||||
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.quinn.service;
|
||||
import com.quinn.pojo.Blog;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -13,4 +15,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface BlogService extends IService<Blog> {
|
||||
|
||||
List<Blog> getTopBlog();
|
||||
|
||||
}
|
||||
|
||||
16
src/main/java/com/quinn/service/BlogStarService.java
Normal file
16
src/main/java/com/quinn/service/BlogStarService.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.quinn.service;
|
||||
|
||||
import com.quinn.pojo.BlogStar;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author limqsh
|
||||
* @since 2022-05-08
|
||||
*/
|
||||
public interface BlogStarService extends IService<BlogStar> {
|
||||
|
||||
}
|
||||
@@ -5,6 +5,11 @@ import com.quinn.mapper.BlogMapper;
|
||||
import com.quinn.service.BlogService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -17,4 +22,18 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements BlogService {
|
||||
|
||||
@Resource
|
||||
BlogMapper blogMapper;
|
||||
|
||||
@Override
|
||||
public List<Blog> getTopBlog(){
|
||||
List<Blog> topBlog = blogMapper.getTopBlog();
|
||||
if (!CollectionUtils.isEmpty(topBlog)){
|
||||
topBlog.forEach(x->{
|
||||
x.setContent("");
|
||||
});
|
||||
}
|
||||
return topBlog;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.quinn.service.impl;
|
||||
|
||||
import com.quinn.pojo.BlogStar;
|
||||
import com.quinn.mapper.BlogStarMapper;
|
||||
import com.quinn.service.BlogStarService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author limqsh
|
||||
* @since 2022-05-08
|
||||
*/
|
||||
@Service
|
||||
public class BlogStarServiceImpl extends ServiceImpl<BlogStarMapper, BlogStar> implements BlogStarService {
|
||||
|
||||
}
|
||||
19
src/main/java/com/quinn/vo/BlogStarReq.java
Normal file
19
src/main/java/com/quinn/vo/BlogStarReq.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.quinn.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class BlogStarReq {
|
||||
|
||||
@ApiModelProperty(value = "主题号")
|
||||
private String topicId;
|
||||
|
||||
@ApiModelProperty(value = "用户编号")
|
||||
private String userId;
|
||||
|
||||
}
|
||||
16
src/main/java/com/quinn/vo/StarValue.java
Normal file
16
src/main/java/com/quinn/vo/StarValue.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.quinn.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class StarValue {
|
||||
|
||||
@ApiModelProperty(value = "是否收藏")
|
||||
private boolean star;
|
||||
|
||||
}
|
||||
BIN
src/main/resources/static/images/menu/wechat.jpeg
Normal file
BIN
src/main/resources/static/images/menu/wechat.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
@@ -46,7 +46,6 @@ try {
|
||||
},
|
||||
"referrer_hostname": {
|
||||
"example.com": ["示例网站"],
|
||||
"www.fghrsh.net": ["FGHRSH 的论坛"]
|
||||
},
|
||||
"model_message": {
|
||||
"1": ["来自 Pio 酱 ~"],
|
||||
@@ -130,6 +129,13 @@ try {
|
||||
live2d_settings['modelStorage'] = false;
|
||||
live2d_settings['canTurnToAboutPage'] = false;
|
||||
live2d_settings['screenshotCaptureName']= 'quinn.png';
|
||||
live2d_settings['waifuSize'] = '240x210'; // 看板娘大小,例如 '280x250', '600x535'
|
||||
live2d_settings['waifuTipsSize'] = '210x50'; // 提示框大小,例如 '250x70', '570x150'
|
||||
live2d_settings['waifuFontSize'] = '12px'; // 提示框字体,例如 '12px', '30px'
|
||||
live2d_settings['waifuToolFont'] = '14px'; // 工具栏字体,例如 '14px', '36px'
|
||||
live2d_settings['waifuToolLine'] = '20px'; // 工具栏行高,例如 '20px', '36px'
|
||||
live2d_settings['waifuToolTop'] = '0px' // 工具栏顶部边距,例如 '0px', '-60px'
|
||||
live2d_settings['waifuMinWidth'] = 'disable'; // 面页小于 指定宽度 隐藏看板娘,例如 'disable'(禁用), '768px'
|
||||
live2d_settings['waifuEdgeSide'] = 'right:88'; // 看板娘贴边方向,例如 'left:0'(靠左 0px), 'right:30'(靠右 30px)
|
||||
live2d_settings['waifuDraggable'] = 'unlimited'; // 拖拽样式,例如 'disable'(禁用), 'axis-x'(只能水平拖拽), 'unlimited'(自由拖拽)
|
||||
live2d_settings['waifuDraggableRevert'] = false; // 松开鼠标还原拖拽位置,可选 true(真), false(假)
|
||||
|
||||
@@ -14,43 +14,42 @@
|
||||
<main role="main" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-9 blog-main">
|
||||
|
||||
<div class="my-3 p-3 bg-white rounded shadow-sm">
|
||||
|
||||
<h6 class="border-bottom border-gray pb-2 mb-0">
|
||||
Q&A 累计:
|
||||
论坛累计:
|
||||
<span th:text="${pageParam.getTotal()}"></span>
|
||||
<span class="float-right" th:if="${!#strings.isEmpty(thisCategoryName)}">
|
||||
<a th:href="@{/blog}">全部</a>
|
||||
/
|
||||
<span th:text="${thisCategoryName}"></span>
|
||||
</span>
|
||||
</h6>
|
||||
|
||||
<div th:each="blog:${blogList}" class="media text-muted pt-3">
|
||||
<!-- 时间 -->
|
||||
<div th:each="blog:${blogList}" class="media pt-3 border-bottom border-gray">
|
||||
<!-- 头像 -->
|
||||
<img th:src="${blog.getAuthorAvatar()}" style="border-radius: 5px " width="32" height="32">
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray" style="margin-left: 5px">
|
||||
<div class="media-body small pl-2">
|
||||
<!-- 标题 -->
|
||||
<a th:text="${blog.getTitle()}"
|
||||
th:href="@{'/blog/read/'+${blog.getBid()}}"
|
||||
class="text-dark font-weight-bold text-decoration-none d-block">
|
||||
<a th:href="@{'/blog/read/'+${blog.getBid()}}"
|
||||
class="text-dark font-weight-bold text-decoration-none">
|
||||
<span th:if="${blog.getSort() == 1}" class="badge badge-danger">置顶</span>
|
||||
[[${blog.getTitle()}]]
|
||||
</a>
|
||||
<!-- 浏览量 -->
|
||||
<span>
|
||||
<svg class="bi bi-eye-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
|
||||
<path fill-rule="evenodd" d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
|
||||
</svg>
|
||||
[[${blog.getViews()}]]
|
||||
</span>
|
||||
<!-- 时间 -->
|
||||
<span th:text="${#dates.format(blog.getGmtUpdate(),'yyyy-MM-dd')}"
|
||||
class="badge badge-light float-right">
|
||||
</span>
|
||||
</p>
|
||||
<p class="float-right" th:text="${#dates.format(blog.getGmtUpdate(),'yyyy-MM-dd')}"></p>
|
||||
<div class="small">
|
||||
<!-- 浏览量 -->
|
||||
<span>
|
||||
<svg class="bi bi-eye-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
|
||||
<path fill-rule="evenodd" d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
|
||||
</svg>
|
||||
[[${blog.getViews()}]]
|
||||
</span>
|
||||
<!-- 收藏 -->
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" class="bi bi-heart-fill" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/>
|
||||
</svg>
|
||||
[[${blog.getStar()}]]
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--分页-->
|
||||
<nav aria-label="Page navigation example" class="mt-4">
|
||||
<ul class="pagination justify-content-center pagination-sm">
|
||||
@@ -85,21 +84,32 @@
|
||||
</div>
|
||||
|
||||
<div class="p-4 my-3 bg-white rounded">
|
||||
<p class="mb-0"> 社区公约: <br> 禁止瞎水论坛,内容尽量有实际意义,禁止任何形式的广告,违者暂停账号使用! 申请分类可以在Q群@小狂神 </p>
|
||||
<p class="mb-0">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-bookmarks-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v11.5a.5.5 0 0 1-.777.416L7 13.101l-4.223 2.815A.5.5 0 0 1 2 15.5V4z"/>
|
||||
<path d="M4.268 1A2 2 0 0 1 6 0h6a2 2 0 0 1 2 2v11.5a.5.5 0 0 1-.777.416L13 13.768V2a1 1 0 0 0-1-1H4.268z"/>
|
||||
</svg>
|
||||
敲黑板
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-bookmarks-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v11.5a.5.5 0 0 1-.777.416L7 13.101l-4.223 2.815A.5.5 0 0 1 2 15.5V4z"/>
|
||||
<path d="M4.268 1A2 2 0 0 1 6 0h6a2 2 0 0 1 2 2v11.5a.5.5 0 0 1-.777.416L13 13.768V2a1 1 0 0 0-1-1H4.268z"/>
|
||||
</svg>
|
||||
<br> 如果发的帖子水分过大,可能会被封禁账号,请酌情发帖评论! </p>
|
||||
</div>
|
||||
|
||||
<div class="p-4 my-3 bg-white rounded">
|
||||
<a th:href="@{'/blog/category/'+${category.getId()}+'/1/10'}"
|
||||
th:each="category:${categoryList}" th:text="${category.getCategory()}"
|
||||
class="badge badge-pill badge-primary mr-1"></a>
|
||||
</div>
|
||||
|
||||
<div class="p-4 my-3 bg-white rounded">
|
||||
<h4 class="font-italic">友情链接</h4>
|
||||
<ol class="list-unstyled">
|
||||
<li><a href="https://gitee.com/quinn">Gitee</a></li>
|
||||
<li><a href="https://space.bilibili.com/95256449">Bilibili</a></li>
|
||||
</ol>
|
||||
<h4 class="font-italic pb-3">推荐</h4>
|
||||
<ul class="list-unstyled" th:each="topBlog:${topBlogList}">
|
||||
<li>
|
||||
<a class="text-dark text-decoration-none" th:href="@{'/blog/read/'+${topBlog.getBid()}}">
|
||||
<span class="badge badge-dark">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-balloon-fill" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8.48 10.901C11.211 10.227 13 7.837 13 5A5 5 0 0 0 3 5c0 2.837 1.789 5.227 4.52 5.901l-.244.487a.25.25 0 1 0 .448.224l.04-.08c.009.17.024.315.051.45.068.344.208.622.448 1.102l.013.028c.212.422.182.85.05 1.246-.135.402-.366.751-.534 1.003a.25.25 0 0 0 .416.278l.004-.007c.166-.248.431-.646.588-1.115.16-.479.212-1.051-.076-1.629-.258-.515-.365-.732-.419-1.004a2.376 2.376 0 0 1-.037-.289l.008.017a.25.25 0 1 0 .448-.224l-.244-.487ZM4.352 3.356a4.004 4.004 0 0 1 3.15-2.325C7.774.997 8 1.224 8 1.5c0 .276-.226.496-.498.542-.95.162-1.749.78-2.173 1.617a.595.595 0 0 1-.52.341c-.346 0-.599-.329-.457-.644Z"/>
|
||||
</svg>
|
||||
[[${topBlog.getViews()}]]</span>
|
||||
[[${topBlog.getTitle()}]]
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</span>
|
||||
<!-- 自己写的文章可以编辑和删除 -->
|
||||
<a th:if="${session.loginUser.getUid()==blog.getAuthorId()}"
|
||||
class="float-right" style="color: red"
|
||||
class="float-right text-decoration-none" style="color: red"
|
||||
th:href="@{'/blog/delete/'+${session.loginUser.getUid()}+'/'+${blog.getBid()}}"
|
||||
onclick="if(!confirm('你确认要删除吗?')) return false;">
|
||||
<svg class="bi bi-x-square" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -50,7 +50,7 @@
|
||||
删除
|
||||
</a>
|
||||
<a th:if="${session.loginUser.getUid()==blog.getAuthorId()}"
|
||||
class="float-right mr-3"
|
||||
class="float-right mr-3 text-decoration-none"
|
||||
th:href="@{'/blog/editor/'+${session.loginUser.getUid()}+'/'+${blog.getBid()}}">
|
||||
<svg class="bi bi-pencil-square" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456l-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
|
||||
@@ -58,6 +58,18 @@
|
||||
</svg>
|
||||
编辑
|
||||
</a>
|
||||
<span class="float-right" th:if="${session.loginUser.getUid()!=blog.getAuthorId()}">
|
||||
<a class="text-danger text-decoration-none" th:fragment="star_refresh" th:id="id_star_refresh"
|
||||
href="javascript:starFun(this);">
|
||||
<svg th:if="${starValue.isStar() == true}" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart-fill" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/>
|
||||
</svg>
|
||||
<svg th:if="${starValue.isStar() != true}" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart" viewBox="0 0 16 16">
|
||||
<path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"/>
|
||||
</svg>
|
||||
收藏
|
||||
</a>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -76,10 +88,10 @@
|
||||
|
||||
<div class="col-md-12 blog-main" style="margin-top: 20px">
|
||||
<form th:action="@{'/blog/comment/'+${blog.getBid()}}" method="post">
|
||||
<input type="hidden" name="userId" th:value="${session.loginUser.getUid()}">
|
||||
<input type="hidden" id="userId" name="userId" th:value="${session.loginUser.getUid()}">
|
||||
<input type="hidden" name="userName" th:value="${session.loginUser.getUsername()}">
|
||||
<input type="hidden" name="userAvatar" th:value="${session.loginUser.getAvatar()}">
|
||||
<input type="hidden" name="topicId" th:value="${blog.getBid()}">
|
||||
<input type="hidden" id="topicId" name="topicId" th:value="${blog.getBid()}">
|
||||
<div class="form-group">
|
||||
<textarea name="content" class="form-control" rows="3" required></textarea>
|
||||
</div>
|
||||
@@ -130,7 +142,24 @@
|
||||
<script th:src="@{/editormd/lib/flowchart.min.js}"></script>
|
||||
<script th:src="@{/editormd/lib/jquery.flowchart.min.js}"></script>
|
||||
<script th:src="@{/editormd/editormd.js}"></script>
|
||||
<script type="text/javascript">
|
||||
function starFun(btn){
|
||||
btn.disabled = true;
|
||||
var userId = $('#userId').val();
|
||||
var topicId = $('#topicId').val();
|
||||
$.ajax({
|
||||
url: "/blog/star",
|
||||
type: "post",
|
||||
async: false,
|
||||
data: {"userId": userId, "topicId": topicId},
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
$('#id_star_refresh').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var testEditor;
|
||||
$(function () {
|
||||
|
||||
@@ -37,6 +37,24 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!--如果未登录-->
|
||||
<div>
|
||||
<form th:action="@{/search}" method="post">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li>
|
||||
<input name="findWhat" type="text" placeholder="大佬想找什么呢?"/>
|
||||
</li>
|
||||
<li>
|
||||
<input type="submit" class="btn btn-sm btn-primary mr-2" value="全站搜索">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16">
|
||||
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/>
|
||||
</svg>
|
||||
</input>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!--如果未登录-->
|
||||
<div sec:authorize="!isAuthenticated()">
|
||||
<a class="btn btn-sm btn-primary" th:href="@{/toLogin}" role="button">
|
||||
|
||||
@@ -10,47 +10,84 @@
|
||||
|
||||
<div th:replace="~{common/header::header(activeUrl='index.html')}"></div>
|
||||
<main role="main">
|
||||
<div class="jumbotron" style="background-color: #ffffff;box-shadow: 0px -2px 10px #d0cccc inset;">
|
||||
<div class="container">
|
||||
<h1 class="display-3">资源分享 <small style="font-size: 18px;">仅社区用户资源分享</small></h1>
|
||||
<p style="margin-top: 2rem;">
|
||||
我们致力于提供免费资源,大家可以从该平台获取资源,大家可以一起整理汇总。
|
||||
</p>
|
||||
<p>
|
||||
<a target="_blank" href="https://space.bilibili.com/95256449/article" class="btn btn-primary btn-lg" role="button">了解更多 »</a>
|
||||
</p>
|
||||
<div class="container">
|
||||
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item mt-5 active">
|
||||
<img th:src="@{/images/menu/wechat.jpeg}" class="d-block w-100" alt="第一个">
|
||||
<!-- <div class="carousel-caption d-none d-md-block">-->
|
||||
<!-- <h5>First slide label</h5>-->
|
||||
<!-- <p>Some representative placeholder content for the first slide.</p>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="carousel-item mt-5">
|
||||
<img th:src="@{/images/menu/wechat.jpeg}" class="d-block w-100" alt="第三个">
|
||||
</div>
|
||||
<div class="carousel-item mt-5">
|
||||
<img th:src="@{/images/menu/wechat.jpeg}" class="d-block w-100" alt="大送的海鸥">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button class="carousel-control-prev" type="button" data-target="#carouselExampleCaptions" data-slide="prev">-->
|
||||
<!-- <span class="carousel-control-prev-icon" aria-hidden="true"></span>-->
|
||||
<!-- <span class="sr-only">Previous</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- <button class="carousel-control-next" type="button" data-target="#carouselExampleCaptions" data-slide="next">-->
|
||||
<!-- <span class="carousel-control-next-icon" aria-hidden="true"></span>-->
|
||||
<!-- <span class="sr-only">Next</span>-->
|
||||
<!-- </button>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="container mt-5">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img th:src="@{/images/menu/q.png}" alt="问答" width="320" height="200">
|
||||
<!-- <img th:src="@{/images/menu/3.png}" alt="一起去下载" width="320" height="200">-->
|
||||
<div class="caption">
|
||||
<h3>问答</h3>
|
||||
<a th:href="@{/blog}">
|
||||
<h3 class="btn btn-secondary">论坛
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-send-plus-fill" viewBox="0 0 16 16">
|
||||
<path d="M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 1.59 2.498C8 14 8 13 8 12.5a4.5 4.5 0 0 1 5.026-4.47L15.964.686Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"/>
|
||||
<path d="M16 12.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Zm-3.5-2a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1a.5.5 0 0 0-.5-.5Z"/>
|
||||
</svg>
|
||||
</h3>
|
||||
</a>
|
||||
<p>提供一些系统的建议,或者问题,或者建议!问有所答,您的答案是我们的前进的动力!</p>
|
||||
<p><a th:href="@{/question}" class="btn btn-secondary" role="button">前往 »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img th:src="@{/images/menu/2.png}" alt="讨论一下吧" width="320" height="200">
|
||||
<div class="caption">
|
||||
<h3>讨论</h3>
|
||||
<a th:href="@{/source}">
|
||||
<h3 class="btn btn-secondary">资源
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-postcard-fill" viewBox="0 0 16 16">
|
||||
<path d="M11 8h2V6h-2v2Z"/>
|
||||
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm8.5.5a.5.5 0 0 0-1 0v7a.5.5 0 0 0 1 0v-7ZM2 5.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5ZM2.5 7a.5.5 0 0 0 0 1H6a.5.5 0 0 0 0-1H2.5ZM2 9.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5Zm8-4v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z"/>
|
||||
</svg>
|
||||
</h3>
|
||||
</a>
|
||||
<p>提供玩家共享资源信息,打造整体更出色的游戏体验!</p>
|
||||
<p><a th:href="@{/blog}" class="btn btn-secondary" role="button">前往 »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img th:src="@{/images/menu/3.png}" alt="一起去下载" width="320" height="200">
|
||||
<div class="caption">
|
||||
<h3>资源</h3>
|
||||
<a th:href="@{/hotspot}">
|
||||
<h3 class="btn btn-secondary">热点
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-thermometer-high" viewBox="0 0 16 16">
|
||||
<path d="M9.5 12.5a1.5 1.5 0 1 1-2-1.415V2.5a.5.5 0 0 1 1 0v8.585a1.5 1.5 0 0 1 1 1.415z"/>
|
||||
<path d="M5.5 2.5a2.5 2.5 0 0 1 5 0v7.55a3.5 3.5 0 1 1-5 0V2.5zM8 1a1.5 1.5 0 0 0-1.5 1.5v7.987l-.167.15a2.5 2.5 0 1 0 3.333 0l-.166-.15V2.5A1.5 1.5 0 0 0 8 1z"/>
|
||||
</svg>
|
||||
</h3>
|
||||
</a>
|
||||
<p>提供用户免费游戏资源,请各位玩家免费获取!分享心得!</p>
|
||||
<p><a th:href="@{/download}" class="btn btn-secondary" role="button">前往 »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,43 +14,29 @@
|
||||
|
||||
<main role="main">
|
||||
<div class="container">
|
||||
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
<img th:src="@{/images/menu/t1.jpg}" class="d-block w-100" alt="...">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>First slide label</h5>
|
||||
<p>Some representative placeholder content for the first slide.</p>
|
||||
</div>
|
||||
<div class="jumbotron" style="background-color: #ffffff;">
|
||||
<div class="container">
|
||||
<h1 class="display-3">关于我们
|
||||
<span style="font-size: 18px;" class="badge badge-pill badge-primary">Quinn</span>
|
||||
</h1>
|
||||
<div class="alert alert-primary mt-3" role="alert">
|
||||
我们致力于提供免费资源,大家可以从该平台获取资源,大家可以一起整理汇总。
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img th:src="@{/images/menu/t2.jpg}" class="d-block w-100" alt="...">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Second slide label</h5>
|
||||
<p>Some representative placeholder content for the second slide.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img th:src="@{/images/menu/t3.jpg}" class="d-block w-100" alt="...">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Third slide label</h5>
|
||||
<p>Some representative placeholder content for the third slide.</p>
|
||||
</div>
|
||||
<div class="timeline-small-body">
|
||||
<ul>
|
||||
<li th:each="about:${aboutList}">
|
||||
<div class="bullet orange"></div>
|
||||
<div class="desc">
|
||||
<h3>
|
||||
[[${about.getTitle()}]]
|
||||
<small class="float-right" th:text="${#dates.format(about.getGmtCreate(),'yyyy-MM-dd')}"></small>
|
||||
</h3>
|
||||
<h4 th:utext="${about.getContent()}"></h4>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button class="carousel-control-prev" type="button" data-target="#carouselExampleCaptions" data-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-target="#carouselExampleCaptions" data-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
47
src/main/resources/templates/page/append.html
Normal file
47
src/main/resources/templates/page/append.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>关于我们-Quinn</title>
|
||||
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/timeline.css}">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div th:replace="~{common/header::header(activeUrl='about')}"></div>
|
||||
|
||||
<main role="main">
|
||||
<div class="container">
|
||||
<div class="col-md-12 blog-main" style="margin-top: 20px">
|
||||
<form th:action="@{'/about/'+${session.loginUser.getRoleId()}}" method="post">
|
||||
<div class="col-md-12 mb-3">
|
||||
<label>标题</label>
|
||||
<input type="text" name="title" class="form-control" value="" required>
|
||||
</div>
|
||||
<div class="col-md-12 mb-3">
|
||||
<label>内容</label>
|
||||
<div id="blog-content">
|
||||
<textarea required name="content" rows="3" class="form-control"> </textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mb-3">
|
||||
<button type="submit" class="btn btn-primary btn-sm btn-block">发布公告</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div th:replace="~{common/footer::footer}"></div>
|
||||
|
||||
<a class="to-top">返回顶部</a>
|
||||
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
|
||||
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
|
||||
<script th:src="@{/js/toTop.js}"></script>
|
||||
<script th:src="@{/js/jquery-ui.min.js}"></script>
|
||||
<script th:src="@{/live/js/addlive2d.js}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -15,14 +15,17 @@
|
||||
<main role="main" class="mt-3">
|
||||
<div class="container">
|
||||
<div class="alert alert-primary" role="alert">
|
||||
需要什么资料请提交论坛,或者关注公众号反馈!我们会及时更新!
|
||||
大佬需要什么资料请提交论坛或者关注公众号反馈。
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-3 text-center">
|
||||
<div class="col mb-4" th:each="source:${sourceList}">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="font-weight-normal" th:text="${source.getSourceName()}"></h4>
|
||||
<h4 class="font-weight-normal">
|
||||
[[${source.getSourceName()}]]
|
||||
<span style="font-size: 8px;" class="badge badge-pill badge-danger">Quinn</span>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p th:text="${source.getDetail()}"></p>
|
||||
|
||||
@@ -17,10 +17,8 @@
|
||||
<div th:replace="~{common/header::header(activeUrl='user')}"></div>
|
||||
|
||||
<main role="main" class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="row" >
|
||||
<aside class="col-md-3 blog-sidebar" th:fragment="userShowPanel">
|
||||
|
||||
<div class="p-4 my-3 bg-white rounded">
|
||||
<div class="mb-0">
|
||||
<p class="text-center">
|
||||
|
||||
Reference in New Issue
Block a user