Skip to content

Instantly share code, notes, and snippets.

@Christonja
Last active April 9, 2019 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Christonja/705218d1d3c9a4a900a27556fff97b09 to your computer and use it in GitHub Desktop.
Save Christonja/705218d1d3c9a4a900a27556fff97b09 to your computer and use it in GitHub Desktop.
Product Landing Page - FCC - Christonja
<head>
<!--Website follows a FreeCodeCamp tutorial where it is designed based on a pre-existing example website
created by FreeCodeCamp however all code is original and created from scratch by 'Christonja'-->
<!--test script courtesy of Free Code Camp-->
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!--Google Fonts-->
<link href="https://fonts.googleapis.com/css?family=Offside|Raleway" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
</head>
<body>
<header id="header">
<nav id=nav-bar>
<img id="header-img" src="https://s3.amazonaws.com/freecodecamp/original_trombones.png" alt="trombone logo">
<a href="#pricing" class="nav-link">Pricing</a>
<a href="#howitworks" class="nav-link">How It Works</a>
<a href="#features" class="nav-link">Features</a>
</nav>
</header>
<h1>Handcrafted, home-made masterpieces</h1>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<label for="email"><input id="email" type="email" placeholder="Enter your email address" required></label>
<label for="submit"><input id="submit" type="submit" value="Get Started"></label>
</form>
<div id="features">
<div class="perks">
<i class="fas fa-fire"></i>
<h2>Premium Materials</h2>
<p>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
</div>
<div class="perks">
<i class="fas fa-truck"></i>
<h2>Fast Shipping</h2>
<p>We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied.</p>
</div>
<div class="perks">
<i class="fas fa-battery-full"></i>
<h2>Quality Assurance</h2>
<p>For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument.</p>
</div>
<b id="howitworks"></b><iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/y8Yv4pnO7qc" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<div id="pricing">
<div class="price">
<h3>TENOR TROMBONE</h3>
<div class="tprice"><b>$600</b></div>
<p class="lorem-ipsum">
Lorem ipsum.
Lorem ipsum.
Lorem ipsum dolor.
Lorem ipsum.</p>
<label for="select"><input type="button" class="select" value="Select"></label>
</div>
<div class="price">
<h3>BASS TROMBONE</h3>
<div class="tprice"><b>$900</b></div>
<p class="lorem-ipsum">
Lorem ipsum.
Lorem ipsum.
Lorem ipsum dolor.
Lorem ipsum.</p>
<label for="select"><input type="button" class="select" value="Select"></label>
</div>
<div class="price">
<h3>VALVE TROMBONE</h3>
<div class="tprice"><b>$1200</b></div>
<p class="lorem-ipsum">
Lorem ipsum.
Lorem ipsum.
Lorem ipsum dolor.
Lorem ipsum.</p>
<label for="select"><input type="button" class="select" value="Select"></label>
</div>
</div>
<footer class="footer">
<div class="links">
<a href="#">Privacy</a>
<a href="#">Terms</a>
<a href="#">Contact</a>
<p> Original layout design by Free Code Camp, completely redone in HTML and CSS by Christonja. <p>
</div>
</footer>
</body>
// !! IMPORTANT README:
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.
/***********
INSTRUCTIONS:
- Select the project you would
like to complete from the dropdown
menu.
- Click the "RUN TESTS" button to
run the tests against the blank
pen.
- Click the "TESTS" button to see
the individual test cases.
(should all be failing at first)
- Start coding! As you fulfill each
test case, you will see them go
from red to green.
- As you start to build out your
project, when tests are failing,
you should get helpful errors
along the way!
************/
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!
// Once you have read the above messages, you can delete all comments.
#nav-bar {
background-color: grey;
position: fixed;
top: 0;
width: 100%;
left: 0;
}
#nav-bar a {
color: black;
text-decoration: none;
font-family: "Offside", sans-serif;
float: right;
padding: 10px;
}
#header-img {
padding: 5px 0 0 0;
float: left;
width: 300px;
color: white;
}
h1 {
padding: 100px 0 0 0;
font-family: "raleway", sans-serif;
text-align: center;
}
#form {
position: relative;
text-align: center;
}
#submit {
background-color: grey;
color: white;
border: 1px solid grey;
padding: 2px 8px;
text-decoration: none;
font-family: sans-serif;
font-size: 11pt;
}
#features {
display: flex;
flex-direction: column;
justify-content: center;
position: scroll;
}
.perks {
max-width: 600px;
margin: 5% auto 0 auto;
}
h2 {
font-family: "raleway", sans-serif;
}
p {
font-family: "raleway", sans-serif;
font-size: 11pt;
}
i {
font-size: 2.5em;
float: left;
margin: 5% 0 0 -15%;
color: #595959;
}
iframe {
padding: 60px 0 0 0;
margin: 20px auto;
}
@media (max-width: 600px) {
iframe {
width: 260px;
height: 180px;
}
}
@media (max-width: 300px) {
iframe {
visibility: hidden;
}
}
#pricing {
display: flex;
flex-direction: row;
justify-content: center;
margin: 20px;
font-family: "raleway", sans-serif;
}
.price {
border: 1px solid black;
text-align: center;
margin: 5px;
}
.tprice {
margin-top: 5px;
font-size: 1.5em;
padding: 10px;
}
h3 {
background-color: #c5c5c5;
margin: 0;
padding: 10px;
}
.select {
background-color: grey;
color: white;
border: 1px solid grey;
padding: 5px 10px;
margin: 10px;
text-decoration: none;
font-family: sans-serif;
font-size: 11pt;
}
.lorem-ipsum {
padding: 10px;
}
.footer {
color: black;
font-family: "Offside", sans-serif;
margin: 5px 20px 20px 20px;
background-color: grey;
text-align: right;
bottom: 0;
}
.links {
padding-top: 10px;
padding-right: 10px;
}
a {
color: black;
text-decoration: none;
margin: 2px;
}
@media (max-width: 400px) {
#pricing {
display: flex;
flex-direction: column;
margin: 20px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment