大作业-修改了主页

This commit is contained in:
2024-06-12 00:02:55 +08:00
parent b59880f301
commit e48e752b91
20 changed files with 415 additions and 190 deletions

View File

@@ -0,0 +1,95 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #ffffff;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
}
header {
background-color: rgba(28, 108, 178, 0.9);
color: white;
padding: 20px 0;
text-align: center;
width: 100%;
}
nav ul {
list-style: none;
padding: 0;
margin: 0;
}
nav ul li {
display: inline;
margin: 0 10px;
}
nav ul li a {
color: white;
text-decoration: none;
font-weight: bold;
}
main {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.background-container {
width: 100%;
max-width: 1500px;
height: 600px; /* Adjust according to the desired size */
background-image: url('/static/images/banner-login-20200629.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.content {
background-color: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 10px;
text-align: center;
position: absolute;
}
h2 {
color: #1c6cb2;
}
.links {
margin-top: 20px;
}
.links .btn {
background-color: #1c6cb2;
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
margin: 10px;
display: inline-block;
}
.links .btn:hover {
background-color: #155a8c;
}
footer {
background-color: rgba(28, 108, 178, 0.9);
color: white;
text-align: center;
padding: 10px 0;
width: 100%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -0,0 +1,8 @@
window.onload = function() {
// Display flashed messages, if any
const messages = [];
// Assuming messages are added via server-side templating
if (messages.length > 0) {
alert(messages.join("\n"));
}
};