portfolio page

In this example below you will see how to do a portfolio page with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by snoudin, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright snoudin ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>portfolio page</title>
  
  
  <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css'>

      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
<header class="navbar navbar-default navbar-fixed-top" id="banner">
  <div class="container"><a class="scrollable" href="#top"></a>
    <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
    <nav class="collapse navbar-collapse" id="navbar" role="navigation">
      <ul class="nav navbar-nav navbar-right">
        <li><a class="scrollable" href="#top">About</a></li>
        <li><a class="scrollable" href="#portfolio">Portfolio</a></li>
        <li><a class="scrollable" href="#contact">Contact</a></li>
      </ul>
    </nav>
  </div>
</header>
<!-- end header--><a id="top" name="home"></a>
<main>
  <header>
    <div class="intro-text">
      <p>Front Developer and UX/UI designer, with practical experience in project management, branding strategy, and creative direction;  devoted to functional programming and information architecture.</p>
      <hr class="star-bright"/><span class="skills">Web Developer - User Experience Designer - Graphic Artist</span>
    </div>
  </header>
  <!-- Gallery Grid Section-->
  <section id="portfolio">
    <h2>Portfolio</h2>
    <hr class="star-dark"/>
    <ul class="grid">
      <li></li><img src="https://mail.google.com/mail/u/0/?ui=2&amp;ik=3fda45cb01&amp;view=fimg&amp;th=15be7957fc9a3264&amp;attid=0.2&amp;disp=inline&amp;realattid=f_j2fzax0c1&amp;safe=1&amp;attbid=ANGjdJ9tvZsHHgeRVALMWgVi1npU5G_H2Ke5wHLAde2duJkzUWFHgJbIn9zpc8Azlq6FTiC4OlFwz4BnfS5nTORJ0oho1Mxh1idm8A_AMtz-JMsx6Glzc09xveU03T4&amp;ats=1494238991329&amp;rm=15be7957fc9a3264&amp;zw&amp;sz=w1920-h974" alt=""/>
      <li></li><img src="https://mail.google.com/mail/u/0/?ui=2&amp;ik=3fda45cb01&amp;view=fimg&amp;th=15be7957fc9a3264&amp;attid=0.3&amp;disp=inline&amp;realattid=f_j2fzb1hf2&amp;safe=1&amp;attbid=ANGjdJ84HvfXExA1hUQXhqlMtHlol6p058MuvjhQ2onfgLVFoLifZ8efjrUySJ7kvBdj35ENAWn_TLaGLvOIh8-dLiR2omKGKCq_sdNLSUfD8xxHGw16v3uecv87Sz0&amp;ats=1494238991329&amp;rm=15be7957fc9a3264&amp;zw&amp;sz=w1920-h974" alt=""/>
      <li></li><img src="https://mail.google.com/mail/u/0/?ui=2&amp;ik=3fda45cb01&amp;view=fimg&amp;th=15be7957fc9a3264&amp;attid=0.4&amp;disp=inline&amp;realattid=f_j2fzb54x3&amp;safe=1&amp;attbid=ANGjdJ-R4JvkyWPiCbhc9r_4lNiZhJDr2TMi-Ot6yU6QmAQFRJKFoIy7TIOLmspjRg8CPM4La9LPUXnobXgEgKcM8Tqj-CSxKrB1Tl_dGg0UTWBPTreQgbRFm3ss1Ho&amp;ats=1494238991329&amp;rm=15be7957fc9a3264&amp;zw&amp;sz=w1920-h974" alt=""/>
    </ul>
  </section>
  <!-- Contact Section-->
  <section id="contact">
    <h2>Contact Me</h2>
    <hr class="star-dark"/>
    <div>
      <form id="contactForm" novalidate="">
        <div class="form-item">
          <label for="“name”">Name</label>
          <input id="name" type="text" placeholder="Name" required=""/>
        </div>
        <div class="form-item">
          <label for="“email”">Email Address</label>
          <input id="email" type="email" placeholder="Email Address" required=""/>
        </div>
        <div class="form-item">
          <label for="“phone”">Phone Number</label>
          <input id="phone" type="tel" placeholder="Phone Number" required=""/>
        </div>
        <div class="form-item">
          <label for="“message”">Message</label>
          <textarea id="message" rows="5" placeholder="Message" required=""></textarea>
        </div><br/>
        <button type="submit">Send</button>
      </form>
      <div>
        <p>Want to get in touch with me? Be it to request more info about myself or my experience, to ask for my resume, tips on how to solve your sudoku, random questions about the universe and the meaning of life. just feel free to drop me a line anytime.</p>
        <p>I promise to reply.</p>
        <p>Note: No spam/soliciting, another pour</p>
      </div>
    </div>
  </section>
  <!-- Scroll to Top Button (Only supposed to be visible on small and small screen sizes)-->
  <div class="scroll-top"><a class="button scrollable" href="#top"><i class="fa fa-chevron-up"></i></a></div>
</main>
<!-- Footer-->
<footer>
  <div id="footer-above">
    <div>
      <h3>About this page</h3>
      <p>Made with <i class="fa fa-fw fa-coffee"></i> and <i class="fa fa-fw fa-music"></i><br/>by <a href="https://codepen.io/snoudin/">V. Denis</a>.</p>
    </div>
    <div>
      <h3>Contact me</h3>
      <ul>
        <li><a class="button social" href="https://github.com/snoudin" title="my github"><i class="fa fa-fw fa-github"> </i></a></li>
      </ul>
    </div>
  </div>
  <div id="footer-below"></div>
</footer>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>

  

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




</body>

</html>

/*Downloaded from https://www.codeseek.co/snoudin/portfolio-page-gWwBVR */
body{
  margin:0;
  padding:0;
  color:#666;
  background:#BFEFFF;
  font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size:20px;
}
h2,h3{
  color:#555;
  font-weight:bold;
  text-align:center;
  text-transform:uppercase;
}
a{
  color:#00CD66;
}
a:hover,a:focus{
    color:#592059;
  }
#banner .container, 
main header, 
#portfolio .grid, 
#contact>div,
footer #footer-above{
  display:flex;
  flex-flow:row wrap;
  justify-content:space-around;
  align-items:flex-start;
  margin:0 auto; 
}
#banner{
  background-color:#00CD66 !important;
  height:80px;
  box-shadow:0px 2px 2px 1px rgba(0, 0, 0, 0.2);
  border-color:#592059;
}
#banner .container{
    width:95%;
    max-width:1024px;
    justify-content:space-between;
    align-items:center;
  }
#banner .container::before, #banner .container::after{
      display:none
    }
#banner img{
  height:140px;
  width:220px;
  }
nav{
  font-size:13px;
  background:#00CD66;
  transition:all .3s;
}
@media(max-width:768px){
nav{
    padding:5px;
    text-align:center;
    margin:10 auto;
    width:120%
}
    nav .active a{
      color:#00CD66;
      background:#bbb;
      box-shadow:0px 2px 2px 1px rgba(0, 0, 0, 0.1);
    }
  }
.nav>li{
    height:100%;
    text-transform:uppercase;
    font-weight:bold;
    letter-spacing:2px;
    display:inline-flex;
  }
.nav>li a{
      color:#ffffff;
      padding:10px 20px;
    }
.nav>li a:hover{
        color:#00CD66;
        background:#bbb;
        box-shadow:0px 2px 2px 1px rgba(0, 0, 0, 0.1);
      }
.navbar-toggle{
    margin-right:0;
  }
#top{
  height:80px;
  display:block;
}
main >*:not(.scroll-top){
    max-width:1024px;
    margin:0 auto;
    box-shadow:0px 0px 2px 1px rgba(0, 0, 0, 0.2);
  }
