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 URL's 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 it's URL and the proper URL extention.
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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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.
<html>
<title>
<head></head>
</title>
<body>
<a href="#top"></a>
<div id="about" class="container" align="center">
<!--Intro-->
<div class="About-Me">
<div class="row">
<div class="col-md-6">
<img src="https://s31.postimg.cc/akvxxpq57/Gebre_Mesquitta_HTML_Element_3.jpg" class="img-responsive" id="top"/>
</div>
</div>
<div class="row text-center">
<div class="col-md-12">
<p><h2>Full-Stack Developer with a B.Sc in Industrial Design Technology. Devoted to the design of experiences with code.
</h2></p>
</div>
</div>
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6" col-md-push-6>
<img src="https://s30.postimg.cc/52tghb8xt/Gebre_Mesquitta_HTML_Element_2.jpg" class="img-responsive" id="bottom"/>
</div>
</div>
<div class="glass">
</div>
</div>
<!--Buttons-->
<div class="row" id="buttons">
<div class ="col-sm-4 text-center">
<a href="#about" class="myButton">About</a>
</div>
<div class="col-sm-4 ">
<div class="dropdown" id="showcase">
<div class="text-center">
<a href="#portfolio" class="myButton" id="tell-state">Portfolio</a>
<div class="red"></div>
<div class="green glow-green"></div>
<!-- <div class="red glow-red"></div>
<div class="green glow-green"></div>-->
</div>
<div class="dropdown-content">
<a href="https://codepen.io/IDCoder/full/Gxqybw/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Simon Game</a>
<a href="https://codepen.io/IDCoder/full/mXMqGV/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Twitch TV</a>
<a href="https://codepen.io/IDCoder/full/rpdBQJ/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Wikepedia</a>
<a href="https://codepen.io/IDCoder/full/NwNOgq/" class="dropdown-tab" title= title="This link opens in a new window" class="dropdown-tab" title= target="_blank">Weather App</a>
<a href="https://codepen.io/IDCoder/full/KZqNdr/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Random Quote Machine</a>
<a href="https://codepen.io/IDCoder/full/zEBoOQ/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Calculator Web App</a>
<a href="https://codepen.io/IDCoder/full/Xevyqq/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Real Estate Website</a>
<a href="https://codepen.io/IDCoder/full/PWYReX/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Security Surveillance Website</a>
<a href="https://codepen.io/IDCoder/full/OWbXLw/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">My Hero Website</a>
</div>
</div>
</div>
<div class ="col-sm-4 text-center">
<a href="#contact-form" class="myButton">Connect</a>
</div>
</div>
<!--Portfolio-->
<div id="portfolio" class="background-image">
<div class="holder">
<div class="Portfolio Pics" id ="showcase">
<figure>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg
" width="360" height="270"></a>
<a href=""><a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
</figure>
</div>
</div>
</div>
<!-- Connect Info-->
<div class="contact-holder">
<div id="contact-form">
<div>
<h1>Connect</h1>
<h4>Please answer the following questions below.</h4>
</div>
<div>
<form method="post" action="/">
<div>
<label for="name">
<span class="required">Name: *</span>
<input type="text" id="name" name="name" value="" placeholder="Your Name" required="required"S/>
</label>
</div>
<div>
<label for="email">
<span class="required">Email: *</span>
<input type="email" id="email" name="email" value="" placeholder="Your Email" tabindex="2" required="required" />
</label>
</div>
<div>
<label for="subject">
<span>Subject: </span>
<select id="subject" name="subject" tabindex="4">
<option value="hello">Product Service Pricing</option>
<option value="quote">What is your estimated timeline?</option>
<option value="quote">What is your design process? </option>
</select>
</label>
</div>
<div>
<label for="message">
<span class="required">Message: *</span>
<textarea id="message" name="message" placeholder="Please write your message here." tabindex="5" required="required"></textarea>
</label>
</div>
<div>
<button name="submit" type="submit" id="submit" >SEND</button>
</div>
</form>
</div>
</div>
</div>
<!--Social media links -->
<div class="col-xs-12">
<div class="social-media-icon-footer">
<div id="contact">
<div class="contact">
<h3>Social Media Connections</h3>
<div>
<ul class="soc">
<li class="socbutton">
<a href="https://www.linkedin.com" target="blank"><i class= "fa fa-linkedin-square fa-fw"></i>LINKEDIN</a>
</li>
<li class="socbutton">
<a href="https://github.com" target="blank"><i class= "fa fa-github fa-fw"></i>GITHUB</a>
</li>
<li class="socbutton">
<a href="https://www.facebook.com" target="blank"><i class= "fa fa-facebook-official fa-fw"></i>FACEBOOK</a>
</li>
<li class="socbutton">
<a href="https://www.freecodecamp.com" target="blank"><i class= "fa fa-fire fa-fw"></i>FREECODECAMP</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<!--
<div id="contact-form">
<div>
<h1>Connect</h1>
<h4>Please answer the following questions below.</h4>
</div>
<div>
<form method="post" action="/">
<div>
<label for="name">
<span class="required">Name: *</span>
<input type="text" id="name" name="name" value="" placeholder="Your Name" required="required" tabindex="1" autofocus="autofocus" />
</label>
</div>
<div>
<label for="email">
<span class="required">Email: *</span>
<input type="email" id="email" name="email" value="" placeholder="Your Email" tabindex="2" required="required" />
</label>
</div>
<div>
<label for="subject">
<span>Subject: </span>
<select id="subject" name="subject" tabindex="4">
<option value="hello">Product Service Pricing</option>
<option value="quote">What is your estimated timeline?</option>
<option value="quote">What is your design process? </option>
</select>
</label>
</div>
<div>
<label for="message">
<span class="required">Message: *</span>
<textarea id="message" name="message" placeholder="Please write your message here." tabindex="5" required="required"></textarea>
</label>
</div>
<div>
<button name="submit" type="submit" id="submit" >SEND</button>
</div>
</form>
</div>
-->
.container {
margin-top: 20px;
margin-bottom: 20px;
/**border: 1px solid #000000;**/
height: 100%;
width: auto;
}
.About-Me {
background-color: #0099ff;
border-radius: 20px;
box-shadow: inset 0px 5px 20px 0px #000;
width: auto;
position: relative;
}
.glass{
width: 100%;
height: 50%;
/*background-color: rgb(255,255,255,0.2);*/
background: rgba(113,206,239,0.41);
background: -webkit-linear-gradient(top, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
background: -o-linear-gradient(top, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
background: -ms-linear-gradient(top, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
background: linear-gradient(to bottom, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#71ceef', endColorstr='#b7deed', GradientType=0 );
/* for the following elements, rgba(183,222,237,0.41) 78%, 78% was changed to 100% */
position: absolute;
top: 0;
/*border-radius: 20px;*/
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
div h3{
/*border: 1px solid black;*/
margin-top: 25px;
}
h1 {
color: #ffffff
}
h2{
color: #ffffff;
}
h4 {
color: #ffffff
}
#top{
padding-top: 8px;
margin-left: 10px;
float: left;
}
#bottom{
float: right;
margin-right: 10px;
padding-top: 8px;
}
.img-responsive{
border-radius: 25px;
}
#top{
margin-top: 10px;
}
#bottom{
margin-bottom: 10px;
}
/*.col-md-4{
border: 1px solid black;
}
*/
.dropbtn {
background-color: #4CAF50;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
border: 1px dashed black;
}
.dropdown-content a:hover {background-color: #00ffff}
.dropdown:hover .dropdown-content {
display: block;
background-color: #f1f1f1;
}
/*.dropdown:hover .dropbtn {
background-color:
}*/
.dropdown {
position: relative;
display: inline-block;
}
.myButton {
width: 250px;
height: 40px;
line-height: 1.75em;
-moz-box-shadow:inset 0px 1px 0px 0px #bbdaf7;
-webkit-box-shadow:inset 0px 1px 0px 0px #bbdaf7;
box-shadow:inset 0px 1px 0px 0px #bbdaf7;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #378de5));
background:-moz-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-webkit-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-o-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-ms-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:linear-gradient(to bottom, #79bbff 5%, #378de5 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#378de5',GradientType=0);
background-color:#79bbff;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #84bbf3;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:15px;
font-weight:bold;
padding:6px 24px;
text-decoration:none;
text-shadow:0px 1px 0px #528ecc;
box-shadow: 7px 7px 15px black;
}
.myButton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #378de5), color-stop(1, #79bbff));
background:-moz-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:-webkit-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:-o-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:-ms-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:linear-gradient(to bottom, #378de5 5%, #79bbff 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#378de5', endColorstr='#79bbff',GradientType=0);
background-color:#378de5;
}
.myButton:active {
position:relative;
top:1px;
}
#tell-state{
position: relative;
border: 1px solid black;
}
.green{
position: absolute;
left: 35px;
top: 15px;
height: 10px;
width: 10px;
background-color: green;
border-radius: 50%
}
.glow-green{
background-color: #0cff00;
box-shadow: -1px 0px 15px 7px #0cff00;
}
.red{
position: absolute;
left: 160px;
top: 15px;
height: 10px;
width: 10px;
background-color: #aa0101;
border-radius: 50%
}
.glow-red{
background-color: #ff3200;
box-shadow: -1px 0px 15px 7px #ff3200;
}
.background-image {
/*border: 1px solid black;*/
background: url(https://s25.postimg.cc/feof9a75b/sputnik_660x440.jpg);
background-repeat: no-repeat;
Height: 440px;
background-size: contain;
background-position: center;
}
.About-Me {
margin-bottom: 10px;
}
#buttons{
/*border: 1px solid black;*/
}
.col-xs-4 {
margin-top: 20px;
}
.background-image {
margin-top: 10px;
margin-bottom: 10px;
}
.col-xs-4 {
margin-left: auto;
margin-right: auto;
}
.holder {
max-width: 500px;
overflow: hidden;
position: relative;
height: 300px;
margin: auto;
}
div.Portfolio.Pics {
width: 3000px;
position: absolute;
overflow: hidden;
}
figure {
width:500px;
float:none;
overflow:hidden;
}
.Portfolio.Pics figure{
overflow: hidden;
height: 500px;
}
.Portfolio.Pics figure img{
width: 100%
float: left;
opacity: 0.65;
margin-top: 10px;
}
figure{
position: relative;
width: 100%;
margin: 0;
left: 0;
animation: 20s portfolio infinite;
cursor: pointer;
}
@keyframes portfolio {
0%{
left: -100%;
}
25%{
left:-50%;
}
50%{
left:-75%;
}
100%{
right:100%;
}
}
figure:hover {
-webkit-animation-play-state:paused;
animation-play-state:paused;
}
.contact-holder{
margin-top: 20px;
margin-bottom: 20px;
height: auto;
}
#contact-form {
background-color: white;
text-align: center;
position: relative;
height: auto;
}
* {
box-sizing:border-box;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-font-smoothing:antialiased;
-moz-font-smoothing:antialiased;
-o-font-smoothing:antialiased;
font-smoothing:antialiased;
text-rendering:optimizeLegibility;
}
/* Contact Form Styles */
h1 {
margin: 10px 0 0 0;
}
h4{
margin: 0 0 20px 0;
}
#contact-form {
background-color:#0099ff;
padding: 10px 20px 30px 20px;
width:500px;
position: relative;
border-radius:20px;
color: hsl(210, 100%, 40%);
text-shadow: hsla(210,100%,20%,.3) 0 -1px 0, hsl(210,100%,85%) 0 2px 1px, hsla(200,100%,80%,1) 0 0 5px, hsla(210,100%,50%,.6) 0 0 20px;
}
#contact-form input,
#contact-form select,
#contact-form textarea,
#contact-form label {
font-size: 15px;
margin-bottom: 2px;
font-family: Arial, san-serif;
}
#contact-form input,
#contact-form select,
#contact-form textarea {
width:100%;
background: #fff;
border: 0;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
margin-bottom: 25px;
padding: 5px;
}
#contact-form textarea {
width:100%;
height: 150px;
}
#contact-form button[type="submit"] {
cursor:pointer;
width:100%;
border:none;
background:#e17f3f;
margin:0 0 5px;
padding:10px;
border-radius:5px;
}
#contact-form button[type="submit"]:hover {
background-color:#79bbff ;
color: #e17f3f;
font-size: 1.5em;
}
#contact-form button[type="submit"]:active {
box-shadow:inset 0 1px 3px rgba(0,0,0,1);
color: #e17f3f;
}
input:required, textarea:required {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
}
#contact-form .required {
font-weight:bold;
color: #E5E6E7;
}
/* Hide success/failure message
(especially since the php is missing) */
#failure, #success {
color: #6EA070;
display:none;
}
div h2{
font-family: digital-7, sans-serif;
font-size: 3em;
/*border: 3px solid red;*/
}
.social-media-icon-footer{
width:500px;
background-color:white;
color: #0099ff;
height:80px;
border: 1px solid black;
border-radius: 15px;
text-align: center;
box-shadow:
inset hsla(210,100%,100%,.7) 0 2px 1px 7px, /* top HL */
hsla(210,100%,75%, .8) 0 0px 3px 2px, /* outer SD */
hsla(210,50%,40%, .35) 0 -5px 6px 4px, /* outer SD */
hsla(210,80%,95%, 1) 0 5px 6px 4px; /* outer HL (blue LED ) */
}
.link-button-holder > a {
display: inline-table;
cursor: pointer;
text-decoration: none;
height: 100%;
width:100%;
}
.link-button-holder > a > h1 {
margin: 0 auto;
display: table-cell;
vertical-align: middle;
color: #f7f8f8;
font-size: 12px;
font-family: cabinregular;
text-align: center;
}
div.contact {
padding: 0px;
margin-top:-20px;
/**background-color: black;**/
}
ul.soc {
list-style-type: none;
padding: 0px;
margin: 0px;
position: relative;
text-align: center;
width: 100%;
}
ul.soc li {
display: inline-block;
}
li.socbutton a {
background-color: #0099ff;
border: 1px solid white;
border-radius: 10px;
color: white;
text-decoration: none;
text-shadow: 2px 2px black;
font-size: 12px;
margin: 5px;
padding: 5px;
box-shadow: 7px 7px 5px black;
width: 300px;
}
body {
color: #C0C0C0;
font-family: Arial, san-serif;
}
/* Make form look nice on smaller screens */
@media(min-width: 500px) {
.myButton {
margin-bottom: 15px;
width: 100%;
}
}
@media(min-width: 615px) {
.myButton {
width: 100px;
}
}
@media(max-width: 615px) {
.myButton {
width: 100px;
}
}
@media only screen and (min-width:800px) {
.myButton{
width: 200px;
}
}
@media only screen and (max-width: 900px){
.myButton{
width: 200px;
}
}
@media only screen and (max-width: 500px) { /* anything less than 500px (or *501px and up will be regular) */
div h2{
font-size: 2em;
}
#buttons{
margin-top: 50px;
}
.myButton
.dropbtn{
width: 100%;
}
#portfolio{
/*border: 1px solid black;*/
}
#contact-form{
left: 3%;
margin-right: 3%;
width: 88%;
margin-left: 0;
padding-left: 3%;
padding-right: 3%;
}
.myButton {
margin-bottom: 15px;
}
.social-media-icon-footer{
width:100%;
height: 100%;
}
ul.soc li {
width: 100%;
}
.socbutton{
/*border: 1px solid black;*/
margin: 7px;
}
#top,
#bottom
{
width: 250px;
}
}
var url = window.location.href;
console.log(url);
if( url.indexOf('#') < 0 ) {
window.location.replace(url + "#");
} else {
window.location.replace(url);
}
//part 1: add two lights to "portfolio" button that operates based on status of animation
//part 2: make red light blink while mouse is over contents of "Portfolio" button drop-down menu
/*part 1*/
var showcase = document.querySelector("figure");
showcase.addEventListener("mouseover", function(){
$(".red").addClass("glow-red");
$(".green").removeClass("glow-green"); });
showcase.addEventListener("mouseout", function(){
$(".red").removeClass("glow-red");
$(".green").addClass("glow-green");
});
/*part 2*/
var dropdown = document.querySelector('.dropdown-content');
dropdown.addEventListener('mouseenter', blinking);
dropdown.addEventListener('mouseleave', stopBlinking);
let isBlinking = false;
var element = $(".red");
function blinking() {
if (!isBlinking) {
isBlinking = true;
var shown = true;
var element = $(".red").addClass("glow-red");
interval = setInterval(toggle, 100);
function toggle() {
if (shown) {
element.hide();
shown = false;
} else {
element.show();
shown = true;
}
}
}
}
function stopBlinking() {
var element = $(".red").removeClass("glow-red");
clearInterval(interval)
isBlinking = false;
element.show()
}
Also see: Tab Triggers