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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 id="header" class="navbar navbar-fixed-top">
  <div id="header-container" class="container navbar-container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
      <a id="brand" class="navbar-brand" href="#">Ben Mantle</a>
    </div>
    <div id="navbar" class="collapse navbar-collapse">
      <ul id="nav-links" class="nav navbar-nav">
        <li><a class="nav-anchor" href="#about">About</a></li>
        <li><a class="nav-anchor" href="#portfolio">Portfolio</a></li>
        <li><a class="nav-anchor" href="#contact">Contact</a></li>
      </ul>
    </div>
  </div>
</nav>

<div class="container">

  <div class="row row-offcanvas row-offcanvas-right">

    <div class="col-xs-12 col-sm-9">
      <p class="pull-right visible-xs">
        <button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">Toggle nav</button>
      </p>
      <div id="about" class="jumbotron">
        <h1>Welcome to my portfolio!</h1>
        <hr>
        <p class="justified">I am a creator. When it comes to giving form to my ideas, I strive meticulously for perfection. I am particularly obsessed with elegant web design and equally fixated on the user experience of my creations. I also enjoy writing, gaming, and numerous facets of East Asian cutlure&mdash;especially Go, the game that completely changed my life.
          <br />
          <br />
          Check out my projects below or visit my <a class="intro-text" href="https://github.com/badduke">Github profile</a>.
          <br />
          For Go coaching, check out <a class="intro-text" href='https://facebook.com/benkyotutoring'>BenKyo Tutoring</a>.
        </p>
      </div>
      <div id="portfolio"><br />
        <h2 id="projects-head" class="section-head">My Projects</h2><hr>
      <div class="row">
        <div class="col-xs-4">
          <h2 class="project-name">Curriculum Vitae</h2>
          <div class="wrapper">
          <a href="#"><img class="img-responsive img-rounded" src="https://i.imgur.com/SsrvVm1.jpg" alt="CV">
          <span class="text-content"><span>View my resume/CV webpage. You can download a copy here.</span></span>
          </a>
          </div>
          <p><a class="btn btn-default view-details" href="#" role="button">View details »</a></p>
        </div>
   
        <div class="col-xs-4">
          <h2 class="project-name">Business Template</h2>
          <div class="wrapper">
          <a href="#"><img class="img-responsive img-rounded" src="https://i.imgur.com/ybZQePZ.jpg" alt="Business Template">
            <span class="text-content"><span>View my general purpose business website template. </span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="#" role="button">View details »</a></p>
        </div>
 
        <div class="col-xs-4">
          <h2 class="project-name">C# Project</h2>
          <div class="wrapper">
          <a href="#"><img class="img-responsive img-rounded" src="https://i.imgur.com/Ir3LJ33.png" alt="C# Project">
            <span class="text-content"><span>View my C# project. Further details currently unavailable.</span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="#" role="button">View details »</a></p>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <h2 class="project-name">T.Baduk</h2>
          <div class="wrapper">
          <a href="http://torontogoclub.org"><img class="img-responsive img-rounded" src="https://i.imgur.com/rRiU3sl.jpg" alt="Go in Toronto">
            <span class="text-content"><span>The ultimate website for Go players looking to play in Toronto. Discover all of Toronto's Go clubs, teachers and resources.</span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="http://torontogoclub.org" role="button">View details »</a></p>
        </div>

        <div class="col-xs-4">
          <h2 class="project-name">BenKyo Tutoring</h2>
          <div class="wrapper">
          <a href="https://facebook.com/benkyotutoring"><img class="img-responsive img-rounded" src="https://i.imgur.com/ZrYDPPO.png" alt="BenKyo Tutoring">
            <span class="text-content"><span>Visit my BenKyo Tutoring business page. View service details, email me, and register.</span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="https://facebook.com/benkyotutoring" role="button">View details »</a></p>
        </div>

        <div class="col-xs-4">
          <h2 class="project-name">Go Player Tribute</h2>
          <div class="wrapper">
          <a href="https://codepen.io/BadDuke/pen/XNNeOB"><img class="img-responsive img-rounded" src="https://i.imgur.com/MZT1bIp.jpg" alt="Lee Chang-ho">
            <span class="text-content"><span>This page is a tribute to the living legend Go player of South Korea, Lee Chang-ho, who dominated Go in the 90's.</span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="https://codepen.io/BadDuke/pen/XNNeOB" role="button">View details »</a></p>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <h2 class="project-name">Visual Novel Game</h2>
          <div class="wrapper">
          <a href="#"><img class="img-responsive img-rounded" src="https://i.imgur.com/luvoNLU.png" alt="Visual Novel Game">
            <span class="text-content"><span>This is my Japanese-style 'visual novel' game, a text- and multimedia-heavy RPG.</span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="#" role="button">View details »</a></p>
        </div>

        <div class="col-xs-4">
          <h2 class="project-name">Who's Rem?</h2>
          <div class="wrapper">
          <a href="#"><img class="img-responsive img-rounded" src="https://i.imgur.com/VNaEOH8.jpg" alt="Re:Zero Rem">
            <span class="text-content"><span>A tribute to Rem, arguably the most widely beloved character of the 2016 hit anime "Re:Zero."</span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="#" role="button">View details »</a></p>
        </div>
        
        <div class="col-xs-4">
          <h2 class="project-name">Fate Tribute</h2>
          <div class="wrapper">
          <a href="#"><img class="img-responsive img-rounded" src="https://i.imgur.com/weA55ob.jpg" alt="Fate Series">
            <span class="text-content"><span>Another anime tribute, this is a Fate series fanpage featuring a scroll-based infographic that demystifies the entire story plot.</span></span>
            </a>
          </div>
          <p><a class="btn btn-default view-details" href="#" role="button">View details »</a></p>
        </div>
      </div>
    </div>
