Spring Boot制作个人博客-博客管理列表页
Posted qq_48838980
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spring Boot制作个人博客-博客管理列表页相关的知识,希望对你有一定的参考价值。
1、创建页面
- 后端页面新建包与前端页面区分
- 复制types.html改名为blogs.html并修改其代码
2、导航栏
<!--导航栏-->
<nav class="ui inverted attached segment m-padded-tb-mini m-shadow-small" ><!--inverted 反色 attached 圆角变直角-->
<!--设置log-->
<div class="ui container">
<div class="ui inverted secondary stackable menu"><!--stackable(可堆叠效果)会根据页面大小改变显示比例-->
<h2 class="ui teal header item">管理后台</h2>
<a href="#" class="m-item item m-mobile-hide"><i class="home icon"></i> 博客</a>
<a href="#" class="active m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
<a href="#" class="m-item item m-mobile-hide"><i class="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=1010">
Beauty
</div>
<!--下拉图标-->
<i class="dropdown icon"></i>
<div class="menu">
<a href="#" class="item">注销</a>
</div>
</div>
</div>
</div>
</div>
<!--移动端响应图标-->
<a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
<i class="sidebar icon"></i>
</a>
</div>
</nav>
- 设置移动端隐藏
3、设置中间内容
(1)设置输入框、下拉列表框、推荐选框、搜索按钮
<form action="#" method="post" class="ui segment form">
<div class="inline fields">
<!--输入框-->
<div class="field">
<input type="text" name="title" placeholder="标题">
</div>
<!--下拉列表框-->
<div class="field">
<div class="ui 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 class="field">
<div class="ui checkbox">
<input type="checkbox" id="recommend" name="recommend">
<label for="recommend">推荐</label>
</div>
</div>
<!--提交按钮-->
<div class="field">
<botton class="ui mini teal basic button"><i class="search icon"></i>搜索</botton>
</div>
</div>
</form>
(2)表格
<!--中间内容-->
<div class="m-container-small m-padded-tb-large">
<div class="ui m-container">
<form action="#" method="post" class="ui segment form">
<div class="inline fields">
<!--输入框-->
<div class="field">
<input type="text" name="title" placeholder="标题">
</div>
<!--下拉列表框-->
<div class="field">
<div class="ui 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 class="field">
<div class="ui checkbox">
<input type="checkbox" id="recommend" name="recommend">
<label for="recommend">推荐</label>
</div>
</div>
<!--提交按钮-->
<div class="field">
<botton class="ui mini teal basic button"><i class="search icon"></i>搜索</botton>
</div>
</div>
</form>
<table class="ui celled table"><!--celled添加网格-->
<thead>
<!--表头-->
<tr>
<th></th>
<th>标题</th>
<th>类型</th>
<th>推荐</th>
<th>更新事件</th>
<th>操作</th>
</tr>
</thead>
<!--内容-->
<tbody>
<tr>
<td>1</td>
<td>刻意练习清单</td>
<td>认知升级</td>
<td>是</td>
<td>2017-10-02 09:45</td>
<td>
<a href="#" class="ui mini teal basic button">编辑</a>
<a href="#" class="ui mini red basic button">删除</a>
</td>
</tr>
</tbody>
<!--底部-->
<tfoot>
<tr>
<th colspan="6">
<div class="ui mini floated pagination menu">
<a class="icon item">
<i class="left chevron icon"></i>
</a>
<a class="icon item">上一页</a>
<a class="icon item">下一页</a>
<a class="icon item">
<i class="right chevron icon"></i>
</a>
</div>
<a href="#" class="ui mini right floated teal basic button">新增</a>
</th>
</tr>
</tfoot>
</table>
</div>
</div>
(3)二级导航
<!--二级导航-->
<div class="ui attached pointing menu">
<div class="ui container">
<div class="right menu">
<a href="#" class="item">发布</a>
<a href="#" class="teal active item">列表</a>
</div>
</div>
</div>
4、最终效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=debice-width,initial-scale=1.0">
<title>博客管理</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
<link rel="stylesheet" href="../static/css/css.css">
</head>
<body>
<!--导航栏-->
<nav class="ui inverted attached segment m-padded-tb-mini m-shadow-small" ><!--inverted 反色 attached 圆角变直角-->
<!--设置log-->
<div class="ui container">
<div class="ui inverted secondary stackable menu"><!--stackable(可堆叠效果)会根据页面大小改变显示比例-->
<h2 class="ui teal header item">管理后台</h2>
<a href="#" class="m-item item m-mobile-hide"><i class="home icon"></i> 博客</a>
<a href="#" class="active m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
<a href="#" class="m-item item m-mobile-hide"><i class="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=1010">
Beauty
</div>
<!--下拉图标-->
<i class="dropdown icon"></i>
<div class="menu">
<a href="#" class="item">注销</a>
</div>
</div>
</div>
</div>
</div>
<!--移动端响应图标-->
<a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
<i class="sidebar icon"></i>
</a>
</div>
</nav>
<!--二级导航-->
<div class="ui attached pointing menu">
<div class="ui container">
<div class="right menu">
<a href="#" class="item">发布</a>
<a href="#" class="teal active item">列表</a>
</div>
</div>
</div>
<!--中间内容-->
<div class="m-container-small m-padded-tb-large">
<div class="ui m-container">
<form action="#" method="post" class="ui segment form">
<div class="inline fields">
<!--输入框-->
<div class="field">
<input type="text" name="title" placeholder="标题">
</div>
<!--下拉列表框-->
<div class="field">
<div class="ui 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 class="field">
<div class="ui checkbox">
<input type="checkbox" id="recommend" name="recommend">
<label for="recommend">推荐</label>
</div>
</div>
<!--提交按钮-->
<div class="field">
<botton class="ui mini teal basic button"><i class="sear以上是关于Spring Boot制作个人博客-博客管理列表页的主要内容,如果未能解决你的问题,请参考以下文章