Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week 3: Project Business Site #383

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Business Site

Replace this readme with your own information about your project.

Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
This project involved creating a responsive and visually appealing sign-up page for the one-page "Balanced Body" website. The goal was to design a user-friendly interface that captures user information and preferences, particularly focusing on forms - aligning radio buttons and checkboxes with their respective labels and also to include a header featuring a responsive image or video.

## The problem

Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
The primary challenge was ensuring that form elements, such as radio buttons and checkboxes, were perfectly aligned with their associated labels, both vertically and horizontally. To tackle this problem, I employed a combination of HTML and CSS. I started by mapping out the layout, ensuring that each element was placed logically and aesthetically on the page. The goal was to create a clean, minimalist design that would work well on both desktop and mobile devices. Technologies used:


HTML5: Structured the content of the sign-up page, ensuring semantic accuracy.


CSS3: Applied styling to ensure the page was visually appealing and that elements such as radio buttons and checkboxes were correctly aligned. Flexbox was used extensively to handle layout tasks, and specific adjustments were made using properties like align-items, justify-content, and transform for fine-tuning.

## View it live
Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.

https://balancedbodies.netlify.app

Copy link

Choose a reason for hiding this comment

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

Well done! You included a hero image and a form to your website and your website is responsive. I think you structured the website well!
Looking at your files, I think it could be good to have extra folder for the images in future especially if you have more images.

Binary file added code/Screenshot 2024-08-27 at 21.49.14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added code/balanced-body-high-resolution-logo-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 72 additions & 12 deletions code/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,77 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Business Site</title>
<!-- dont forget to add a css file and link it here! -->
</head>
<body>
<h1>Business name 🌻</h1>
<html lang="en">
Copy link

Choose a reason for hiding this comment

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

HTML: The code is well structured and clearly classes clearly labeled. For me as a reader not familiar with your code is it easier to have comments showing me where the different code sections start/end.
Was there a reason why you did not include the hero image into your header section?

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign up to start painting</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Prata&display=swap" rel="stylesheet">
</head>
<body>
<header class="site-header">
<div class="logo-container">
<img src="balanced-body-high-resolution-logo-white.png" alt="Balanced Body Logo" class="logo-image">
</div>
</header>

<!-- video or image as a header is cool :) -->
<section class="hero-section">
<img src="Screenshot 2024-08-27 at 21.49.14.png" alt="Hero Image" class="hero-image">
<div class="hero-overlay">
<h1>
<span class="white-text">Balance</span> <span class="yellow-text">Your Body</span>
</h1>
<p>Introducing the new workout collection, a line of productive exercises designed specifically for busy professionals.</p>
</div>
</section>

<main>
<div class="main-content">
<div class="signup-container">
<h2>Sign up to start transforming into a new era with Balanced Body</h2>
<form action="https://httpbin.org/anything" method="post">
<label for="name">Name</label>
<input type="text" id="name" name="name" placeholder="Your name" required>

<!-- Signup form -->
<label for="email">Email address</label>
<input type="email" id="email" name="email" placeholder="[email protected]" required>

<label for="phone">Phone number</label>
<input type="tel" id="phone" name="phone" placeholder="Your phone number" required>

</body>
<div class="radio-group">
<p>Please select your preferred time for receiving notifications:</p>
<div class="radio-options">
<label for="morning">
<input type="radio" id="morning" name="time" value="morning"> Morning
</label>
<label for="afternoon">
<input type="radio" id="afternoon" name="time" value="afternoon"> Afternoon
</label>
<label for="evening">
<input type="radio" id="evening" name="time" value="evening"> Evening
</label>
</div>
</div>

<div class="checkbox-group">
<label for="terms">I agree to the Terms & Conditions</label>
<input type="checkbox" id="terms" name="terms" required>
</div>

<button type="submit" class="submit-button">Next</button>
</form>
<div class="divider">or</div>
<div class="social-signup">
<button class="social-button google">Sign up with Google</button>
<button class="social-button facebook">Sign up with Facebook</button>
<button class="social-button apple">Sign up with Apple</button>
</div>
<p class="login-link">Already have an account? <a href="#">Log in here</a>.</p>
</div>
</div>
</main>
</body>
</html>
s
275 changes: 271 additions & 4 deletions code/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,272 @@
/* After you've linked the CSS file in the HTML,
this should turn the background blue ;) */
body {
background: blue;
}
margin: 0;
font-family: Arial, sans-serif;
background-color: #121212;
color: white;
}