</div>

    <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">
      <div class="list-group">
        <a href="http://senseis.xmp.net/?benmantle" class="list-group-item ">More About Me</a>
        <a href="https://github.com/badduke" class="list-group-item">Github</a>
        <a href="https://ca.linkedin.com/in/benmantle" class="list-group-item">LinkedIn</a>
        <a href="https://facebook.com/benkyotutoring" class="list-group-item">BenKyo Tutoring</a>
        <a href="http://torontogoclub.org" class="list-group-item">Baduk in Toronto</a>
        <a href="http://senseis.xmp.net" class="list-group-item">What is Go (Baduk)?</a>
        <a href="#" class="list-group-item">Blog</a>
        <a href="https://twitter.com/bktutoring" class="list-group-item">Twitter</a>
        <a href="#" class="list-group-item">Youtube</a>
        <a href="https://facebook.com/goplayer" class="list-group-item">Facebook</a>
        <a href="https://freecodecamp.com" class="list-group-item">FreeCodeCamp</a>
      </div>
    </div>
  </div>
  <br />
  <br />
  <br />
   <div id="contact" class="jumbotron">

            <div class="row">
                <div class="col-lg-8">
                  <h2 class="section-head">Contact Form</h2>
<hr><br />
                    <form id="contact-form" method="post" action="contact.php" role="form">

    <div class="messages"></div>
      <div class="controls">
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="form_name">Firstname *</label>
                    <input id="form_name" type="text" name="name" class="form-control" placeholder="Please enter your firstname" required="required" data-error="Firstname is required.">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label for="form_lastname">Lastname *</label>
                    <input id="form_lastname" type="text" name="surname" class="form-control" placeholder="Please enter your lastname" required="required" data-error="Lastname is required.">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="form_email">Email *</label>
                    <input id="form_email" type="email" name="email" class="form-control" placeholder="Please enter your email" required="required" data-error="Valid email is required.">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label for="form_phone">Phone</label>
                    <input id="form_phone" type="tel" name="phone" class="form-control" placeholder="Please enter your phone number">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label for="form_message">Message *</label>
                    <textarea id="form_message" name="message" class="form-control" placeholder="Message for me" rows="4" required="required" data-error="Please leave a message."></textarea>
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-md-12">
                <input type="submit" class="btn btn-primary btn-send" value="Send message">
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <p class="text-muted">
                  <br />
                  <strong>*</strong> These fields are required.</p>
            </div>
        </div>
    </div>