main header{
    background:#aaa;
    color:#fff;
    text-align:right;
    padding:70px 10% 50px;
    align-items:flex-end;
    align-content:space-around;
  }
@media(min-width:1023px){
main header{
      padding:50px 30px
  }
    }
main header img{
      border-radius:50%;
      margin:30px 0 10px;
      max-width:80%;
      height:auto;
      width:250px;
    }
main header .intro-text{
    max-width:675px;
    text-align:center;
    margin-bottom:30px;
  }
@media(min-width:1023px){
main header .intro-text{
      text-align:right;
      width:610px
  }
    }
main header .intro-text .skills{
      font-size:1.15em;
    }
main section{
    background:#eee;
    padding:40px 0;
  }
main section#contact>div{
      margin:0px auto;
    }
main section#contact>div>div{
        width:80%;
      }
main section#contact>div>div p{margin:60px auto 0;
        max-width:700px;}
@media(min-width:1023px){
main section#contact>div>div{
          max-width:38%
      }
          main section#contact>div>div p{margin-top:35px;
          }
            main section#contact>div>div p:last-child{
              margin-top:270px;
            }
        }
#portfolio .grid{
	padding:0;
	max-width:90%;
	list-style:none; 
	margin-top:20px;
}
#portfolio .grid li{
	margin:20px;
  max-width:600px;
  }
@media(min-width:1023px){
#portfolio .grid li{
    max-width:420px
  }
    }
#portfolio img{
  
	max-width:100%;
	height:auto;
	display:block;
}
form{
  width:80%;
}
@media(min-width:1023px){
form{
    width:40%;
    margin-left:20px
}
  }
form .row:first-child .form-item{
    border-top:1px solid #fff;
    }
.form-item{
    position:relative;
    margin-bottom:10px;
    padding-bottom:10px;
    border-bottom:1px solid #bbb;
  }
.form-item input, .form-item textarea{
      z-index:1;
      position:relative;
      padding-right:0;
      padding-left:0;
      border:0;
      border-radius:0;
      font-size:1.5em;
      background:0 0;
      box-shadow:none!important;
      resize:none;
      width:100%;
    }
.form-item input:focus, .form-item textarea:focus{
        outline:0
      }
.form-item label{
      display:block;
      z-index:0;
      position:relative;
      top:2em;
      margin:0;
      font-size:.85em;
      line-height:1.764705882em;
      vertical-align:middle;
      vertical-align:baseline;
      opacity:0;
      transition:top .3s ease,opacity .3s ease;
    }
.form-item-filled label{
      top:0;
      opacity:1;
      color:#aaa;
    }
.form-item-focused label{
      color:#00CD66;
    }
footer{
  color:#fff;
  background-color:#aaa;
  text-align:center;
  box-shadow:0px 0px 1px 1px rgba(0, 0, 0, 0.2);
}
footer h3{
    margin-bottom:30px;
    color:#fff;
  }
#footer-above{
    padding-top:50px;
    width:80%;
  }
#footer-above div{
      margin-bottom:50px;
      width:250px;
    }
#footer-above ul{
      padding:0;
    }
#footer-above li{
      display:inline;
    }
#footer-below{
    box-shadow:0px 0px 1px 1px rgba(0, 0, 0, 0.2);
    padding:25px 0;
    background-color:#00CD66;
    text-align:center;
  }
.button{
  color:#fff;
  border:solid 2px #fff;
  border-radius:50%;
  display:inline-block;
  width:50px;
  height:50px;
  text-align:center;
  font-size:20px;
  line-height:48px;
  transition:all .3s ease-in-out;
}
.button:hover{
    border:solid 2px #fff;
    color:#00CD66;
    background:#fff;
  }
.scroll-top{
  z-index:1049;
  position:fixed; 
  visibility:visible;
  bottom:2%;right:2%;
}
.scroll-top a{
    background:#00CD66;  
  }