.site-header {
position: absolute;
top: 0;
left: 0;
width: 100%;
padding: 10px 20px;
box-sizing: border-box;
z-index: 100;
}

.logo-container {
display: flex;
align-items: center;
}

.logo-image {
width: 150px;
}

.hero-section {
position: relative;
width: 100%;
height: 60vh;
overflow: hidden;
}

.hero-image {
width: 100%;
height: 100%;
object-fit: cover;
}

.hero-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-overlay h1 {
font-family: "Prata", serif;
font-size: 48px;
margin-bottom: 20px;
}

.white-text {
color: #fff;
}

.yellow-text {
color: #f2d158; /* Gold or Yellow color */
}

.hero-overlay p {
font-family: "Prata", serif;
font-size: 18px;
max-width: 600px;
margin: 0 auto;
padding: 0 20px;
}

.main-content {
display: flex;
justify-content: space-around;
padding: 50px;
background-color: #181818;
}

.signup-container, .info-container {
background-color: #181818;
padding: 20px;
border-radius: 10px;
width: 45%;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
text-align: center;
}

.signup-container h2 {
margin-bottom: 20px;
}

.info-container h2 {
text-align: left;
margin-bottom: 20px;
}

label {
display: block;
text-align: left;
font-size: 12px;
margin-bottom: 5px;
color: #b3b3b3;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
width: calc(100% - 40px); /* Adjust the input box width to leave space for padding */
Copy link

Choose a reason for hiding this comment

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

The comment is super helpful!

padding: 10px 20px;
margin-bottom: 20px;
border: 1px solid #3e3e3e;
border-radius: 4px;
background-color: #2c2c2c;
color: white;
}

input::placeholder {
color: #b3b3b3;
}

.radio-group {
text-align: left;
margin-bottom: 20px;
}

.radio-group p {
font-size: 16px;
color: #fff;
margin-bottom: 15px;
}

.radio-options {
display: flex;
justify-content: space-around;
max-width: 600px;
margin: 0 auto;
}

.radio-options label {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
color: #fff;
width: 120px;
gap: 10px;
line-height: 1.5;
flex-direction: row-reverse;
}

.radio-options input[type="radio"] {
transform: translateY(-1px);
}

.checkbox-group {
display: flex;
align-items: center;
justify-content: left;
margin-top: 20px;
font-size: 1px;
color: #fff;
padding: 10px;
}

.checkbox-group label {
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row-reverse;
}

.checkbox-group input {
margin-left: 10px;
transform: translateY(-2px); /* Fine-tune the alignment of the checkbox */
}

button[type="submit"] {
width: 100%;
padding: 10px;
margin-bottom: 20px;
background-color: #1DB954;
border: none;
border-radius: 50px;
color: white;
font-size: 16px;
cursor: pointer;
}

button[type="submit"]:hover {
background-color: #1aa34a;
}

.divider {
position: relative;
margin: 20px 0;
font-size: 12px;
color: #b3b3b3;
}

.divider:before,
.divider:after {
content: "";
position: absolute;
top: 50%;
width: 40%;
height: 1px;
background-color: #3e3e3e;
}

.divider:before {
left: 0;
}

.divider:after {
right: 0;
}

.social-signup {
margin-bottom: 20px;
}

.social-button {
display: block;
width: 100%;
padding: 10px;
margin-bottom: 10px;
border-radius: 50px;
border: none;
cursor: pointer;
font-size: 14px;
}

.google {
background-color: #4285F4;
color: white;
}

.facebook {
background-color: #4267B2;
color: white;
}

.apple {
background-color: #000000;
color: white;
}

.login-link {
font-size: 12px;
color: #b3b3b3;
}

.login-link a {
color: #1DB954;
text-decoration: none;
}

.login-link a:hover {
text-decoration: underline;
}

@media (max-width: 768px) {
.main-content {
flex-direction: column;
padding: 20px;
}

.signup-container, .info-container {
width: 100%;
margin-bottom: 20px;
}
}