Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created October 3, 2018 07:54
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 codecademydev/d5a0e6107bdf0de22727b203733477df to your computer and use it in GitHub Desktop.
Save codecademydev/d5a0e6107bdf0de22727b203733477df to your computer and use it in GitHub Desktop.
Codecademy export
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link rel='stylesheet' href='styles.css'/>
</head>
<body>
<div class="header">
<div class="container">
<div class="row">
<div class="col-md-4">
<h1>madison square market</h1>
</div>
<div class="pull-right">
<ul>
<li class="dropdown" id="cart">
<h3>cart &#x25BE;</h3>
<ul class="dropdown-menu" id="cartMenu">
<li>View Cart</li>
<li>Saved Carts</li>
</ul>
</li>
<li class="dropdown" id="account">
<h3>account &#x25BE;</h3>
<ul class="dropdown-menu" id="accountMenu">
<li>View Account</li>
<li>Check Order Status</li>
<li>Sign in</li>
</ul>
</li>
<li class="dropdown" id="help">
<h3>help &#x25BE;</h3>
<ul class="dropdown-menu" id="helpMenu">
<li>FAQs</li>
<li>Return Policy</li>
<li>Shipping Info</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="main"></div>
<div class="footer"></div>
<script src="https://s3.amazonaws.com/codecademy-content/projects/jquery.min.js"></script>
<script src='main.js'></script>
</body>
</html>
$(document).ready(() => {
$('#cart').on('click', () => {
('#cartMenu').show();
});
$('#account').on('click', () => {
('#accountMenu').show();
});
$('#help').on('click', () => {
('#helpMenu').show();
});
$('.dropdown-menu').on('mouseleave', () => {
('.dropdown-menu')
});
});
html, body {
margin: 0;
padding: 0;
}
body {
font-family: 'Montserrat', sans-serif;
}
.container {
max-width: 1024px;
margin: 0 auto;
}
/* Header */
.header {
padding: 45px 0;
background-color: #0074ff;
}
.header ul {
list-style: none;
padding: 0;
}
.header li {
display: inline;
line-height: 30px;
}
.header li + li {
margin-left: 30px;
}
.header h1 {
margin: 0;
font-size: 20px;
color: #fff;
}
.header h3 {
color: #fff;
font-size: 14px;
display: inline-block;
margin: 0;
font-weight: normal;
cursor: pointer;
}
.header .dropdown {
position: relative;
}
.header .dropdown-menu {
position: absolute;
top: 20px;
border-radius: 0;
}
.header .dropdown-menu li {
display: block;
margin: 0;
padding: 3px 10px;
}
/* Main */
.main {
background: url('https://s3.amazonaws.com/codecademy-content/projects/2/madison-square-market/s1.jpg') no-repeat center center;
background-size: cover;
height: 400px;
width: 100%;
}
/* Footer */
.footer {
background-color: #0074ff;
padding: 20px 0;
height: 200px;
}
@media (max-width: 1024px) {
.header h1 {
width: 100%;
text-align: center;
}
.pull-right {
float: none !important;
margin: 20px auto 0;
width: 225px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment