mirror of
https://github.com/skyle1995/NetworkAuth.git
synced 2026-05-25 02:24:05 +08:00
374 lines
11 KiB
HTML
374 lines
11 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-cn">
|
||
<head>
|
||
<title>{{ .Title }}</title>
|
||
<!-- 站 点 协 议 -->
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
<meta http-equiv="content-language" content="zh-cn">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||
<meta name="mobile-web-app-capable" content="yes">
|
||
<meta name="format-detection" content="telephone=no">
|
||
{{ if .Description }}<meta name="description" content="{{ .Description }}">{{ end }}
|
||
{{ if .Keywords }}<meta name="keywords" content="{{ .Keywords }}">{{ end }}
|
||
|
||
<!-- 站 点 图 标 -->
|
||
<link href='/favicon.ico' rel='icon' type='image/x-icon'>
|
||
<link href="/favicon.ico" rel="shortcut icon">
|
||
<link href="/favicon.ico" rel="bookmark">
|
||
<!-- 样 式 文 件 -->
|
||
<link rel="stylesheet" href="/static/lib/layui/css/layui.css"/>
|
||
<style>
|
||
html, body {
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
margin: 0;
|
||
padding: 0;
|
||
font-family: 'Microsoft YaHei', Arial, sans-serif;
|
||
}
|
||
|
||
body {
|
||
background-color: #000000 !important;
|
||
}
|
||
|
||
.layui-container {
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
|
||
.body-background {
|
||
width: 420px;
|
||
min-height: 350px;
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translate(-50%, -50%);
|
||
z-index: 10;
|
||
}
|
||
|
||
.logo-title {
|
||
text-align: center;
|
||
letter-spacing: 3px;
|
||
padding: 0 0 0 0;
|
||
margin-bottom: 5px;
|
||
}
|
||
|
||
.logo-title h1 {
|
||
color: #2550dd;
|
||
font-size: 28px;
|
||
font-weight: 600;
|
||
margin: 0;
|
||
text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
|
||
animation: glow 2s ease-in-out infinite alternate;
|
||
}
|
||
|
||
@keyframes glow {
|
||
from {
|
||
text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
|
||
}
|
||
to {
|
||
text-shadow: 0 0 30px rgba(0, 212, 255, 0.8), 0 0 40px rgba(0, 212, 255, 0.6);
|
||
}
|
||
}
|
||
|
||
.box-form {
|
||
background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.9));
|
||
border: 2px solid rgba(0, 212, 255, 0.3);
|
||
border-radius: 15px;
|
||
padding: 30px 25px;
|
||
box-shadow:
|
||
0 8px 32px rgba(0, 0, 0, 0.3),
|
||
0 0 0 1px rgba(255, 255, 255, 0.1),
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.2);
|
||
backdrop-filter: blur(10px);
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.box-form::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
left: -100%;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
|
||
animation: shimmer 3s infinite;
|
||
}
|
||
|
||
@keyframes shimmer {
|
||
0% { left: -100%; }
|
||
100% { left: 100%; }
|
||
}
|
||
|
||
.box-form .layui-form-item {
|
||
margin-bottom: 20px;
|
||
position: relative;
|
||
}
|
||
|
||
.warning-text {
|
||
font-size: 24px;
|
||
color: #ff4757;
|
||
font-weight: 600;
|
||
text-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
|
||
margin: 15px 0;
|
||
animation: pulse 2s infinite;
|
||
}
|
||
|
||
@keyframes pulse {
|
||
0%, 100% { opacity: 1; }
|
||
50% { opacity: 0.7; }
|
||
}
|
||
|
||
.info-text {
|
||
color: #3742fa;
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
margin: 15px 0;
|
||
text-shadow: 0 1px 2px rgba(55, 66, 250, 0.2);
|
||
}
|
||
|
||
.body_box {
|
||
text-align: center;
|
||
}
|
||
|
||
.body_footer {
|
||
padding-top: 15px;
|
||
color: rgba(255, 255, 255, 0.8);
|
||
font-size: 14px;
|
||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
||
}
|
||
|
||
.body_beian {
|
||
padding-top: 8px;
|
||
}
|
||
|
||
.body_beian a {
|
||
color: rgba(0, 212, 255, 0.8);
|
||
text-decoration: none;
|
||
font-size: 13px;
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
.body_beian a:hover {
|
||
color: #00d4ff;
|
||
text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
|
||
}
|
||
|
||
#canvas {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
z-index: 1;
|
||
}
|
||
|
||
hr {
|
||
border: none;
|
||
height: 2px;
|
||
background: linear-gradient(90deg, transparent, #00d4ff, transparent);
|
||
margin: 20px 0;
|
||
border-radius: 1px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<!-- 代 码 结 构 -->
|
||
<div class="layui-container">
|
||
<canvas id="canvas"></canvas>
|
||
<div class="body-background body_box">
|
||
<div class="layui-form box-form body_box">
|
||
<div class="layui-form-item logo-title">
|
||
<h1><strong>{{ .SystemName }}</strong></h1>
|
||
</div>
|
||
<hr>
|
||
<div class="layui-form-item">
|
||
<div class="warning-text">{{ .WarningText }}</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<div class="info-text">{{ .InfoText }}</div>
|
||
</div>
|
||
</div>
|
||
<div class="body_footer">{{ .FooterText }}</div>
|
||
{{ if .ICPRecord }}
|
||
<div class="body_beian"><a href="{{ .ICPRecordLink }}" target="_blank">{{ .ICPRecord }}</a></div>
|
||
{{ end }}
|
||
</div>
|
||
</div>
|
||
<!-- 资 源 引 入 -->
|
||
<script src="/static/lib/jquery/jquery.min.js" type="text/javascript"></script>
|
||
<script>
|
||
// 设置版权年份 (保留此逻辑以防 FooterText 中使用了 id="currentYear")
|
||
if(document.getElementById('currentYear')) {
|
||
document.getElementById('currentYear').textContent = new Date().getFullYear();
|
||
}
|
||
|
||
// 获取canvas元素和绘图上下文
|
||
const canvas = document.getElementById('canvas');
|
||
const ctx = canvas.getContext('2d');
|
||
|
||
// 设置canvas尺寸为全屏
|
||
const resizeCanvas = () => {
|
||
canvas.width = window.innerWidth;
|
||
canvas.height = window.innerHeight;
|
||
};
|
||
|
||
resizeCanvas();
|
||
window.addEventListener('resize', resizeCanvas);
|
||
|
||
// 粒子类
|
||
class Particle {
|
||
constructor() {
|
||
this.reset();
|
||
}
|
||
|
||
// 重置粒子位置和属性
|
||
reset() {
|
||
this.x = Math.random() * canvas.width;
|
||
this.y = Math.random() * canvas.height;
|
||
this.vx = (Math.random() - 0.5) * 2;
|
||
this.vy = (Math.random() - 0.5) * 2;
|
||
this.size = Math.random() * 3 + 1;
|
||
this.opacity = Math.random() * 0.8 + 0.2;
|
||
this.color = this.getRandomColor();
|
||
}
|
||
|
||
// 获取随机颜色
|
||
getRandomColor() {
|
||
const colors = [
|
||
'#00FF00', '#0080FF', '#FF0080', '#FFFF00',
|
||
'#FF8000', '#8000FF', '#00FFFF', '#FF4000'
|
||
];
|
||
return colors[Math.floor(Math.random() * colors.length)];
|
||
}
|
||
|
||
// 更新粒子位置
|
||
update() {
|
||
this.x += this.vx;
|
||
this.y += this.vy;
|
||
|
||
// 边界检测,粒子超出边界时重置
|
||
if (this.x < 0 || this.x > canvas.width ||
|
||
this.y < 0 || this.y > canvas.height) {
|
||
this.reset();
|
||
}
|
||
|
||
// 随机改变透明度
|
||
this.opacity += (Math.random() - 0.5) * 0.02;
|
||
this.opacity = Math.max(0.1, Math.min(1, this.opacity));
|
||
}
|
||
|
||
// 绘制粒子
|
||
draw() {
|
||
ctx.save();
|
||
ctx.globalAlpha = this.opacity;
|
||
ctx.fillStyle = this.color;
|
||
ctx.beginPath();
|
||
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
|
||
ctx.fill();
|
||
ctx.restore();
|
||
}
|
||
}
|
||
|
||
// 创建粒子数组
|
||
const particles = [];
|
||
const particleCount = 150;
|
||
|
||
// 初始化粒子
|
||
const initParticles = () => {
|
||
for (let i = 0; i < particleCount; i++) {
|
||
particles.push(new Particle());
|
||
}
|
||
};
|
||
|
||
// 绘制连线
|
||
const drawConnections = () => {
|
||
for (let i = 0; i < particles.length; i++) {
|
||
for (let j = i + 1; j < particles.length; j++) {
|
||
const dx = particles[i].x - particles[j].x;
|
||
const dy = particles[i].y - particles[j].y;
|
||
const distance = Math.sqrt(dx * dx + dy * dy);
|
||
|
||
// 如果距离小于100像素,绘制连线
|
||
if (distance < 100) {
|
||
ctx.save();
|
||
ctx.globalAlpha = (100 - distance) / 100 * 0.3;
|
||
ctx.strokeStyle = '#00FF00';
|
||
ctx.lineWidth = 1;
|
||
ctx.beginPath();
|
||
ctx.moveTo(particles[i].x, particles[i].y);
|
||
ctx.lineTo(particles[j].x, particles[j].y);
|
||
ctx.stroke();
|
||
ctx.restore();
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
// 动画循环
|
||
const animate = () => {
|
||
// 清除画布,使用半透明黑色创建拖尾效果
|
||
ctx.fillStyle = 'rgba(0, 0, 0, 0.1)';
|
||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||
|
||
// 更新和绘制所有粒子
|
||
particles.forEach(particle => {
|
||
particle.update();
|
||
particle.draw();
|
||
});
|
||
|
||
// 绘制粒子间的连线
|
||
drawConnections();
|
||
|
||
requestAnimationFrame(animate);
|
||
};
|
||
|
||
// 鼠标交互效果
|
||
const addMouseInteraction = () => {
|
||
let mouseX = 0;
|
||
let mouseY = 0;
|
||
|
||
canvas.addEventListener('mousemove', (e) => {
|
||
mouseX = e.clientX;
|
||
mouseY = e.clientY;
|
||
|
||
// 鼠标附近的粒子会被吸引
|
||
particles.forEach(particle => {
|
||
const dx = mouseX - particle.x;
|
||
const dy = mouseY - particle.y;
|
||
const distance = Math.sqrt(dx * dx + dy * dy);
|
||
|
||
if (distance < 150) {
|
||
particle.vx += dx * 0.0001;
|
||
particle.vy += dy * 0.0001;
|
||
}
|
||
});
|
||
});
|
||
|
||
// 点击时添加新粒子
|
||
canvas.addEventListener('click', (e) => {
|
||
for (let i = 0; i < 5; i++) {
|
||
const newParticle = new Particle();
|
||
newParticle.x = e.clientX + (Math.random() - 0.5) * 20;
|
||
newParticle.y = e.clientY + (Math.random() - 0.5) * 20;
|
||
particles.push(newParticle);
|
||
}
|
||
|
||
// 限制粒子数量
|
||
if (particles.length > particleCount + 50) {
|
||
particles.splice(0, 5);
|
||
}
|
||
});
|
||
};
|
||
|
||
// 启动粒子系统
|
||
initParticles();
|
||
addMouseInteraction();
|
||
animate();
|
||
</script>
|
||
</body>
|
||
</html> |