</form>
                </div>
            </div>
        </div>

  <footer></footer>
              
            
!

CSS

              
                /* Palette: "Corporate and Sleek" */

html,
body {
  overflow-x: hidden;
  /* Prevent scroll on narrow devices */
  padding-top: 70px;
  background-color: #E8E8E8;
  /* "CLEAN" */
}

footer {
  padding: 30px 0;
}

.navbar-brand {
  font-size: 24px;
}

.navbar-container {
  padding: 20px 0 20px 0;
  font-size: 14px;
}

.navbar.navbar-fixed-top.fixed-theme {
  background-color: #333A56;
  /* "VERMILLION" */
  border-color: #080808;
  box-shadow: 0 0 5px rgba(0, 0, 0, .8);
}

.navbar-brand.fixed-theme {
  font-size: 18px;
}

.fixed-theme a {
  color: #F7F5E6 !important; /* FRESH */
}

.fixed-theme .navbar-nav a:hover {
  background: #52658F !important; /* "SUNSHINE" */
}

  
.fixed-theme .navbar-nav a:visited:hover {
  background: #52658F !important; /* "SUNSHINE" */
}

.fixed-theme .navbar-nav a:visited {
  background: #333A56 !important;
  /* "VERMILLION" */
}

.navbar-container.fixed-theme {
  padding: 0;
  font-size: 14px;
}

.navbar-brand.fixed-theme,
.navbar-container.fixed-theme,
.navbar.navbar-fixed-top.fixed-theme,
.navbar-brand,
.navbar-container {
  transition: 0.8s;
  -webkit-transition: 0.8s;
}

.img-responsive {
  padding-bottom: 5px;
  border-radius: 10px 10px 13px 13px;
  
}

.jumbotron {
  background-color: #F7F5E6;
  /* "FRESH" */
}

.justified {
  text-align: justify;
}

.list-group a {
  background: #52658F;
  /* "SUNSHINE" */
  color: #F7F5E6;
  /* "FRESH" */
  border-radius: 6px !important;
}
.list-group a:visited {
  background: #52658F;
  /* "SUNSHINE" */
  color: #F7F5E6;
  /* "FRESH" */
  border-radius: 6px !important;
}

.list-group a:hover {
  background: #333A56;
  /* "VERMILLION" */
  color: #F7F5E6;
  /* "FRESH" */
  font-weight: bold;
}

#brand {
  color: #52658F; /* "SUNSHINE" */
  font-weight: bold;
}

#nav-links a {
  color: #52658F; /* "SUNSHINE" */
  font-weight: bold;
}

#nav-links a:hover {
  background: #F7F5E6; /* "FRESH" */
  border-radius: 6px;
}

#nav-links a:visited {
  color: #52658F; /* "SUNSHINE" */
  font-weight: bold;
  background: #E8E8E8;
  /* "CLEAN" */
}

#nav-links a:visited:hover {
  background: #F7F5E6; /* "FRESH" */
  border-radius: 6px;
}

span.text-content {
  background: rgba(0, 0, 0, 0.7);
  color: #F7F5E6 !important; /* FRESH */
  cursor: pointer;
  display: table;
  height: 150px;
  border-radius: 10px;
  left: 0;
  position: absolute;
  top: 0;
  width: 80%;
  margin-left: 10%;
  margin-top: 26%;
  opacity: 0;
  -webkit-transition: opacity 500ms;
  -moz-transition: opacity 500ms;
  -o-transition: opacity 500ms;
  transition: opacity 500ms;
}

span.text-content span {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  padding: 10px;
}

.wrapper a:hover span.text-content {
  opacity: 1;
}

.view-details {
  background: #F7F5E6; /* "FRESH" */
}

.view-details:hover {
  background: #F7F5E6; /* "FRESH" */
  color: #52658F; /* "SUNSHINE" */
}

.intro-text {
  text-decoration: none;
  color: #333A56; /* "VERMILLION" */
}

.intro-text:hover {
  text-decoration: none;
  color: #52658F; /* "SUNSHINE" */
}

.intro-text:visited {
  color: #333A56; /* "VERMILLION" */
  text-decoration: none;
}

