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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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-custom fixed-top navbar-expand-lg navbar-dark navbar-dark-custom bg-dark-custom navbar-js">
  <div class="container">
    <a class="navbar-brand navbar-brand-custom scroll-js" href="#masthead">Vito</a>
    <button class="navbar-toggler navbar-toggler-custom" data-toggle="collapse" data-target="#navbarSupportedContent" type="button" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      Menu <i class="fa fa-bars"></i>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto">
        <li class="nav-item">
          <a class="nav-link scroll-js" href="#work">Work</a>
        </li>
        <li class="nav-item">
          <a class="nav-link scroll-js" href="#skills">Skills</a>
        </li>
        <li class="nav-item">
          <a class="nav-link scroll-js" href="#contact">Contact</a>
        </li>
      </ul>
    </div>
  </div>
</nav>

<header class="d-flex align-items-center masthead" id="masthead">
  <div class="container text-white-custom text-shadow text-center">
    <h1 class="anim-first-seq anim-first-seq-js mb-4">Looking for a Front End Developer?<br><small class="text-primary-custom anim-first-seq anim-first-seq-js">Luck is on your side!</small></h1>
    <a class="btn btn-custom btn-outline-primary btn-outline-primary-custom btn-xl scroll-js anim-first-seq anim-first-seq-js" href="#work">Check out my work</a>
  </div>
</header>

