123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              
  <nav class="navbar is-fixed-top is-info" role="navigation" aria-label="main navigation">
    <div class="container">
      <div class="navbar-brand">
        <a class="navbar-item" href="#">
          <p>Hello</p>
        </a>
    
        <button class="button navbar-burger is-info">
          <span></span>
          <span></span>
          <span></span>
        </button>
      </div>
  
  
      <div class="navbar-menu">
        <div class="navbar-end">
          <a href="#me" class="navbar-item">
            About Me
          </a>
          <a href="#projects" class="navbar-item">
            Projects
          </a>
          <a href="#skills" class="navbar-item">
            Skills
          </a>
          <a href="#contact" class="navbar-item">
            Contact
          </a>
        </div>
      </div>
    </div>
  </nav>


  <!-- banner intro -->
  <!-- <section class="hero is-fullheight">
    <div class="hero-body">
      <div class="container">
        <h1 class="title is-1">Hi!</h1>
        <h2 class="subtitle is-3">Welcome to my Portfolio Page</h2>

        <a href="#me">
          <figure><img class="image is-32x32" src="./res/arrow.png"></figure>
        </a>
      </div>

      
    </div>
  </section> -->


  <!-- bio and short description -->
  <section id="me" class="hero is-fullheight">
    <div class="hero-body">
      <div class="container">
        <div class="columns is-centered is-multiline">
          <div class="column is-narrow has-text-centered">
            <figure>
              <img class="image is-round is-128x128" src="https://github.com/jcunanan05/fcc-portfolio/blob/master/res/profile.jpg?raw=true">
            </figure>
        
            <h2 class="title">Jonathan Cunanan</h2>
            <p class="subtitle">
              Web Developer, with a passion for programming. <br>
              Constantly searching for solutions <br>
              Learner, and will always be <br>
              💻 ❤️
            </p>
          </div>
        </div>
      </div>
    </div>
  </section>


  <!-- projects made -->
  <section id="projects" class="section">
    <div class="container">
      <h2 class="title is-3">Projects Made</h2>
  
      <div class="container js-projects-container">
        <div class="columns">
          <div class="column is-one-third my-projects">
            <article>
              <h2 class="title">
                <a href="https://codepen.io/jcunanan05/full/eWgbwB/">fCC Tribute Page</a>
              </h2>
      
              <figure>
                <a href=""></a>
                <img class="image" src="https://codepen.io/jcunanan05/pen/eWgbwB/image/small.png">
    
                <figcaption>This is a front-end exercise project that I made at freeCodeCamp using Bootstrap</figcaption>
              </figure>
            </article>
          </div>
        </div>
      </div>
    </div>
  </section>


  <!-- technologies used -->
  <section id="skills" class="section">
    <div class="container">
      <h2 class="title is-3">Technologies used to build projects</h2>
  
      <div class="container has-text-centered">
        <div id="toolList" class="columns is-multiline is-centered">
          <div class="column is-narrow">
            <figure>
              <img class="image is-128x128" src="https://seeklogo.com/images/N/nodejs-logo-FBE122E377-seeklogo.com.png">
  
              <figcaption class="content"><strong>Node</strong></figcaption>
            </figure>
          </div>
  
  
          <div class="column is-narrow">
            <figure>
              <img class="image is-128x128 is-round" src="https://v4-alpha.getbootstrap.com/assets/brand/bootstrap-social-logo.png">
    
              <figcaption class="content"><strong>Bootstrap</strong></figcaption>
            </figure>
          </div>
  
  
          <div class="column is-narrow">
            <figure>
              <img class="image is-128x128" src="https://jgthms.com/web-design-in-4-minutes/bulma.png">
    
              <figcaption class="content"><strong>Bulma</strong></figcaption>
            </figure>
          </div>

          
          <div class="column is-narrow">
            <figure>
              <img class="image is-128x128" src="https://plugins.qgis.org/static/cache/99/ec/99ec0011d70e0fe6237a4cda0166fdca.png">
    
              <figcaption class="content"><strong>MongoDB</strong></figcaption>
            </figure>
          </div>

          
          <div class="column is-narrow">
            <figure>
              <img class="image is-128x128" src="https://donjayamanne.gallerycdn.vsassets.io/extensions/donjayamanne/jquerysnippets/0.0.1/1474455550460/Microsoft.VisualStudio.Services.Icons.Default">
    
              <figcaption class="content"><strong>jQuery</strong></figcaption>
            </figure>
          </div>


          <div class="column is-narrow">
            <figure>
              <img class="image is-128x128" src="https://upload.wikimedia.org/wikipedia/commons/f/f1/Vue.png">
    
              <figcaption class="content"><strong>Vue</strong></figcaption>
            </figure>
          </div>
        </div>
      </div>
    </div>
  </section>


  <!-- more info -->
  <section id="contact" class="section">
    <div class="container">
      <h2 class="title is-3">Contact</h2>
  
      <div class="container">
        <div class="columns">
          <div class="column">
            <form>
              <div class="field">
                <label class="label" for="name">Name</label>
                <div class="control">
                  <input class="input" name="name" type="text" placeholder="Enter Name...">
                </div>
              </div>
          
              <div class="field">
                <label class="label" for="email">Email</label>
                <div class="control">
                  <input class="input" name="email" type="email" placeholder="Enter email...">
                </div>
              </div>
        
        
              <div class="field">
                <label class="label" for="message">Message</label>
                <div class="control">
                  <textarea class="textarea" name="message" placeholder="Enter message..."></textarea>
                </div>
              </div>
        
        
              <div class="control">
                <button class="button is-primary" type="submit">Submit</button>
              </div>
            </form>
          </div>
  
          <div class="column">
            <p id="contactInfo" class="content is-medium">Questions, inquirires, or anything you want to share with me? Just fill this form out! :)</p>
          </div>
        </div>
      </div>
    </div>
  </section>


  <!-- social media  -->
  <section id="social" class="section">
    <div class="columns">
      <div class="column content has-text-centered">
        <h3>
          Made by <br /> 
          
          <a href="https://github.com/jcunanan05">
            Jonathan Cunanan
          </a>
        </h3>
      </div>
      

      <div class="column">
        <div id="socialMedia" class="columns is-multiline is-centered">
          <div class="column is-narrow">
            <figure>
              <a href="https://github.com/jcunanan05">
                <img class="image is-32x32" src="https://image.flaticon.com/icons/svg/25/25231.svg">
              </a>
            </figure>
          </div>


          <div class="column is-narrow">
            <figure>
              <a href="https://www.linkedin.com/in/cunananjonathan/">
                <img class="image is-32x32" src="https://cdn1.iconfinder.com/data/icons/logotypes/32/square-linkedin-512.png">
              </a>
            </figure>
          </div>


          <div class="column is-narrow">
            <figure>
              <a href="https://www.freecodecamp.org/jcunanan05">
                <img class="image is-32x32" src="https://avatars0.githubusercontent.com/u/9892522?s=400&v=4">
              </a>
            </figure>
          </div>
        </div> 
      </div>
    </div>
  </section>


  <footer class="footer">
    <div class="container">
      <p class="content has-text-centered">&copy; 2018. All rights reserved.</p>
    </div>
  </footer>

  <script src="./script.js"></script>

            
          