.intro-text:visited:hover {
  text-decoration: none;
  color: #52658F; /* "SUNSHINE" */
}

.section-head {
  font-size: 40px;
}

.btn-primary {
  background: #52658F; /* "SUNSHINE" */
}

#projects-head {
  padding-top: 20px;
  font-size: 40px;
  background: -webkit-linear-gradient(#eee, #333A56);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

hr {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

.project-name {
  font-family: 'Ubuntu', sans-serif;
  font-size: 2.2vw;
}

#about {}
#portfolio {}
#contact {}

/* THINGS TO DO

- Add social media icons
- Add a footer area, fill it, and style it
- Fix collapsed nav visibility
- Add alternate layout and styling aspects for mobile

*/
              
            
!

JS

              
                $(document).ready(function() {

var myNavBar = {

    flagAdd: true,

    elements: [],

    init: function (elements) {
        this.elements = elements;
    },

    add : function() {
        if(this.flagAdd) {
            for(var i=0; i < this.elements.length; i++) {
                document.getElementById(this.elements[i]).className += " fixed-theme";
            }
            this.flagAdd = false;
        }
    },

    remove: function() {
        for(var i=0; i < this.elements.length; i++) {
            document.getElementById(this.elements[i]).className =
                    document.getElementById(this.elements[i]).className.replace( /(?:^|\s)fixed-theme(?!\S)/g , '' );
        }
        this.flagAdd = true;
    }

};

myNavBar.init(  [
    "header",
    "header-container",
    "brand"
]);

function offSetManager(){

    var yOffset = 0;
    var currYOffSet = window.pageYOffset;

    if(yOffset < currYOffSet) {
        myNavBar.add();
    }
    else if(currYOffSet == yOffset){
        myNavBar.remove();
    }

}

window.onscroll = function(e) {
    offSetManager();
}

offSetManager();

$("a").prop("target", "_blank");
  
$('.nav-anchor[target="_blank"]').removeAttr('target');
  
// $("img").removeClass("img-responsive img-rounded");
// $("img").addClass("img-responsive img-rounded");
  
var clientWidth = $(window).width();
$(".project-name").css('width', clientWidth);  

/* Validation used with PHP etc.

$(function () {

    $('#contact-form').validator();

    $('#contact-form').on('submit', function (e) {
        if (!e.isDefaultPrevented()) {
            var url = "contact.php";

            $.ajax({
                type: "POST",
                url: url,
                data: $(this).serialize(),
                success: function (data)
                {
                    var messageAlert = 'alert-' + data.type;
                    var messageText = data.message;

                    var alertBox = '<div class="alert ' + messageAlert + ' alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>' + messageText + '</div>';
                    if (messageAlert && messageText) {
                        $('#contact-form').find('.messages').html(alertBox);
                        $('#contact-form')[0].reset();
                    }
                }
            });
            return false;
        }
    })
});

*/
  
  
}); // END OF JAVASCRIPT


/*   SOME PHP

<?php

// configure
$from = 'Demo contact form <demo@domain.com>';
$sendTo = 'Demo contact form <demo@domain.com>';
$subject = 'New message from contact form';
$fields = array('name' => 'Name', 'surname' => 'Surname', 'phone' => 'Phone', 'email' => 'Email', 'message' => 'Message'); // array variable name => Text to appear in email
$okMessage = 'Contact form successfully submitted. Thank you, I will get back to you soon!';
$errorMessage = 'There was an error while submitting the form. Please try again later';

// let's do the sending

try
{
    $emailText = "You have new message from contact form\n=============================\n";

    foreach ($_POST as $key => $value) {

        if (isset($fields[$key])) {
            $emailText .= "$fields[$key]: $value\n";
        }
    }

    mail($sendTo, $subject, $emailText, "From: " . $from);

    $responseArray = array('type' => 'success', 'message' => $okMessage);
}
catch (\Exception $e)
{
    $responseArray = array('type' => 'danger', 'message' => $errorMessage);
}

if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
    $encoded = json_encode($responseArray);
    
    header('Content-Type: application/json');
    
    echo $encoded;
}
else {
    echo $responseArray['message'];
}

*/
              
            
!
999px

Console