Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

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.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <nav class="navbar navbar-inverse" id="myTopNav">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">JM</a>
    </div>
    <ul class="nav navbar-nav">
      <li class="active"><a href="#welcome-section" onclick="goToAchor("welcome-section")">About</a></li>
      <li><a href="#p2" onclick="goToAnchor("p2")">Portfolio</a></li>
      <li><a href="#p3" onclick="goToAnchor("p3")">Contact</a></li>
    </ul>
  </div>
</nav>
<h1 style="color: DodgerBlue; text-align: left; font-size: 70px; font-family: Fantasy; border-style: solid; display: inline; ">Jazmine Mayberry</h1>
<img src="https://github.com/jazd-1/pictures/blob/master/015.JPG?raw=true" target="_blank" id="img1">
<div class="overlay"></div>
<h1 id="welcome-section" style="color:white; font-size:20px; margin-bottom: 800px;">There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</h1>
<h2 style= Portfolio</h2>
<p id="p2"><img src="https://github.com/jazd-1/pictures/blob/master/HTML_certificate.jpg?raw=true" target="_blank" id="img2">
  <img src="https://github.com/jazd-1/pictures/blob/master/CSS_certificate.jpg?raw=true" target="_blank" id="img3">
  <img src="https://github.com/jazd-1/pictures/blob/master/JavaScript_certificate.jpg?raw=true" target="_blank" id="img4">
</p>
<p id="p3" style="color:white; font-size:20px; margin-bottom: 800px;">There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://www.linkedin.com/in/jazmine-mayberry-0872a852/" target="_blank" class="fa fa-linkedin" style="color: white; font-size: 30px; border-style: solid; border-radius: 50px; padding: 10px;"></a>
<div class="row">
<div class="col-xs-8"><fieldset> 
  <form type="text" onsubmit="sendEmail(event)">  <legend>Contact Form</legend> 
     <div id="alert-field" class="alert hidden">
      <p>Uh oh! Something went wrong!</p>
    </div>    
    <div class="form-group col-xs-6">
      <label for="name-field">Name</label>
      <input type="text" class="form-control" id="name-field" name="name-field" placeholder="Your name" required>
    </div>
    
    <div class="form-group col-xs-4">
      <label for="email-field">Email</label>
      <input type="email" class="form-control" id="email-field" name="email-field" placeholder="Email address" required>
      <label for="phone-field">Phone</label> <input type="phone" class="form-control" id="phone-field" name="phone-field" placeholder="Phone" required>
    </div>
    
    <div id="subject-select" class="form-group col-xs-12">
      <label for="subject-field">Subject</label>
      <select class="form-control" name="subject-field" onchange="changeSubject(event)"  required>
        <option value="Kudos">#Love your page!</option>
        <option value="Questions"> Questions</option>
        <option value="Recommendations">Recommendations</option>
        <option value="Other">Other</option>
      </select>
    </div>
    
    <div id="hidden-other-subject" class="form-group col-xs-6 hidden">
      <label for="other-subject-field">Other</label>
      <input type="text" class="form-control" id="other-subject-field" name="other-subject-field" placeholder="Other subject" />
    </div>
    
    <div class="form-group col-xs-12">
      <label for="body-field">Message</label>
      <textarea id="body-field" name="body-field" class="form-control" placeholder="Type your message here" required></textarea>
    </div>
    
    <div class="form-group col-xs-12">
      <button type="submit" class="btn btn-primary btn-lg btn-block">Submit</button>  
    </div>
    
  </form>
</div></fieldset>
  </div>
</div>


              
            
!

CSS

              
                
body{
background:
url("https://github.com/jazd-1/pictures/blob/master/IMG_20180311_155154.jpg?raw=true") no-repeat scroll top, url("https://github.com/jazd-1/Codepen-Projects-pic/blob/master/IMG_20180311_153223.jpg?raw=true") no-repeat scroll center,
url("https://github.com/jazd-1/Codepen-Projects-pic/blob/master/Github/IMG_20180311_125029%20(1).jpg?raw=true") no-repeat scroll bottom;
background-size: 100% 28%, 100% 45%, 100% 35%;
}

body{
width:200wv;
overflow-y: scroll;
height: max-height;
}

.overlay{
   position: absolute;
  top: -45%;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: rgba(0,0,0,.55)
}

#img1 {
  float: right;
  border-radius: 200px 200px 200px 200px;
  height: 280px;
  width: 280px;
}

li:hover{
  background-color: DodgerBlue;
  
}

#img2{
  height: 25%;
  width: 25%;
  padding: 5px 5px 5px 5px;
  
}
#img3{
  height: 25%;
  width: 25%;
  padding: 5px 5px 5px 5px;
  
}
#img4{
  height: 25%;
  width: 25%;
  padding: 5px 5px 5px 5px;
}
#img5{
  height: 50%;
  width: 50%;
  
}


              
            
!

JS

              
                $(function() {
  $('.form-control').focus(formFocus);
});

function formFocus() {
  $('#alert-field')
    .removeClass()
    .addClass('hidden');
}

function sendEmail(e) {
  e.preventDefault();

  const POST_URL = 'https://script.google.com/macros/s/AKfycbw9DtMY7AEZq-Y2jV62gwYHY2lYGcAItZNx62TFpPB0qwTkBp6S/exec';

  const postRequest = {
    name: e.target['name-field'].value,
    email: e.target['email-field'].value,
    subject: e.target['other-subject-field'].value || e.target['subject-field'].value,
    body: e.target['body-field'].value
  };
  
  if(POST_URL) {
    $.post(POST_URL, JSON.stringify(postRequest))
      .then(res => {
      
        e.target.reset();
        $('#alert-field')
          .removeClass()
          .addClass(`alert alert-${res.code}`)
          .text(res.msg);
      });

    $('#alert-field')
      .removeClass()
      .html('<progress></progress>')
      .removeClass('hidden');
  } else {
    alert('You must set the POST_URL variable with your script ID');
  }

}

function changeSubject(e) {
  if(e.target.value === 'Other') {

    $('#subject-select').removeClass('col-xs-12')
      .addClass('col-xs-6');
    $('#hidden-other-subject').removeClass('hidden');
  } else {
    $('#subject-select').removeClass('col-xs-6')
      .addClass('col-xs-12');

    $('#hidden-other-subject').addClass('hidden');
  }
}

















































































































              
            
!
999px

Console