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.
<link href="https://fonts.googleapis.com/css?family=Kanit:300" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet">
<style>
h1 {
font-family: Orbitron, monospace;
}
</style>
<!--HEADER / Logo and Navigation-->
<header>
<div class="container-fluid navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a id="brand" href="#welcome" class="navbar-brand sliding-middle-out text-primary">spences10</a>
</div>
<nav>
<ul class="nav navbar-nav navbar-right collapse navbar-collapse" id="myCollapsible">
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</div>
</div>
<div class="row container-fluid welcome" id="welcome">
<div class="row">
<h1 class="text-center text-primary">Scott Spence</h1>
<h3 class="text-center">Free Code Camp Personal Portfolio</h3>
</div>
</div>
<div class="arrow-down text-center">
<span class="round-anchor fa-stack fa-2x">
<i class="fa fa-circle-thin fa-stack-2x"></i>
<a href="#portfolio"><i class="fa fa-angle-double-down fa-stack-2x"></i></a>
</span>
</div>
</header>
<!--MAIN / Portfolio-->
<main id="portfolio">
<section class="container">
<h2><span>My portfolio</span></h2>
<div class="row">
<div class="col-xs-12 col-md-12">
<a href="https://github.com/spences10/VBA-IDE-Code-Export" target="_blank">
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Project 1</h4>
</div>
<div class="panel-body thumbnail">
<img class="img-responsive" src="https://raw.githubusercontent.com/spences10/VBA-IDE-Code-Export/master/screenshots/ImportFilesToVBAIDE.gif" alt="VBA-IDE-Code-Export">
<p>VBA IDE Code Export</p>
</div>
</div>
</div>
</a>
<a href="https://codepen.io/spences10/full/NbqZob/" target="_blank">
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Project 2</h4>
</div>
<div class="panel-body thumbnail">
<img class="img-responsive" src="https://img.discogs.com/bLaPertPnHb3SFtzsIZn8iPbF1Y=/fit-in/600x423/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/A-2323-1165888500.jpeg.jpg" alt="VBA-IDE-Code-Export">
<p>DJ Hype tribute page</p>
</div>
</div>
</div>
</a>
<a id="brand" href="#welcome">
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Project 3</h4>
</div>
<div class="panel-body thumbnail">
<img class="img-responsive" src="https://production-assets.codepen.io/assets/social/facebook-default-05cf522ae1d4c215ae0f09d866d97413a2204b6c9339c6e7a1b96ab1d4a7340f.png" alt="VBA-IDE-Code-Export">
<p>Placeholder</p>
</div>
</div>
</div>
</a>
<a id="brand" href="#welcome">
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Project 4</h4>
</div>
<div class="panel-body thumbnail">
<img class="img-responsive" src="https://production-assets.codepen.io/assets/social/facebook-default-05cf522ae1d4c215ae0f09d866d97413a2204b6c9339c6e7a1b96ab1d4a7340f.png" alt="VBA-IDE-Code-Export">
<p>Placeholder</p>
</div>
</div>
</div>
</a>
<a id="brand" href="#welcome">
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Project 5</h4>
</div>
<div class="panel-body thumbnail">
<img class="img-responsive" src="https://production-assets.codepen.io/assets/social/facebook-default-05cf522ae1d4c215ae0f09d866d97413a2204b6c9339c6e7a1b96ab1d4a7340f.png" alt="VBA-IDE-Code-Export">
<p>Placeholder</p>
</div>
</div>
</div>
</a>
<a id="brand" href="#welcome">
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Project 6</h4>
</div>
<div class="panel-body thumbnail">
<img class="img-responsive" src="https://production-assets.codepen.io/assets/social/facebook-default-05cf522ae1d4c215ae0f09d866d97413a2204b6c9339c6e7a1b96ab1d4a7340f.png" alt="VBA-IDE-Code-Export">
<p>Placeholder</p>
</div>
</div>
</div>
</a>
</div>
</div>
</section>
</main>
<!--ABOUT-->
<about id="about">
<!--Cheesy Photo-->
<div class="container-fluid">
<h2><span>About me</span></h2>
<div class="row">
<div class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-4">
<img class="img-responsive img-circle img-thumbnail" src="http://i.imgsafe.org/4ab8c26c35.jpg" alt="Scott Spence">
</div>
</div>
<div class="col-xs-8 col-xs-offset-2">
<div class="well center-block">
<section id="about">
<div class="row">
<div class="col-xs-12 col-md-12">
<p class="lead">I am, and always have been interested in tech.</p>
<p class="text-justify">Hi, I'm Scott Spence, aspiring web developer following the Free Code Camp course. I have 10+ years of VBA development experience and am now focused on up-skilling for web dev.</p>
</div>
</div>
</section>
</div>
</div>
</div>
</about>
<!--FOOTER / Contact informations-->
<footer id="contact">
<div class="container">
<div class="row text-center social">
<h4>Contact</h4>
<ul class="list-unstyled list-inline">
<li>
<a href="https://github.com/spences10" target="_blank"><i class="fa fa-github fa-2x"></i></a>
</li>
<li>
<a href="https://forum.freecodecamp.com/users/spences10/summary" target="_blank"><i class="fa fa-fire fa-2x"></i></a>
</li>
<li>
<a href="https://codepen.io/spences10/" target="_blank"><i class="fa fa-codepen fa-2x"></i></a>
</li>
<li>
<a href="https://stackoverflow.com/users/story/1138354" target="_blank"><i class="fa fa-stack-overflow fa-2x"></i></a>
</li>
<li>
<a href="https://uk.linkedin.com/in/linkedinscottspence" target="_blank"><i class="fa fa-linkedin fa-2x"></i></a>
</li>
<li>
<a href="https://twitter.com/ScottDevTweets" target="_blank"><i class="fa fa-twitter fa-2x"></i></a>
</li>
<li>
<a href="mailTo:spences10apps@gmail.com" target="_blank"><i class="fa fa-envelope fa-2x"></i></a>
</li>
</ul>
</div>
</div>
</footer>
/*
Heading and body styles
*/
h1 {
font-family: Orbitron, monospace;
font-size: 50px;
}
body {
font-family: 'Kanit', sans-serif;
font-size: 16px;
background: #E0E0E0;
}
div.row {
margin: 60px 0;
}
/*
Header stuffs
*/
header, .navbar-default {
background-color: #E0E0E0;
}
.navbar-default {
border-color: none !important;
}
.navbar-fixed-top {
border-width: 0;
}
#brand, .navbar-default .navbar-nav>li>a, header h1, .arrow-down {
color: #428bca;
}
.navbar-default .navbar-nav>li>a:hover {
color: #428bca;
}
header nav a:after, .navbar-header a:after {
content: '';
display: block;
margin: auto;
height: 1px;
width: 0%;
background: transparent;
transition: width .5s ease, background-color .5s ease;
}
header nav a:hover:after, .navbar-header a:hover:after {
width: 100%;
background: #fc0217;
}
/*h2 style*/
main h2 {
padding: 30px 0;
color: #428bca;
position: relative;
text-align: center;
}
/*added for the dividing line*/
main h2 span {
background: #E0E0E0;
padding: 0 15px;
position: relative;
z-index: 1;
}
main h2:before {
background: #428bca;
content: "";
display: block;
height: 1px;
position: absolute;
top: 50%;
width: 100%;
}
about h2 {
padding: 30px 0;
color: #428bca;
position: relative;
text-align: center;
}
/*added for the dividing line*/
about h2 span {
background: #E0E0E0;
padding: 0 15px;
position: relative;
z-index: 1;
}
about h2:before {
background: #428bca;
content: "";
display: block;
height: 1px;
position: absolute;
top: 50%;
width: 100%;
}
/*
Added for the hover effect on the favicons
*/
/*
.social {
font-size: 40px;
}
*/
.social a {
color: #000000;
text-decoration: none;
transition: all 0.3s;
}
.social a:hover,
.social a:focus {
color: #428bca;
text-shadow: 0px 0px 3px #428bca;
}
/*
Sliding underline for links
From here: http://bradsknutson.com/blog/css-sliding-underline/
*/
.sliding-middle-out {
display: inline-block;
position: relative;
padding-bottom: 3px;
}
.sliding-middle-out:after {
content: '';
display: block;
margin: auto;
height: 3px;
width: 0px;
background: transparent;
transition: width .5s ease, background-color .5s ease;
}
.sliding-middle-out:hover:after {
width: 100%;
background: #428bca;
}
.thumbnail img {
height:200px;
width:100%;
}
$(document).ready(function(){
$('a[href^="#"]').on('click',function (e) {
e.preventDefault();
var target = this.hash;
var $target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function () {
window.location.hash = target;
});
});
$('.thumbnail').hover(
function(){
$(this).find('.caption').animate({opacity: 0.8}, 400); //.fadeIn(250)
},
function(){
$(this).find('.caption').animate({opacity: 0}, 400); //.fadeOut(205)
}
);
$("button").hover(function(){
$(".icon-bar").css("background-color", "#D38947");
$(".navbar-default .navbar-toggle").css({"border": "1px solid #D38947", "background-color": "transparent"});
},
function(){
$(".icon-bar").css("background-color", "#095057");
$(".navbar-default .navbar-toggle").css({"border": "1px solid #095057", "background-color": "transparent"});
});
});
Also see: Tab Triggers