<section class="bg-white-custom text-dark-custom" id="work">
  <div class="container">
    <h2 class="text-center">My Work</h2>
    <hr class="mb-5">
    <div class="row mb-3">
      <div class="col-md-7">
        <a class="link-image" href="https://codepen.io/webmastervito/full/ygxGEW" target="_blank" rel="noopener noreferrer">
          <img class="img-fluid rounded anim-second anim-second-js mb-3 mb-md-0" src="https://bit.ly/2jnp0UK" alt="Tribute Page project on different devices.">
        </a>
      </div>
      <div class="col-md-5">
        <h3>Tribute Page</h3>
        <p>Project created for freeCodeCamp curriculum.<br>
          Main technologies used: <strong class="text-primary-custom">HAML</strong> and <strong class="text-primary-custom">Bootstrap 4</strong>.</p>
        <a class="btn btn-custom btn-secondary btn-secondary-custom" href="https://codepen.io/webmastervito/full/ygxGEW" target="_blank" rel="noopener noreferrer">View Project</a>
      </div>
    </div>
    <div class="row mb-3">
      <div class="col-md-7">
        <a class="link-image" href="https://codepen.io/webmastervito/full/jyXQKW" target="_blank" rel="noopener noreferrer">
          <img class="img-fluid rounded anim-second anim-second-js mb-3 mb-md-0" src="https://bit.ly/2xZnkU8" alt="Random Quote Machine project on different devices.">
        </a>
      </div>
      <div class="col-md-5">
        <h3>Random Quote Machine</h3>
        <p>Project created for freeCodeCamp curriculum.<br>
          Main technologies used: <strong class="text-primary-custom">Bootstrap 4</strong>, <strong class="text-primary-custom">Sass</strong>, <strong class="text-primary-custom">Animate.css</strong> and <strong class="text-primary-custom">jQuery</strong>.</p>
        <a class="btn btn-custom btn-secondary btn-secondary-custom" href="https://codepen.io/webmastervito/full/jyXQKW" target="_blank" rel="noopener noreferrer">View Project</a>
      </div>
    </div>
    <div class="row mb-3">
      <div class="col-md-7">
        <a class="link-image" href="https://codepen.io/webmastervito/full/WOyreV" target="_blank" rel="noopener noreferrer">
          <img class="img-fluid rounded anim-second anim-second-js mb-3 mb-md-0" src="https://bit.ly/2h1TIC2" alt="Local Weather App project on different devices.">
        </a>
      </div>
      <div class="col-md-5">
        <h3>Local Weather App</h3>
        <p>Project created for freeCodeCamp curriculum.<br>
          Main technologies used: <strong class="text-primary-custom">Bootstrap 4</strong>, <strong class="text-primary-custom">Sass</strong> and <strong class="text-primary-custom">jQuery</strong>.</p>
        <a class="btn btn-custom btn-secondary btn-secondary-custom" href="https://codepen.io/webmastervito/full/WOyreV" target="_blank" rel="noopener noreferrer">View Project</a>
      </div>
    </div>
    <div class="row mb-3">
      <div class="col-md-7">
        <a class="link-image" href="https://codepen.io/webmastervito/full/dRjZRM" target="_blank" rel="noopener noreferrer">
          <img class="img-fluid rounded anim-second anim-second-js mb-3 mb-md-0" src="https://bit.ly/2h2UIpy" alt="Wikipedia Viewer project on different devices.">
        </a>
      </div>
      <div class="col-md-5">
        <h3>Wikipedia Viewer</h3>
        <p>Project created for freeCodeCamp curriculum.<br>
          Main technologies used: <strong class="text-primary-custom">Sass</strong>, <strong class="text-primary-custom">React</strong> and <strong class="text-primary-custom">SuperAgent</strong>.</p>
        <a class="btn btn-custom btn-secondary btn-secondary-custom" href="https://codepen.io/webmastervito/full/dRjZRM" target="_blank" rel="noopener noreferrer">View Project</a>
      </div>
    </div>
    <div class="row mb-3">
      <div class="col-md-7">
        <a class="link-image" href="https://codepen.io/webmastervito/full/QqOeBg" target="_blank" rel="noopener noreferrer">
          <img class="img-fluid rounded anim-second anim-second-js mb-3 mb-md-0" src="https://bit.ly/2z7T8HA" alt="Calculator project on different devices.">
        </a>
      </div>
      <div class="col-md-5">
        <h3>Calculator</h3>
        <p>Project created for freeCodeCamp curriculum.<br>
          Main technologies used: <strong class="text-primary-custom">Sass</strong>, <strong class="text-primary-custom">React</strong> and <strong class="text-primary-custom">Math.js</strong>.</p>
        <a class="btn btn-custom btn-secondary btn-secondary-custom" href="https://codepen.io/webmastervito/full/QqOeBg" target="_blank" rel="noopener noreferrer">View Project</a>
      </div>
    </div>
    <div class="row">
      <div class="col-md-7">
        <a class="link-image" href="https://codepen.io/webmastervito/full/QqmXVJ" target="_blank" rel="noopener noreferrer">
          <img class="img-fluid rounded anim-second anim-second-js mb-3 mb-md-0" src="https://bit.ly/2gcSeoz" alt="Pomodoro Clock project on different devices.">
        </a>
      </div>
      <div class="col-md-5">
        <h3>Pomodoro Clock</h3>
        <p>Project created for freeCodeCamp curriculum.<br>
          Main technologies used: <strong class="text-primary-custom">PostCSS&nbsp;(cssnext)</strong> and <strong class="text-primary-custom">React</strong>.</p>
        <a class="btn btn-custom btn-secondary btn-secondary-custom" href="https://codepen.io/webmastervito/full/QqmXVJ" target="_blank" rel="noopener noreferrer">View Project</a>
      </div>
    </div>
  </div>
</section>

<section class="bg-primary-custom text-white-custom text-center" id="skills">
  <div class="container">
    <h2>My Skills</h2>
    <hr class="light mb-5">
    <div class="row">
      <div class="col-lg-10 mx-auto">
        <table class="table table-bordered table-hover">
          <thead class="thead-light">
            <tr>
              <th class="text-center text-dark-custom">Name</th>
              <th class="text-center text-dark-custom">Proficiency</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>HTML</td>
              <td data-score="4.5" data-max-score="5">4.5/5</td>
            </tr>
            <tr>
              <td>CSS</td>
              <td data-score="4.5" data-max-score="5">4.5/5</td>
            </tr>
            <tr>
              <td>Sass</td>
              <td data-score="4" data-max-score="5">4/5</td>
            </tr>
            <tr>
              <td>Bootstrap</td>
              <td data-score="4.5" data-max-score="5">4.5/5</td>
            </tr>
            <tr>
              <td>JavaScript (ES5)</td>
              <td data-score="4.5" data-max-score="5">4.5/5</td>
            </tr>
            <tr>
              <td>JavaScript (ES6)</td>
              <td data-score="4" data-max-score="5">4/5</td>
            </tr>
            <tr>
              <td>jQuery</td>
              <td data-score="4" data-max-score="5">4/5</td>
            </tr>
            <tr>
              <td>React</td>
              <td data-score="3.5" data-max-score="5">3.5/5</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</section>

