HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<head>
<!-- Google Web Fonts -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700|Merriweather' rel='stylesheet' type='text/css'>
<!-- Font Awesome Icons -->
<link href="https://opensource.keycdn.com/fontawesome/4.5.0/font-awesome.min.css" rel="stylesheet">
</head>
<body id="page-top">
<nav role="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand page-scroll" href="#page-top">DAMON MYERS</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a class="page-scroll" href="#about">ABOUT</a>
</li>
<li>
<a class="page-scroll" href="#work">WORK</a>
</li>
<li>
<a class="page-scroll" href="#contact">CONTACT</a>
</li>
</ul>
</div>
</div>
</nav>
<header>
<div class="header-content">
<div class="header-content-inner">
<h1>DAMON MYERS</h1>
<hr>
<nav class="links">
<a target="_blank" href="https://github.com/damon-myers"><i class="fa fa-github"></i></a>
<a target="_blank" href="https://codepen.io/Damon-Myers/"><i class="fa fa-codepen"></i></a>
<a target="_blank" href="https://www.linkedin.com/in/myersdamon"><i class="fa fa-linkedin"></i></a>
<a target="_blank" href="mailto:damon.shane.myers@gmail.com"><i class="fa fa-envelope"></i></a>
</nav>
</div>
</div>
</header>
<section class="bg-primary" id="about">
<div class="container">
<div class="about-content">
<img class="portfolio-img img-responsive img-circle" src="https://avatars1.githubusercontent.com/u/6657122?v=3&s=460">
<h1>Who Am I?</h1>
<hr class="light">
<p class="faded">Hello! I am a student of Computer Science at the University of Texas of the Permian Basin as well as a GIS Developer for the City of Odessa, Texas. I am passionate about game design, music, politics, and the internet. I study Web Development in my free time via <a href="https://freecodecamp.com">FreeCodeCamp</a>. If you think I can be of any use to you or your organization, please reach out to me.</p>
<a href="#contact" class="page-scroll btn btn-default btn-xl">CONTACT ME</a>
</div>
</div>
</section>
<section id="work">
<div class="container">
<h1>What Have I Built?<h1>
<hr>
<div class="row">
<div class="col-md-4">
<div class="project-img-box">
<a target="_blank" href="https://codepen.io/Damon-Myers/full/bdQgzj/">
<div class="project-img-overlay">
Tic-Tac-Toe with AI
</div>
<img class="img-responsive img-project" src="https://s18.postimg.org/3noqzzdgp/tictactoe.png">
</a>
</div>
</div>
<div class="col-md-4">
<div class="project-img-box">
<a target="_blank" href="https://codepen.io/Damon-Myers/full/BNPjoy/">
<div class="project-img-overlay">
Twitch Status Viewer
</div>
<img class="img-responsive img-project" src="https://s28.postimg.org/l8wyllybx/twitch.png">
</a>
</div>
</div>
<div class="col-md-4">
<div class="project-img-box">
<a target="_blank" href="https://codepen.io/Damon-Myers/full/ZGqEbZ/">
<div class="project-img-overlay">
Skeumorphic Calculator
</div>
<img class="img-responsive img-project" src="https://s28.postimg.org/6bohkll3h/calculator.png">
</a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="project-img-box">
<a target="_blank" href="https://codepen.io/Damon-Myers/full/bdKpOO/">
<div class="project-img-overlay">
Location-based Weather App
</div>
<img class="img-responsive img-project" src="https://s28.postimg.org/5q4428ff1/weather.png">
</a>
</div>
</div>
<div class="col-md-4">
<div class="project-img-box">
<a target="_blank" href="https://codepen.io/Damon-Myers/full/aOaJRj/">
<div class="project-img-overlay">
Wikipedia Search App
</div>
<img class="img-responsive img-project" src="https://s28.postimg.org/iazzrwqod/wikipedia.png">
</a>
</div>
</div>
<div class="col-md-4">
<div class="project-img-box">
<a target="_blank" href="https://codepen.io/Damon-Myers/full/jPxLrG/">
<div class="project-img-overlay">
Random Quote Generator
</div>
<img class="img-responsive img-project" src="https://s28.postimg.org/ewmepiknh/quotes.png">
</a>
</div>
</div>
</div>
</div>
</section>
<section id="contact" class="bg-dark">
<div class="container">
<div class="row">
<h1>Contact Me</h1>
<hr class="">
<form action="https://formspree.io/damon.shane.myers@gmail.com" method="POST">
<div class="form-group">
<label for="nameInput">Your Name:</label>
<input type="text" name="_subject" class="form-control" id="nameInput" placeholder="John Doe">
</div>
<div class="form-group">
<label for="emailInput">Your Email:</label>
<input type="email" name="_replyto" class="form-control" id="emailInput" placeholder="you@domain.com">
</div>
<div class="form-group">
<label for="messageInput">Message:</label>
<textarea rows="3" name="message" class="form-control" id="messageInput" placeholder="Hello..."></textarea>
</div>
<input class="btn btn-default btn-xl" type="submit" value="SEND">
</form>
</div>
</div>
</section>
</body>
html,
body {
height: 100%;
width: 100%;
}
p,
form>label {
font-weight: 400;
font-size: 12pt;
font-family: 'Merriweather', serif;
}
h1,
/* .navbar-default, */
.project-image-overlay {
font-family: 'Open Sans', sans-serif;
}
p>a {
color: white;
text-decoration: underline;
}
p>a:hover {
color: #222222;
}
header {
position: relative;
width: 100%;
min-height: auto;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
background-position: center;
background-image: url("https://static.pexels.com/photos/15276/night-sky-sunset-power-lines.jpg");
background-color: #DFDFDF;
text-align: center;
color: white;
}
header h1 {
font-weight: 700;
text-transform: uppercase;
margin-top: 0;
margin-bottom: 0;
}
header hr {
margin: 30px auto;
}
header p {
font-weight: 300;
color: rgba(255, 255, 255, 0.7);
font-size: 16px;
margin-bottom: 50px;
}
.header-content {
position: relative;
text-align: center;
padding: 100px 15px 100px;
width: 100%;
}
hr {
border-color: #f05f40;
border-width: 4px;
max-width: 50px;
}
hr.light {
border-color: white;
}
.bg-primary {
background-color: #f05f40;
}
.bg-dark {
background-color: #222222;
color: white;
}
section {
padding: 100px 0;
text-align: center;
}
.btn {
margin-top: 30px;
border: none;
border-radius: 300px;
font-weight: 700;
}
.btn-xl {
padding: 10px 20px;
}
.btn-primary {
color: white;
background-color: #f05f40;
border-color: #f05f40;
-webkit-transition: all 0.35s;
-moz-transition: all 0.35s;
transition: all 0.35s;
}
.about-content {
margin: 0px 10px;
}
.portfolio-img {
margin: auto;
border: 6px solid white;
max-width: 200px;
}
.project-img-box {
position: relative;
overflow: hidden;
display: block;
}
.project-img-overlay {
color: white;
background: rgba(240, 95, 64, 0.9);
margin-top: 30px;
padding: 20px;
position: absolute;
width: 100%;
height: 100%;
text-align: center;
opacity: 0;
-webkit-transition: all 0.35s;
-moz-transition: all 0.35s;
transition: all 0.35s;
}
.project-img-overlay:hover {
opacity: 1;
}
.img-project {
margin-top: 30px;
padding: 3px;
border: 1px solid #ddd;
}
.links {
margin-top: 30px;
width: 100%;
font-size: 20pt;
list-style-type: none;
text-align: center;
}
.links>a {
color: white;
padding: 16px;
-webkit-transition: all .35s;
-moz-transition: all 0.35s;
transition: all .35s;
text-decoration: none;
}
.links>a:hover {
text-decoration: none;
color: #f05f40;
}
form {
margin: 0px 10px;
-webkit-transition: all .35s;
-moz-transition: all 0.35s;
transition: all .35s;
}
form>.btn:hover {
background-color: #f05f40;
color: white;
}
label {
display: block;
text-align: left;
}
/* Media Queries for Desktop Viewers */
@media (min-width: 768px) {
header {
min-height: 100%;
}
header h1 {
font-size: 60px;
}
.header-content {
position: absolute;
top: 30%;
}
.navbar {
background: transparent;
-webkit-transition: all .35s;
-moz-transition: all 0.35s;
transition: all .35s;
}
.navbar-default .navbar-brand,
.navbar-default .navbar-nav>li>a {
color: rgba(255, 255, 255, 0.9);
font-weight: 700;
-webkit-transition: all .35s;
-moz-transition: all 0.35s;
transition: all .35s;
}
}
$(document).ready(function(){
$(function () {
// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() {
$('.navbar-toggle:visible').click();
});
$(window).scroll(function () {
// set distance user needs to scroll before we fadeIn navbar
if ($(this).scrollTop() > 50) {
$('.navbar').css({
'background': 'white',
'border-color': 'rgba(0, 0, 0, 0.2)'
});
$('.navbar-brand').css('color', '#f05f40');
$('.navbar-nav>li>a').css('color', '#222222');
$('.navbar-nav>li>a').hover(function() {
$(this).css('color', '#f05f40');
}, function() {
$(this).css('color', '#222222');
});
}
else {
$('.navbar').css({
'background': 'transparent',
'border-color': 'rgba(255, 255, 255, 0.4)'
});
$('.navbar-brand').css('color', 'rgba(255, 255, 255, 0.9)');
$('.navbar-nav>li>a').css('color', 'rgba(255, 255, 255, 0.9)');
$('.navbar-nav>li>a').hover(function() {
$(this).css('color', 'white');
}, function() {
$(this).css('color', 'rgba(255, 255, 255, 0.9)');
});
}
});
});
});
Also see: Tab Triggers