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

Xing Yin Business site version 1 #382

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
39 changes: 35 additions & 4 deletions README.md
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
Binary file added code/assets/cloudfront.jpg
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/assets/facebook-icon.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/assets/github-icon.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/assets/hero-video1.mp4
Binary file not shown.
Binary file added code/assets/hero-video2.mp4
Binary file not shown.
Binary file added code/assets/hero-video3.mp4
Binary file not shown.
Binary file added code/assets/instagram-icon.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/assets/logo.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/assets/twitter-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
192 changes: 180 additions & 12 deletions code/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,185 @@
<!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>
<!-- welcome to XingsPress http://xingspress.netlify.app -->

<!-- video or image as a header is cool :) -->
<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>

<!-- Signup form -->
</head>

</body>
</html>
<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">

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

<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">

Choose a reason for hiding this comment

The 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 -->
<span>Hi! My name is</span> <br>
<input type="text" name="name" class="text-input" placeholder="Type your name*"> <br>
<span>and I work in</span> <br>
<input type="text" name="company" 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" class="radio"><label for="mouth">Word of mouth</label><br>

Choose a reason for hiding this comment

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

consider using indentation for the inputs, for example
`

<input type="radio" name="source" id="dribbble" class="radio"><label for="dribbble">Dribbble</label><br>
<input type="radio" name="source" id="google" class="radio"><label for="google">Google Search</label><br>
<input type="radio" name="source" id="other" class="radio"><label for="other">Other</label><br>
<!-- Style of checkbox input -->
<span>I'm looking for help with:</span><br>
<input type="checkbox" name="service" id="brand-identity" class="checkbox">
<label for="brand-identity">Brand
Identity
Design</label><br>
<input type="checkbox" name="service" id="website" class="checkbox">
<label for="website">Website
Development</label><br>
<input type="checkbox" name="service" id="product" class="checkbox">
<label for="product">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">
<span class="contact-form-text">Hi! My name is</span>
<input type="text" class="text-input-underline" name="name" placeholder="Type your name*">

<span class="contact-form-text"> and I work in</span>
<input type="text" class="text-input-underline" name="company" placeholder="Type your company name*">
</div>
<!-- Style with flex box for radio input -->
<div class="contact-form-row">
<span class="contact-form-text">I found you using</span>
<div class="contact-form-items">
<label class="radio"><input type="radio" name="source" 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" class="radio-input" value="Dribbble">
<span class="radio-label no-select text-m">Dribbble</span>
</label>
<label class="radio"><input type="radio" name="source" 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" 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 -->

Choose a reason for hiding this comment

The 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">
<span class="contact-form-text">I'm looking for help with:</span>
<div class="contact-form-items">
<label class="checkbox">
<input type="checkbox" name="service" class="checkbox-input" value="Brand Identity Design">
<span class="checkbox-label">Brand Identity Design</span>
</label>
<label class="checkbox">
<input type="checkbox" name="service" class="checkbox-input" value="Website Development">
<span class="checkbox-label">Website Development</span>
</label>
<label class="checkbox">
<input type="checkbox" name="service" 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>&copy; 2024 XingS Architecture. All rights reserved.</p>
</div>


</footer>


</body>

</html>
29 changes: 29 additions & 0 deletions code/script.js
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();
}
});
Loading