<section class="bg-white-custom text-dark-custom" id="contact">
  <div class="container">
    <h2 class="text-center">Contact Me</h2>
    <hr class="mb-5">
    <div class="row">
      <div class="col-lg-8 mx-auto">
        <form name="sentMessage" id="contactForm" novalidate>
          <div class="control-group">
            <div class="form-group">
              <label>Name</label>
              <input class="form-control form-control-custom" id="name" type="text" placeholder="Name" required data-validation-required-message="Please enter your name.">
              <p class="text-danger"></p>
            </div>
          </div>
          <div class="control-group">
            <div class="form-group">
              <label>Email Address</label>
              <input class="form-control form-control-custom" id="email" type="email" placeholder="Email Address" required data-validation-required-message="Please enter your email address.">
              <p class="text-danger"></p>
            </div>
          </div>
          <div class="control-group">
            <div class="form-group">
              <label>Phone Number</label>
              <input class="form-control form-control-custom" id="phone" type="tel" placeholder="Phone Number" required data-validation-required-message="Please enter your phone number.">
              <p class="text-danger"></p>
            </div>
          </div>
          <div class="control-group">
            <div class="form-group">
              <label>Message</label>
              <textarea class="form-control form-control-custom" id="message" rows="5" placeholder="Message" required data-validation-required-message="Please enter a message."></textarea>
              <p class="text-danger"></p>
            </div>
          </div>
          <br>
          <div id="success"></div>
          <div class="form-group">
            <button class="btn btn-custom btn-primary btn-primary-custom btn-lg" id="sendMessageButton" type="submit">Send</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</section>

<footer class="text-white-custom text-center">
  <div class="footer-top bg-secondary-custom">
    <div class="container">
      <ul class="list-inline mb-0">
        <li class="list-inline-item mr-4">
          <a class="link-primary" href="https://www.freecodecamp.org/webmastervito" title="freeCodeCamp" target="_blank" rel="noopener noreferrer">
            <i class="fa fa-free-code-camp fa-2x anim-fourth-seq anim-fourth-seq-js"></i>
          </a>
        </li><!--
        --><li class="list-inline-item mr-4">
          <a class="link-primary" href="https://codepen.io/webmastervito" title="CodePen" target="_blank" rel="noopener noreferrer">
            <i class="fa fa-codepen fa-2x anim-fourth-seq anim-fourth-seq-js"></i>
          </a>
        </li><!--
        --><li class="list-inline-item">
          <a class="link-primary" href="https://github.com/webmastervito" title="GitHub" target="_blank" rel="noopener noreferrer">
            <i class="fa fa-github fa-2x anim-fourth-seq anim-fourth-seq-js"></i>
          </a>
        </li>
      </ul>
    </div>
  </div>
  <div class="footer-bottom bg-dark-custom">
    <div class="container">
      <p>Designed and coded by <a class="link-primary" href="https://www.freecodecamp.org/webmastervito" target="_blank" rel="noopener noreferrer">Vito</a>.</p>
    </div>
  </div>
</footer>

              
            
!

CSS

              
                // ========================================
// Functions
// ========================================

@function color($key: 'primary') {
  @return map-get($colors, $key);
}

@function color-yiq($color) {
  $r: red($color);
  $g: green($color);
  $b: blue($color);

  $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;

  @if ($yiq >= 150) {
    @return color('black');
  } @else {
    @return color('white');
  }
}

// ========================================
// Variables
// ========================================

$colors: (
  'primary': #1abc9c,
  'secondary': #323a45,
  'light': #626b74,
  'dark': #23282f,
  'white': #fff,
  'black': #111
);

$btn-colors: (
  'primary': #1abc9c,
  'secondary': #626b74
);

// ========================================
// Reset
// ========================================

a[href^='#'] {
  cursor: default;
}

a:focus,
a:hover,
.navbar-toggler:focus,
.navbar-toggler:hover, {
  outline: none;
}

::selection {
  background-color: color('secondary');
  color: color('white');
  text-shadow: none;
}

img::selection {
  background-color: transparent;
  color: color('white');
}

// ========================================
// Typography
// ========================================

html {
  font-size: 16px;
}

