Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign In</title>
<link rel="stylesheet" href="style.css">
<script src="https://kit.fontawesome.com/e021f3f87f.js" crossorigin="anonymous"></script>
</head>

<body>
<div class="big-container">
<div class="welcome-container">
<h1>Welcome to Paint Quoto System</h1>
<div class="line"></div>
<p class="text-under-line">Enjoy the system!</p>

</div>
<form class="signInContainer">
<div class="signInContainer-part1">
<h2>Sign In</h2>
<p class="text-under-signIn">Enter details to sign in your account</p>
</div>
<div class="signInContainer-part2">
<div class="input-container">
<label for="phoneNumber">Phone number</label>
<input type="text" name="phoneNumber" id="phoneNumber" placeholder="Enter your phone number" />
</div>
<div class="input-container">
<div class="password-above-text-div">
<label for="password">Password</label>
<a href="">Forgot?</a>
</div>
<div class="password-div">
<input type="text" name="password" id="password" placeholder="Enter your password" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

密码字段用 type="password"

<i class="fa-solid fa-eye"></i>
</div>
</div>
<div class="checkbox-container">
<input type="checkbox" name="login-checkBox" id="login-checkBox">
<label for="login-checkBox">Remember Login</label>
</div>
<button class="sign-in-btn">Sign In</button>
</div>
<div class="signInContainer-part3">
<p>Don't have an account?<a class="sign-up-link" href="">Sign up</a></p>
</div>
</form>
<button class="dark-mode-toggle-btn" onclick="toggle()">Dark Mode</button>
</div>
<script>
function toggle() {
document.body.classList.toggle("dark")
}
</script>
</body>

</html>
233 changes: 233 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
* {
box-sizing: border-box;
}

:root {
--primary:hsla(160, 52%, 39%, 0.269);
--secondary:black;
}

body {
background-color: var(--primary);
margin: 0;
display: flex;
justify-content: center;
width: 100vw;
height: 100vh;
}

.big-container {
display: flex;
width: 80%;
height: auto;
align-items: center;

}

.dark {
--primary:black;
--secondary:hsla(184, 29%, 79%, 0.952);
}
Comment on lines +27 to +30

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good


.dark-mode-toggle-btn {
position: absolute;
bottom: 40px;
right: 40px;
height: 30px;
background-color: hsla(197, 70%, 13%, 0.879);
color: aliceblue;
border-radius: 5px;
border: none;
cursor: pointer;
}

.welcome-container {
color:var(--secondary);
flex: 1;
display: flex;
flex-direction: column;
text-align: center;
max-width: 700px;
padding: 20px;
position: relative;
}

.signInContainer {
flex: 1;
display: flex;
flex-direction: column;
max-width: 400px;
margin: 0 auto;
border: 1px solid hsla(0, 1%, 83%, 0.683);
border-radius: 5px;
background-color: hsla(180, 60%, 99%, 0.829);
box-shadow: 3px 3px 9px;
padding-right: 18px;
padding-left: 18px;
margin-top: 10px;
}

.line {
width: 100%;
height: 2px;
background-color: var(--secondary);
margin-top: 10px;
}

.text-under-line {
margin-top: 20px;
}

.signInContainer-part1 {
margin-top: 20px;
text-align: center;
}

.text-under-signIn {
margin-top: 10px;
margin-bottom: 20px;
}

.signInContainer-part3 {
margin-top: 20px;
margin-bottom: 50px;
text-align: center;
}

.signInContainer-part3 a {
margin-left: 5px;
}

.signInContainer-part2 {
margin-top: 30px;
display: flex;
flex-direction: column;
}

.input-container {
display: flex;
flex-direction: column;
margin-bottom: 20px;
}

label {
margin-bottom: 10px;
}

.password-div {
position: relative;
}

.password-div i {
position: absolute;
top: 10px;
right: 5px;
cursor: pointer;
}

.sign-in-btn {
margin-top: 20px;
height: 40px;
background-color: hsla(196, 96%, 28%, 0.879);
color: aliceblue;
border-radius: 5px;
border: none;
cursor: pointer;
}

.sign-in-btn:hover {
background-color: hsla(196, 82%, 38%, 0.879);

}

.sign-in-btn:active {
background: linear-gradient(to right, hsla(196, 96%, 28%, 0.879), hsla(125, 69%, 19%, 0.879));
}

#phoneNumber,
#password {
height: 40px;
width: 100%;
padding: 10px;

}

#phoneNumber:focus-visible {
outline: 3px solid hsla(196, 96%, 28%, 0.879);
}

#password:focus-visible {
outline: 3px solid hsla(196, 96%, 28%, 0.879);
}

a {
text-decoration: none;
}


.password-above-text-div {
display: flex;
justify-content: space-between;
}

@media only screen and (max-width: 768px) {
.big-container {
flex-direction: column;
width: 100%;
align-items: center;
}

.welcome-container {
flex: 0;
margin: 0 auto;
width:100%;

}

.signInContainer {
flex: 0;
flex-wrap: wrap;
max-width: 400px;
}

.dark-mode-toggle-btn {
position: absolute;
bottom: 5px;
right: 5px;
}
}

@media only screen and (max-height: 740px) {
h1 {
font-size: 1.5rem;
}

h2 {
font-size: 1rem;
}

.signInContainer-part1 {
margin-top: 10px;
}

.signInContainer-part2 {
margin-top: 10px;
}

#phoneNumber,
#password {
height: 30px;
width: 100%;
padding: 5px;
}

.sign-in-btn {
height: 30px;
}

.signInContainer-part3 {
margin-top: 10px;
margin-bottom: 30px;
text-align: center;
}
}