!
            
              
/* .profile-pic {
  
} */


.is-round {
  border-radius: 50%;
}

section#me div img {
  margin-left: auto;
  margin-right: auto;
}

div#toolList div figure img {
  margin-left: auto;
  margin-right: auto;
}

div#socialMedia div figure img {
  margin-left: auto;
  margin-right: auto;
}

div.column p#contactInfo {
  padding: 20px;
}


/* body > nav.navbar {
  background-color: red;
} */

/* a.is-active {
  background-color: red !important;
} */

            
          
!
            
              var Portfolio = function() {
  var burger = document.querySelector(".navbar-burger");
  var menu = document.querySelector(".navbar-menu");
  var sections = document.querySelectorAll("body > section");
  var navbarItems = document.querySelectorAll(".navbar-item");
  var nav = document.querySelector("nav");
  var projectsContainer = document.querySelector('.js-projects-container');
  //don't judge, no database for now ok. =))
  var projects = [
    {
      title: 'fCC Tribute Page',
      url: 'https://codepen.io/jcunanan05/full/eWgbwB/',
      imageUrl: 'https://github.com/jcunanan05/fcc-portfolio/blob/master/res/tribute-page.PNG?raw=true',
      description: 'This is a front-end exercise project that I made at freeCodeCamp using Bootstrap.'
    },

    {
      title: 'Color Game',
      url: 'https://codepen.io/jcunanan05/full/gzrjdq',
      imageUrl: 'https://github.com/jcunanan05/fcc-portfolio/blob/master/res/color-game.PNG?raw=true',
      description: 'This is a front-end game that enhances your understanding on how Red Blue and Green affects color mixes. This uses jQuery library as well as plain CSS for styling.'
    },

    {
      title: 'fCC Random Quote Machine',
      url: 'https://codepen.io/jcunanan05/full/yKaoRm',
      imageUrl: 'https://github.com/jcunanan05/fcc-portfolio/blob/master/res/random-quote.PNG?raw=true',
      description: 'This is a front-end challenge that uses random quote API to deliver random quotes. It uses plain CSS with flexbox to practice responsive web design skills and also generate random colors.'
    },

    {
      title: 'Monster Slayer',
      url: 'https://codepen.io/jcunanan05/full/depBJN',
      imageUrl: 'https://github.com/jcunanan05/fcc-portfolio/blob/master/res/monster-slayer.png?raw=true',
      description: 'Front-end mini project that uses Vue, a framework for progressive javascript apps. Vue watches over the values and updates it real-time, making it the only source of truth.'
    }
  ];

  // event listeners
  burger.addEventListener("click", toggleBurger);

  window.addEventListener("scroll", checkSlide);

  //hide / show burger
  navbarItems.forEach(navbarItem => {
    navbarItem.addEventListener("click", hideBurger);
  });

  //build projects section
  makeProjectString();


  function toggleBurger() {
    menu.classList.toggle("is-active");
  }
  
  function hideBurger() {
    if (menu.classList.contains("is-active")) {
      menu.classList.remove("is-active");
    }
  }
  
  //debounce calls the function every x ms
  function debounce(func, wait = 19, immediate = true) {
    var timeout;
    return function () {
      var context = this,
        args = arguments;
      var later = function () {
        timeout = null;
        if (!immediate) func.apply(context, args);
      };
      var callNow = immediate && !timeout;
      clearTimeout(timeout);
      timeout = setTimeout(later, wait);
      if (callNow) func.apply(context, args);
    };
  }
  
  //scrollspy for navbar-items
  function checkSlide(e) {
    var topPosition = window.scrollY;
    var navbarHeight = nav.clientHeight;
    var navbarPosition = topPosition + navbarHeight;
    // console.log(`navbarHeight = ${navbarHeight}`);
    //client height is the height of the element
    //window.scrollY is the position at the top
    //window.innerHeight is the height of the viewport
    //offsetTop is the distance from the top to the element
    // console.log('offsetTop: ' + section.offsetTop);
    // console.log('scrollY: ' + topPosition);
  
    sections.forEach(section => {
      var sectionId = "#" + section.getAttribute("id");
      var sectionHeight = section.offsetTop + section.clientHeight;
      var sectionIsPassingBy = 
        navbarPosition >= section.offsetTop && 
        navbarPosition <= sectionHeight;
      var navbarItem = document.querySelector(`a[href="${sectionId}"]`);
  
      // deactiviate it here for a test before any activation
      navbarItem ? navbarItem.classList.remove("is-active") : "";
  
      if (sectionIsPassingBy) {
        //add is-active class to a navbar-item
        //execute if navbarItem exists
        navbarItem ? navbarItem.classList.add("is-active") : "";
      }
    });
  }

  //build the projectsContainer
  function makeProjectString() {
    var projectsString = [];
    var rowString = [];

    //loop the project Object
    projects.forEach((project, i) => {
      // for every 3 proj new line
      var newColumn = ((i + 1) % 3) === 0;
      console.log(newColumn)
  
      //loop all column
      rowString.push(`
        ${makeColumn(project)}
      `);

      //if new column
      if(newColumn) {
        projectsString.push(`<div class="columns">${rowString.join('')}</div>`);
        //reset rowString
        rowString = [];
      }

      //if end of array
      if(i === projects.length - 1) {
        projectsString.push(`<div class="columns">${rowString.join('')}</div>`);
      }
    });

    //build the string
    projectsContainer.innerHTML = `
      ${projectsString.join('')}
    `;
  }

  //get object and return a html string of project
  function makeColumn(project) {
    return `
      <div class="column is-one-third my-projects">
        <article>
          <h2 class="title">
            <a href="${project.url}">${project.title}</a>
          </h2>

          <figure>
            <a href="${project.url}"></a>
            <img class="image" src="${project.imageUrl}">

            <figcaption class="has-text-centered">${project.description}</figcaption>
          </figure>
        </article>
      </div>
    `;
  }
};


//run scripts 
var project = Portfolio();
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console