-
Notifications
You must be signed in to change notification settings - Fork 471
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
Xing Yin Business site version 1 #382
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,43 @@ | ||
# Business Site | ||
|
||
Replace this readme with your own information about your project. | ||
Week 3 Project | Build a Business Site | ||
<!-- The first version <time>2024-09-01</time> --> | ||
|
||
Insruction: https://github.com/Technigo/project-business-site/blob/master/instructions.md | ||
|
||
Summary: | ||
• one-pager website | ||
• A header with responsive image/video | ||
• A signup form with at least three different input types. Examples: | ||
∘ Text fields | ||
∘ A password field | ||
∘ Set of radio buttons | ||
∘ Set of checkboxes | ||
∘ Submit button | ||
• Style your page | ||
• The page should be fully responsive and work well on mobile as well as tablet and desktop (it should look good on devices from 320px width up to 1600px). | ||
• Follow the guidelines on how to write clean code | ||
|
||
## Good example | ||
Confetti (hero video) - https://confetti.events/sv/ | ||
Wordpress signup form - https://wordpress.com/log-in | ||
Dribbble (signup form examples) - https://dribbble.com/search/signup-form | ||
Unikorns (input types) - https://unikorns.agency/contact/ | ||
|
||
Useful link | ||
Image resources - https://technigo.notion.site/Image-resources-04237e2fdd624562acd58643dac93016 | ||
How to Fullscreen Video - https://www.w3schools.com/howto/howto_css_fullscreen_video.asp | ||
|
||
Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. | ||
|
||
## 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? | ||
OBS! The hamburger menu (navbar-burger) bar is visible on all size of screens this time because i do not have enough time to fix the display for navbar menu. I will fix it later. | ||
|
||
BTW my java script does not work as well this time, nor in last project. I also need time to fix this. So the button of "Pause" do NOT work at all... | ||
|
||
<!-- IF you happened to review the first version plz do not mind the comment everywhere I left in the coding !!! --> | ||
<!-- I will clean and dry html and css in the second version soon. Promise! :) --> | ||
|
||
|
||
## 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. | ||
Here is my link http://xingspress.netlify.app |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,201 @@ | ||
<!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> | ||
|
||
<!-- video or image as a header is cool :) --> | ||
|
||
<!-- Signup form --> | ||
|
||
</body> | ||
</html> | ||
<html lang="en"> | ||
<!-- welcome to XingsPress http://xingspress.netlify.app --> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Business Site | XingsPress-contact-form</title> | ||
<link rel="stylesheet" href="./style.css"> | ||
<!-- Link to the JavaScript file --> | ||
<script src="./script.js"></script> | ||
|
||
</head> | ||
|
||
<body id="contact"> | ||
<!-- video fullscreen as well as a logo and create an account --> | ||
<header> | ||
<!-- navbar --> | ||
<div class="navbar-container"> | ||
<!-- logo --> | ||
<div class="navbar-logo"> | ||
<a href="https://xingsnews.netlify.app/" target="_blank" id="logo"> | ||
<img src="assets/logo.png" alt="XingsPress Logo"> | ||
</a> | ||
</div> | ||
<!-- hamburger menu --> | ||
<div class="navbar-burger"> | ||
<span></span> | ||
<span></span> | ||
<span></span> | ||
</div> | ||
|
||
<!-- navbar container shall not show this time--> | ||
<!-- <div class="navbar-menu-container"> | ||
<ul class="navbar-menu"> | ||
<li class="navbar-menu-item"><a class="navbar-menu-item-link" href="#">Home</a></li> | ||
<li class="navbar-menu-item"><a class="navbar-menu-item-link" href="#">About</a></li> | ||
<li class="navbar-menu-item"><a class="navbar-menu-item-link" href="#">Contact</a></li> | ||
</ul> | ||
</div> --> | ||
|
||
</div> | ||
|
||
<!-- The fullscreen video with some text--> | ||
<div class="video-container"> | ||
<video class="video-player" id="my-video" preload="auto" autoplay muted loop playsinline | ||
poster="./assets/cloudfront.jpg"> | ||
<source src="assets/hero-video1.mp4" type="video/mp4"> | ||
<source src="assets/hero-video2.mp4" type="video/mp4"> | ||
<source src="assets/hero-video3.mp4" type="video/mp4"> | ||
Your browser does not support the video tag. | ||
</video> | ||
<div class="video-overlay"></div> | ||
<!-- Optional: some overlay text to describe the video --> | ||
<div class="overlay-text"> | ||
<div class="overlay-text-header">Welcome to XingsPress</div> | ||
<div class="overlay-text-subheader">Just a little reminder that by continuing with any of the options | ||
below, | ||
you agree to our <a href="#">Terms | ||
of Service</a> and have read our <a href="#">Privacy Policy</a>.</div> | ||
</div> | ||
<!-- Use a button to pause/play the video with JavaScript | Why??? JS do not work!!! --> | ||
<button id="my-play-button" class="play-pause-button" onclick="myFunction()">Pause</button> | ||
</div> | ||
</header> | ||
|
||
|
||
<main class="contact-form"> | ||
<!-- Form type shows based on screen size --> | ||
<h1>Let's team up and make magic happen!</h1> | ||
<form action="http://httpbin.org/anything" method="post"> | ||
|
||
<!-- Contact form only for smartphone --> | ||
<div class="contact-form-for-small-screen"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using semantic HTML instead of for example using div to improve SEO and overall code readability. |
||
<!-- Style of text input --> | ||
<label for="name-small">Hi! My name is</label> <br> | ||
<input type="text" name="name" id="name-small" class="text-input" placeholder="Type your name*"> <br> | ||
|
||
<label for="company-small">and I work in</label> <br> | ||
<input type="text" name="company" id="company-small" class="text-input" placeholder="Type your company name"> | ||
<br> | ||
|
||
<!-- Style of radio input --> | ||
<span>I found you using</span><br> | ||
<input type="radio" name="source" id="mouth-small" class="radio"> | ||
<label for="mouth-small">Word of mouth</label><br> | ||
|
||
<input type="radio" name="source" id="dribbble-small" class="radio"> | ||
<label for="dribbble-small">Dribbble</label><br> | ||
|
||
<input type="radio" name="source" id="google-small" class="radio"> | ||
<label for="google-small">Google Search</label><br> | ||
|
||
<input type="radio" name="source" id="other-small" class="radio"> | ||
<label for="other-small">Other</label><br> | ||
|
||
<!-- Style of checkbox input --> | ||
<span>I'm looking for help with:</span><br> | ||
<input type="checkbox" name="service" id="brand-identity-small" class="checkbox"> | ||
<label for="brand-identity-small">Brand Identity Design</label><br> | ||
|
||
<input type="checkbox" name="service" id="website-small" class="checkbox"> | ||
<label for="website-small">Website Development</label><br> | ||
|
||
<input type="checkbox" name="service" id="product-small" class="checkbox"> | ||
<label for="product-small">Product Design</label><br> | ||
</div> | ||
|
||
<!-- Contact form for tablet or desktop --> | ||
<div class="contact-form-for-large-screen"> | ||
<!-- Style of text input --> | ||
<div class="contact-form-row"> | ||
<label for="name-large" class="contact-form-text">Hi! My name is</label> | ||
<input type="text" id="name-large" class="text-input-underline" name="name" placeholder="Type your name*"> | ||
|
||
<label for="company-large" class="contact-form-text"> and I work in</label> | ||
<input type="text" id="company-large" class="text-input-underline" name="company" | ||
placeholder="Type your company name*"> | ||
</div> | ||
|
||
<!-- Style with flex box for radio input --> | ||
<div class="contact-form-row"> | ||
<label class="contact-form-text">I found you using</label> | ||
<div class="contact-form-items"> | ||
<label class="radio"> | ||
<input type="radio" name="source" id="mouth-large" class="radio-input" value="Word of mouth"> | ||
<span class="radio-label no-select text-m">Word of mouth</span> | ||
</label> | ||
<label class="radio"> | ||
<input type="radio" name="source" id="dribbble-large" class="radio-input" value="Dribbble"> | ||
<span class="radio-label no-select text-m">Dribbble</span> | ||
</label> | ||
<label class="radio"> | ||
<input type="radio" name="source" id="google-large" class="radio-input" value="Google Search"> | ||
<span class="radio-label no-select text-m">Google Search</span> | ||
</label> | ||
<label class="radio"> | ||
<input type="radio" name="source" id="other-large" class="radio-input" value="Other"> | ||
<span class="radio-label no-select text-m">Other</span> | ||
</label> | ||
</div> | ||
</div> | ||
|
||
<!-- Style with flex box for checkbox input --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good and informative comments when the style also is mentioned |
||
<div class="contact-form-row"> | ||
<label class="contact-form-text">I'm looking for help with:</label> | ||
<div class="contact-form-items"> | ||
<label class="checkbox"> | ||
<input type="checkbox" name="service" id="brand-identity-large" class="checkbox-input" | ||
value="Brand Identity Design"> | ||
<span class="checkbox-label">Brand Identity Design</span> | ||
</label> | ||
<label class="checkbox"> | ||
<input type="checkbox" name="service" id="website-large" class="checkbox-input" | ||
value="Website Development"> | ||
<span class="checkbox-label">Website Development</span> | ||
</label> | ||
<label class="checkbox"> | ||
<input type="checkbox" name="service" id="product-large" class="checkbox-input" value="Product Design"> | ||
<span class="checkbox-label">Product Design</span> | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<button type="submit" class="submit-button">Start a journey</button> | ||
</form> | ||
</main> | ||
|
||
|
||
|
||
|
||
<!-- Fotter with bunch of goodis :) --> | ||
<footer> | ||
<div class="footer-content"> | ||
<nav> | ||
<ul class="footer-links"> | ||
<li><a href="#">Privacy Policy</a></li> | ||
<li><a href="#">Terms of Service</a></li> | ||
<li><a href="#">Contact</a></li> | ||
<li><a href="#">Sitemap</a></li> | ||
</ul> | ||
</nav> | ||
<div class="social-media"> | ||
<a href="#"><img src="assets/facebook-icon.png" alt="Facebook"></a> | ||
<a href="#"><img src="assets/twitter-icon.png" alt="Twitter"></a> | ||
<a href="#"><img src="assets/instagram-icon.png" alt="Instagram"></a> | ||
<a href="#"><img src="assets/github-icon.png" alt="GitHub"></a> | ||
</div> | ||
</div> | ||
<div class="footer-bottom"> | ||
<p>© 2024 XingS Architecture. All rights reserved.</p> | ||
</div> | ||
|
||
|
||
</footer> | ||
|
||
|
||
</body> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Get the video | ||
var videoPlayer = document.getElementById("my-video"); | ||
|
||
// Get the button | ||
var playPauseBtn = document.getElementById("my-play-button"); | ||
|
||
// JavaScript to handle video playlist and play/pause functionality | ||
const videoPlayer = document.getElementById('my-video'); | ||
const playPauseBtn = document.getElementById('my-play-button'); | ||
let isPlaying = true; | ||
|
||
function myFunction() { | ||
if (videoPlayer.paused) { | ||
videoPlayer.play(); | ||
playPauseBtn.textContent = 'Pause'; | ||
isPlaying = true; | ||
} else { | ||
videoPlayer.pause(); | ||
playPauseBtn.textContent = 'Play'; | ||
isPlaying = false; | ||
} | ||
} | ||
|
||
videoPlayer.addEventListener('ended', () => { | ||
if (isPlaying) { | ||
videoPlayer.currentTime = 0; | ||
videoPlayer.play(); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider to not having two different navbars in the code to avoid that seems like a duplicate or maybe add more info in the comments of how its supposed to be used