docs: 2026-04-28作业

This commit is contained in:
2026-05-11 23:07:40 +08:00
parent dd21ddbaef
commit 6b51126213
7 changed files with 261 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>3</title>
</head>
<body>
<h2>主页</h2>
{% for message in get_flashed_messages(category_filter = ('info')) %}
<span>{{ message }}</span>
{% endfor %}
<p>欢迎用户:{{ username }}</p>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h2>用户登录</h2>
{% for message in get_flashed_messages(category_filter = ('error')) %}
<p class="error" style="color: red;">{{ message }}</p>
{% endfor %}
<form action="" method="post" class="form">
<span>用户名:</span><br>
<input type="text" name="username"><br>
<span>密码:</span><br>
<input type="password" name="password"><br>
<p><input type="submit" value="登录"></p>
</form>
</body>
</html>

View File

@@ -0,0 +1,180 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>hw</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(45deg, #0f0c29, #302b63, #24243e, #1c1c3c, #0f0c29);
background-size: 400% 400%;
animation: gradientBG 10s ease infinite;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
overflow: hidden;
position: relative;
}
@keyframes gradientBG {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
/* 浮动粒子 */
.particle {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
animation: floatUp linear infinite;
bottom: -10px;
}
@keyframes floatUp {
0% { transform: translateY(0) scale(1); opacity: 0; }
10% { opacity: 0.6; }
90% { opacity: 0.6; }
100% { transform: translateY(-110vh) scale(0.5); opacity: 0; }
}
.card {
position: relative;
z-index: 10;
text-align: center;
padding: 50px 60px;
background: rgba(255, 255, 255, 0.05);
border-radius: 24px;
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.15);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.3),
0 0 60px rgba(100, 200, 255, 0.1);
transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover {
transform: translateY(-10px) scale(1.02);
box-shadow:
0 20px 60px rgba(0, 0, 0, 0.4),
0 0 80px rgba(100, 200, 255, 0.25);
}
p {
font-size: 2.5rem;
font-weight: 900;
letter-spacing: 4px;
text-transform: uppercase;
color: #fff;
text-shadow:
0 0 10px rgba(0, 255, 255, 0.8),
0 0 20px rgba(0, 255, 255, 0.6),
0 0 40px rgba(0, 255, 255, 0.4),
0 0 80px rgba(0, 255, 255, 0.2);
animation: flicker 3s infinite alternate;
margin-bottom: 30px;
}
@keyframes flicker {
0%, 18%, 22%, 25%, 53%, 57%, 100% {
text-shadow:
0 0 10px rgba(0, 255, 255, 0.8),
0 0 20px rgba(0, 255, 255, 0.6),
0 0 40px rgba(0, 255, 255, 0.4),
0 0 80px rgba(0, 255, 255, 0.2);
}
20%, 24%, 55% {
text-shadow:
0 0 5px rgba(0, 255, 255, 0.5),
0 0 10px rgba(0, 255, 255, 0.3);
}
}
.img-wrapper {
position: relative;
display: inline-block;
border-radius: 20px;
padding: 6px;
background: linear-gradient(45deg, #00f260, #0575e6, #ff00cc, #333399);
background-size: 300% 300%;
animation: borderMove 4s linear infinite;
box-shadow: 0 0 30px rgba(0, 200, 255, 0.3);
}
@keyframes borderMove {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.img-wrapper img {
display: block;
max-width: 300px;
border-radius: 16px;
transition: transform 0.5s ease, filter 0.5s ease;
filter: brightness(1.1) contrast(1.1);
}
.img-wrapper:hover img {
transform: scale(1.08) rotate(2deg);
filter: brightness(1.2) contrast(1.2) saturate(1.3);
}
/* 扫描线效果 */
.scanline {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(
to bottom,
rgba(255,255,255,0),
rgba(255,255,255,0) 50%,
rgba(0,0,0,0.05) 50%,
rgba(0,0,0,0.05)
);
background-size: 100% 4px;
pointer-events: none;
z-index: 999;
opacity: 0.3;
}
</style>
</head>
<body>
<!-- 浮动粒子 -->
<script>
(function() {
for (let i = 0; i < 30; i++) {
const p = document.createElement('div');
p.className = 'particle';
const size = Math.random() * 6 + 2;
p.style.width = size + 'px';
p.style.height = size + 'px';
p.style.left = Math.random() * 100 + 'vw';
p.style.animationDuration = (Math.random() * 8 + 4) + 's';
p.style.animationDelay = (Math.random() * 5) + 's';
document.body.appendChild(p);
}
})();
</script>
<div class="scanline"></div>
<div class="card">
<p>Flask-Logo图片</p>
<div class="img-wrapper">
<img src="{{ url_for('static',filename='flask.png') }}" alt="Flask Logo">
</div>
</div>
</body>
</html>