Today, I took a small but meaningful step in my front-end development journey. I built a Twitter-style login page using only HTML and CSS, and then published the project to GitLab. In this blog post, Iβll walk you through the process β from building the UI to version controlling the code with Git.
π‘ Why I Chose This Project
Recreating popular UI designs is a great way to improve your front-end skills. I decided to build a Twitter login page because:
- It has a clean, modern look.
- It's a simple interface with real-world relevance.
- It helped me practice layout techniques, form design, and styling.
π οΈ Tools & Technologies Used
- HTML5
- CSS3
- Git for version control
- GitLab for repository hosting
π§± Step 1: Building the HTML Structure
I started by creating a basic HTML file with a login form. Here's a simplified version:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Twitter Login</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="login-container">
<h2>Log in to Twitter</h2>
<form>
<input type="text" placeholder="Phone, email, or username" required>
<input type="password" placeholder="Password" required>
<button type="submit">Log In</button>
</form>
<a href="#">Forgot password?</a>
</div>
</body>
</html>
π¨ Step 2: Styling with CSS
Next, I styled the form to look like Twitter's login page:
body {
font-family: Arial, sans-serif;
background-color: #e6ecf0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.login-container {
background: white;
padding: 30px;
border-radius: 10px;
width: 300px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
input, button {
width: 100%;
padding: 10px;
margin: 10px 0;
}
button {
background-color: #1da1f2;
color: white;
border: none;
cursor: pointer;
}
ποΈ Step 3: Pushing to GitLab
Once I was happy with the design, I pushed the code to GitLab:
git init
git remote add origin https://gitlab.com/your-username/twitter-login-page.git
git add .
git commit -m "Initial commit: Twitter login page with HTML & CSS"
git push -u origin master
β Tip: Make sure to create your repository on GitLab first!
β Final Output
The login page looks clean and is responsive enough for basic usage. Hereβs a quick snapshot of what I created (or include a screenshot or GitLab repo link if possible).
π GitLab Repository
You can check out the full code on my GitLab repository:
π GitLab - Twitter Login Page (replace with your actual link)
π What I Learned
- Writing clean HTML/CSS code
- Centering elements using Flexbox
- Creating responsive input forms
- Using Git and pushing to GitLab
Top comments (0)