body {
  font-family: 'Fira Sans', sans-serif;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6,
th {
  font-family: 'Droid Serif', serif;
}

.navbar-brand-custom {
  font-family: 'Marck Script', cursive;
  font-size: 2rem;
}

.navbar-small .navbar-brand {
  font-size: 1.5rem;
}

// ========================================
// Custom styles
// ========================================

// ScrollReveal
.sr .anim-first-seq,
.sr .anim-second,
.sr .anim-third-seq,
.sr .anim-fourth-seq {
  visibility: hidden;
}

// Header
.masthead {
  background: url(https://bit.ly/2kOGMkv) center bottom / cover no-repeat color('white');
  min-height: 100vh;
}

// Sections
section {
  padding-bottom: 5rem;
  padding-top: 5rem;
}

@media (min-width: 768px) {
  section {
    padding-bottom: 10rem;
    padding-top: 10rem;
  }
}

// Footer
.footer-top {
  border-top: 0.3125rem solid color('primary');
  padding-bottom: 5rem;
  padding-top: 5rem;
}

.footer-bottom p {
  margin-bottom: 0;
}

// Links
.link-primary {
  color: color('primary');

  &:hover {
    color: lighten(color('primary'), 15%);
    text-decoration: none;
  }
}

.link-image:hover {
  opacity: 0.7;
}

a,
.navbar-custom,
.navbar-toggler-custom {
  transition: all 0.15s ease-in-out;
}

// Others
hr {
  border-color: color('primary');
  border-width: 0.15rem;
  max-width: 12rem;
}

hr.light {
  border-color: color('white');
}

// ========================================
// Forms
// ========================================

.form-control-custom {
  box-shadow: inset 0 0.0625rem 0.0625rem rgba(color('black'),0.075);

  &:focus {
    border-color: lighten(color('primary'), 25%);
    box-shadow: inset 0 0.0625rem 0.0625rem rgba(color('black'),0.075), 0 0 0 0.1875rem rgba(color('primary'),0.25);
  }
}

// ========================================
// Buttons
// ========================================

.btn-custom {
  &:focus,
  &.focus {
    box-shadow: 0 0 0 0.1875rem rgba(color('primary'),0.25);
  }

  &:active,
  &.active {
    box-shadow: 0 0 0 0.1875rem rgba(color('primary'),0.25), inset 0 0.1875rem 0.3125rem rgba(color('black'),0.125);
  }
}

@each $color, $value in $btn-colors {
  .btn-#{$color}-custom {
    background-color: $value;
    border-color: $value;
    box-shadow: inset 0 0.0625rem 0 rgba(color('white'),0.15), 0 0.0625rem 0.0625rem rgba(color('black'),0.075);
    color: color-yiq($value);

    &:hover {
      background-color: darken($value, 7.5%);
      border-color: darken($value, 10%);
      color: color-yiq($value);
    }

    &:focus,
    &.focus {
      box-shadow: inset 0 0.0625rem 0 rgba(color('white'),0.15), 0 0.0625rem 0.0625rem rgba(color('black'),0.075), 0 0 0 0.1875rem rgba($value,0.5);
    }

    &.disabled,
    &:disabled {
      background-color: $value;
      border-color: $value;
    }

    &:not([disabled]):not(.disabled):active,
    &:not([disabled]):not(.disabled).active,
    .show > &.dropdown-toggle {
      background-color: darken($value, 7.5%);
      border-color: darken($value, 10%);
      box-shadow: inset 0 0.1875rem 0.3125rem rgba(color('black'),0.125);
    }
  }
}

@each $color, $value in $btn-colors {
  .btn-outline-#{$color}-custom {
    border-color: $value;
    color: $value;

    &:hover {
      background-color: $value;
      border-color: $value;
    }

    &:focus,
    &.focus {
      box-shadow: 0 0 0 0.1875rem rgba($value,0.5);
    }

    &.disabled,
    &:disabled {
      color: $value;
    }

    &:not([disabled]):not(.disabled):active,
    &:not([disabled]):not(.disabled).active,
    .show > &.dropdown-toggle {
      background-color: $value;
      border-color: $value;
      box-shadow: 0 0 0 0.1875rem rgba($value,0.5);
    }
  }
}