.scroll-top a:hover, .scroll-top a:focus{
      color:#00CD66;
      background-color:#bbb;
      border-color:#00CD66;
    }
@media(min-width:768px){
.scroll-top a{
      visibility:hidden  
  }
    }
hr.star-bright, hr.star-dark{
    margin:40px auto 30px;
    padding:0;
    max-width:740px;
    border:0;
    border-top:solid 5px;
    text-align:center;
  }
@media(min-width:1023px){
header hr.star-bright, header hr.star-dark{
        margin-right:0;
        text-align:right
    }
        header hr.star-bright:after, header hr.star-dark:after{
          right:-10px;
        }
      }
hr.star-bright:after, hr.star-dark:after{
      content:'\f121';
      font-family:FontAwesome;
      display:inline-block;
      position:relative;
      top:-.8em;
      padding:0 .25em;
      font-size:2em;
    }
hr.star-bright{
    border-color:#fff;
  }
hr.star-bright:after{
      color:#fff;
      background-color:#aaa;
    }
hr.star-dark{
    border-color:#555;
  }
hr.star-dark:after{
      color:#555;
      background-color:#eee;
    }

/*Downloaded from https://www.codeseek.co/snoudin/portfolio-page-gWwBVR */
$(window).on('resize', function() {
  'use strict';
  var element	= document.querySelector('#banner'),
      elHeight = 0,
      elTop = 0,
      dHeight	= 0,
      wHeight	= 0,
      wScrollCurrent = 0,
      wScrollBefore	= 0,
      wScrollDiff	= 0; 
      window.addEventListener('scroll', function () {
        $('.navbar-collapse').collapse('hide');
        $('.navbar-toggle').addClass('collapsed').blur();
        if($(window).width() <= 768) {
          elHeight = element.offsetHeight;
          dHeight = document.body.offsetHeight;
          wHeight = window.innerHeight;
          wScrollCurrent = window.pageYOffset;
          wScrollDiff = wScrollBefore - wScrollCurrent;
          elTop = parseInt(window.getComputedStyle(element).getPropertyValue('top')) + wScrollDiff;

          // scrolled to the very top; element sticks to the top
          if(wScrollCurrent <= 0) {
              element.style.top = '0px';
          } // scrolled up; element slides in
            else if(wScrollDiff > 0) {
              element.style.top = (elTop > 0? 0 : elTop) + 'px'; 
          } // scrolled down
            else if(wScrollDiff < 0) {
              // scrolled to the very bottom; element slides in
              if(wScrollCurrent + wHeight >= dHeight - elHeight) {  
                element.style.top = ( ( elTop = wScrollCurrent + wHeight - dHeight ) < 0 ? elTop : 0 ) + 'px';
              } // scrolled down; element slides out
                else { element.style.top = ( Math.abs( elTop ) > elHeight ? -elHeight : elTop ) + 'px'; }
            }
          wScrollBefore = wScrollCurrent;
        } //
          else element.style.top = '0px';
      });
}).resize();

// Floating label headings for the contact form
$(function() {$("body")
 .on("input propertychange", ".form-item",function(e) {
  $(this).toggleClass("form-item-filled",!! $(e.target).val());})
 .on("focus", ".form-item",function() {
  $(this).addClass("form-item-focused");})
 .on("blur", ".form-item",function() {
  $(this).removeClass("form-item-focused");});
});

// Highlight the top nav as scrolling occurs
$('body').scrollspy({target: '.navbar-fixed-top'})

// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a').click(function() {
  $(".navbar-collapse").collapse('hide');});

// jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {$('body').on('click', 'a.scrollable', function(event) {
  var $anchor = $(this);
  $('html, body').stop().animate({scrollTop: $($anchor.attr('href')).offset().top},1500,'easeInOutExpo');
  event.preventDefault();
  });
});

Comments