Files
udf/udf-api/udf-api-server/src/main/resources/templates/common.html
T
2020-05-03 00:13:28 +08:00

541 lines
18 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html>
<head th:fragment="head(title)">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"
integrity="sha256-L/W5Wfqfa0sdBNIKN9cG6QA5F2qx4qICmU2VgLruv9Y=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css"
integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<style lang="css">
body, html {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
font-family: 'Microsoft yahei';
font-size: 13px;
font-weight: 400;
background-color: #FAFAFA;
}
a, a:hover, a:active, a:focus {
text-decoration: none;
-webkit-user-drag: none;
outline: none;
color: #000;
}
.main {
max-width: 1200px;
margin: auto !important;
padding: 60px 10px 10px 10px;
}
.bottom {
box-shadow: rgba(0, 0, 0, 0.08) 1px 0px 4px 0px;
min-height: 50px;
margin: 0px;
padding: 0px;
position: relative;
}
.bottom .copyRight {
padding-top: 10px;
}
.top {
box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 4px 0px;
height: 50px;
margin: 0px;
padding: 0px;
background-color: #FFFFFF;
position: relative;
}
.top-fixed {
position: fixed;
top: 0px;
left: 0px;
bottom: 0px;
width: 100%;
height: 50px;
}
.top .navbar {
max-width: 1200px;
padding: 0;
margin: 0;
margin: auto !important;
height: 50px;
background-color: #FFFFFF;
}
.top .navbar .leftbar {
height: 50px;
}
.top .navbar a {
font-size: 30px;
font-weight: bold;
margin-left: 10px;
color: #FF6A00;
}
.top .navbar .rightbar {
height: 50px;
}
.top .navbar .rightbar .item {
height: 50px;
padding-right: 10px;
display: table-cell;
vertical-align: middle;
text-align: center;
cursor: pointer;
}
.top .navbar .rightbar .item .btn-custom {
font-size: 12px;
color: #FFFFFF;
background-color: #FF6A00;
}
.top .navbar .rightbar .item .btn-custom2 {
font-size: 12px;
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #FFF;
border: 1px solid #DCDFE6;
color: #606266;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
padding: 12px 20px;
font-size: 14px;
border-radius: 4px;
border-radius: 50%;
padding: 9px;
}
.top .navbar .rightbar .item .btn-custom2 .fa {
speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: baseline;
display: inline-block;
}
.top .navbar .rightbar .item .btn-custom3 {
width: 40px;
height: 40px;
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #C0C4CC;
border: 0px;
color: #fff;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
padding: 12px 20px;
font-size: 18px;
/*border-radius: 4px;*/
/*border-radius: 50%;*/
padding: 9px;
}
.top .navbar .rightbar .item .btn-custom3 .fa {
speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: baseline;
display: inline-block;
}
.el-badge {
position: relative;
vertical-align: middle;
display: inline-block;
}
.el-badge__content.is-fixed.is-dot {
right: 5px;
}
.el-badge__content.is-dot {
height: 8px;
width: 8px;
padding: 0;
right: 0;
border-radius: 50%;
}
.el-badge__content.is-fixed {
position: absolute;
top: 0;
right: 10px;
-webkit-transform: translateY(-50%) translateX(100%);
transform: translateY(-50%) translateX(100%);
}
.el-badge__content {
background-color: #F56C6C;
border-radius: 10px;
color: #FFF;
display: inline-block;
font-size: 12px;
height: 18px;
line-height: 18px;
padding: 0 6px;
text-align: center;
white-space: nowrap;
border: 1px solid #FFF;
}
.btnTop {
display: none;
position: fixed;
bottom: 60px;
right: 10px;
z-index: 99;
}
.btnTop-custom {
background: rgb(255, 106, 0);
color: rgb(255, 255, 255);
position: fixed;
width: 40px;
height: 40px;
border-radius: 50%;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
font-size: 20px;
-webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .12);
box-shadow: 0 0 6px rgba(0, 0, 0, .12);
cursor: pointer;
z-index: 5;
font-size: 12px;
line-height: 1;
white-space: nowrap;
cursor: pointer;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
padding: 12px 20px;
font-size: 14px;
border-radius: 4px;
border-radius: 50%;
padding: 9px;
}
.btnTop-custom-fa {
speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: baseline;
}
.custom-loadding .mask {
position: absolute;
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.4);
width: 100%;
height: 100%;
filter: alpha(opacity=60);
opacity: 0.6;
z-Index: 999;
}
.custom-loadding .content {
position: absolute;
width: 100%;
height: 100%;
top: 60px;
z-Index: 9999;
}
.toastBox {
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
z-index: 999999;
padding-top: 5px;
}
.card {
position: inherit;
}
.pre-scrollable {
overflow-y: auto;
}
</style>
<title>[(${title})]</title>
</head>
<body>
<div th:fragment="top">
<div class="toastBox d-flex justify-content-center"></div>
<div class="top top-fixed">
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand-custm align-middle" href="/">ITKK</a>
<div class="collapse navbar-collapse"></div>
<div class="rightbar">
<div class="item header-right-bar-search-div">
<button type="button" class="btn btn-custom2">
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
<div class="item header-right-bar-search-input-div" style="display:none;">
<input type="text" class="form-control form-control-lg" placeholder="请输入要搜索的内容">
</div>
<div th:if="${userDto!=null}" class="item header-right-bar-bell-div">
<div class="el-badge">
<button type="button" class="btn btn-custom2">
<i class="fa fa-bell-o" aria-hidden="true"></i>
</button>
<sup class="el-badge__content el-badge__content--undefined is-fixed is-dot"></sup>
</div>
</div>
<div th:if="${userDto!=null}" class="item header-right-bar-user-div">
<button th:if="${userDto.avatarFilePath==null}" type="button"
class="btn btn-info btn-custom3 user-head-img-def">
<i class="fa fa-user" aria-hidden="true"></i>
</button>
<img th:if="${userDto.avatarFilePath!=null}" width="40px" height="40px"
th:src="${userDto.avatarFilePath}" class="img-rounded user-head-img" alt="头像">
</div>
<div th:if="${userDto==null}" class="item header-right-bar-login-div">
<button type="button" class="btn btn-custom rounded-pill">登陆</button>
</div>
<div th:if="${userDto==null}" class="item header-right-bar-registered-div">
<button type="button" class="btn btn-custom rounded-pill">注册</button>
</div>
</div>
</nav>
</div>
</div>
<div class="bottom" th:fragment="bottom">
<div class="bottom">
<div class="copyRight text-center">
<span>© 2019-2020 itkk.org</span>
</div>
<div>
<button class="btn btnTop btnTop-custom">
<i class="fa fa-arrow-up btnTop-custom-fa" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
<div th:fragment="footer">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.min.js"
integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"
integrity="sha256-WqU1JavFxSAMcLP2WIOI+GB2zWmShMI82mTpLDcqFUg=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap-toasts-js@1.1.4/dist/js/bootstrap-toasts-js.min.js"
integrity="sha256-8eA/hiFNtfHeSl0SbSynWCaqa6DeEzsLD1lxsS8JnzM=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/pulltorefreshjs@0.1.20/dist/index.umd.min.js"
integrity="sha256-plfyATLvpJutooJZODIP/uMaXvn8TK229Xa2FVMP/Ks=" crossorigin="anonymous"></script>
<script type="text/javascript">
//页面加载完成
$(document).ready(function () {
//设置main的高度
$(function () {
$('.main').css('max-height', window.innerHeight - 50);
$('.main').css('height', window.innerHeight - 50);
$(window).on('resize', function () {
$('.main').css('max-height', window.innerHeight - 50);
$('.main').css('height', window.innerHeight - 50);
});
});
//搜索效果
$('.header-right-bar-search-div button').on('click', function () {
var v1;
var v2;
if ($('.header-right-bar-search-input-div').css('display')) {
if ($('.header-right-bar-search-input-div').css('display') === 'none') {
v1 = 'table-cell';
v2 = 'none';
} else {
v1 = 'none';
v2 = 'table-cell';
}
} else {
v1 = 'none';
v2 = 'table-cell';
}
$('.header-right-bar-search-input-div').css('display', v1);
$('.header-right-bar-search-input-div').css('width', window.innerWidth - 200 - 10 + 'px');
$('.header-right-bar-search-input-div').css('max-width', '400px');
$('.header-right-bar-bell-div').css('display', v2);
$('.header-right-bar-user-div').css('display', v2);
$('.header-right-bar-login-div').css('display', v2);
$('.header-right-bar-registered-div').css('display', v2);
});
// 返回顶部处理
$(function () {
$('.main').on('scroll', function () {
if ($(this).scrollTop() > 20) {
$('.btnTop').css('display', 'block');
} else {
$('.btnTop').css('display', 'none');
}
});
$('.btnTop').on('click', function () {
$('.main').scrollTop(0);
});
});
//下拉刷新
$(function () {
PullToRefresh.init({
mainElement: 'body',
instructionsReleaseToRefresh: '<i class="fa fa-arrow-up btnTop-custom-fa" aria-hidden="true">',
instructionsRefreshing: '刷新中',
onRefresh: function () {
openLoading();
window.location.reload();
}
});
});
//注册按钮点击事件
$('.header-right-bar-registered-div button').on('click', function () {
//跳转注册界面
window.location.href = '/registered.html';
});
//登陆按钮点击事件
$('.header-right-bar-login-div button').on('click', function () {
//跳转登陆界面
window.location.href = '/login.html';
});
//头像按钮点击事件
$('.header-right-bar-user-div').on('click', function () {
//跳转控制台
window.location.href = '/admin';
});
});
//设置(全局)的AJAX请求默认选项
$(function () {
$.ajaxSetup({
cache: false,
beforeSend: function () {
//显示Loading
openLoading();
},
complete: function () {
//隐藏Loading
closeLoading();
},
error: function (xhr) {
var content = '服务器开小差了 , 请稍后再试';
try {
var errorResult = xhr.responseJSON;
if (errorResult) {
if ('org.springframework.web.bind.MethodArgumentNotValidException' === errorResult.errorDetail.type) {
var message = JSON.parse(errorResult.errorDetail.message.replace(/"/g, '"'));
var msgBody = '';
$.each(message, function (i, item) {
msgBody += (i + 1) + ' . ' + item.defaultMessage + '<br />';
});
content = msgBody;
} else {
content = errorResult.errorDetail.message;
}
}
} catch (e) {
console.log(e);
}
$('.toastBox').addToast({
showTimeLabel: false,
title: '消息',
content: content,
autoHide: true,
type: 'info',
progress: {show: false},
displayTime: 3000
});
}
});
});
/**
* 打开Loading (最好和关闭成对出现)
*/
function openLoading() {
$('body').append(openLoadingHtml);
}
/**
* 返回loading的html
*/
function openLoadingHtml() {
//构造组件
var html = '';
html += '<div class="custom-loadding">';
html += ' <div class="mask">';
html += ' </div>';
html += ' <div class="content">';
html += ' <div class="d-flex justify-content-center">';
html += ' <div class="spinner-border text-success" role="status">';
html += ' <span class="sr-only">Loading...</span>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += '</div>';
//返回
return html;
}
/**
* 关闭loading (最好和打开关闭成对出现)
*/
function closeLoading() {
if ($('.custom-loadding')) {
$('.custom-loadding')[0].remove();
}
}
</script>
</div>
</body>
</html>