.btn-xl {
  border-radius: 10rem;
  border-width: 0.2rem;
  font-size: 1.5rem;
  padding: 0.75rem 1.25rem;
}

// ========================================
// Navbar
// ========================================

.navbar-small {
  padding-bottom: 0;
  padding-top: 0;
  text-shadow: none;
}

.navbar-dark-custom {
  .navbar-brand {
    color: color('white');

    &:focus,
    &:hover {
      color: color('primary');
    }
  }

  .navbar-nav {
    .nav-link {
      color: color('white');

      &:focus,
      &:hover {
        color: rgba(color('primary'),0.75);
      }
    }

    .show > .nav-link,
    .active > .nav-link,
    .nav-link.show,
    .nav-link.active {
      color: color('primary');
    }
  }

  .navbar-toggler {
    color: color('white');
    border-color: rgba(color('white'),0.5);

    &:focus,
    &:hover {
      color: rgba(color('primary'),0.75);
      border-color: rgba(color('primary'),0.5);
    }
  }

  .navbar-text {
    color: color('white');
  }
}

// ========================================
// Utilities
// ========================================

@each $color, $value in $colors {
  .bg-#{$color}-custom {
    background-color: $value;
  }

  a.bg-#{$color}-custom {
    &:focus,
    &:hover {
      background-color: darken($value, 10%);
    }
  }

  .text-#{$color}-custom {
    color: $value;
  }

  a.text-#{$color}-custom {
    &:focus,
    &:hover {
      color: darken($value, 10%);
    }
  }
}

.text-shadow {
  text-shadow: 0.1rem 0.1rem 0 rgba(color('black'),0.6);
}

              
            
!

JS

              
                (function ($) {
  $('html').removeClass('no-js');

  // Scrollspy
  $('body').scrollspy({
    target: '.navbar-js',
    offset: 46,
  });
  
  // A11y
  let activeItem = null;
  $(window).on("activate.bs.scrollspy", function() {
    $(activeItem).html((i, origHtml) => origHtml.replace(' <span class="sr-only">(current)</span>', ''));
    activeItem = $('.navbar-js .active');
    $(activeItem).html((i, origHtml) => `${origHtml} <span class="sr-only">(current)</span>`);
  });

  // Smooth Scrolling
  $('a.scroll-js[href*="#"]:not([href="#"])').click(function () {
    if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
      let target = $(this.hash);
      target = target.length ? target : $(`[name="${this.hash.slice(1)}"]`);
      if (target.length) {
        $('html, body').animate({
          scrollTop: (target.offset().top - 45),
        }, 1000, 'easeInOutExpo');
        return false;
      }
    }
  });

  // Hiding a navbar after click in small viewports
  $('.scroll-js').click(() => {
    $('.navbar-collapse').collapse('hide');
  });

  // Shrinking a navbar after scrolling certain amount of pixels
  $(window).scroll(() => {
    if ($('.navbar-js').offset().top > 200) {
      $('.navbar-js').addClass('navbar-small');
    } else {
      $('.navbar-js').removeClass('navbar-small');
    }
  });

  // Star icons magic
  $('td[data-score]').html(function () {
    const score = Number($(this).attr('data-score'));
    const maxScore = Number($(this).attr('data-max-score'));
    const fullStars = Math.floor(score);
    const halfStar = score !== fullStars;
    const emptyStars = maxScore - Math.ceil(score);

    return (
      new Array(fullStars + 1).join('<i class="fa fa-star anim-third-seq anim-third-seq-js"></i>') +
      (halfStar ? '<i class="fa fa-star-half-o anim-third-seq anim-third-seq-js"></i>' : '') +
      new Array(emptyStars + 1).join('<i class="fa fa-star-o anim-third-seq anim-third-seq-js"></i>')
    );
  });

  // ScrollReveal animations
  sr.reveal('.anim-first-seq-js', { distance: '100vh', duration: 1000, delay: 1000 }, 700);
  sr.reveal('.anim-second-js', { origin: 'left', distance: '50vw', duration: 500, viewFactor: 0.5 });
  sr.reveal('.anim-third-seq-js', { origin: 'top', distance: '40px', duration: 700, scale: 0.9 }, 70);
  sr.reveal('.anim-fourth-seq-js', { distance: 0, duration: 1000, scale: 2 }, 500);
}(jQuery));

              
            
!
999px

Console