nakome
10/13/2013 - 9:57 PM

A Pen by Moncho Varela.

A Pen by Moncho Varela.

html,body{
  background-color:#c0392b;
}
img{
  width:100%;
  display:block;
}
/* portafolio */
#portfolio li img{
  margin-bottom:5px;
}
#portfolio{
  float:left;
  list-style:none;
  margin:0 auto;
  padding:0;
  width:100%;
}
#portfolio li{
  position:relative;
  font-size:18px;
  float:left;
  margin:10px;
  padding:5px;
  list-style:none;
  text-align:center;
  background:#e74c3c;
  color:#ecf0f1;
  z-index:10;
  box-shadow: 0 5px 6px -6px black;
  animation: move 1s ease-in-out;
  transition:background 1s ease;
}
.portfolio-item:hover:before {
  content: "(-0-)";
  position: absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:#1abc9c;
  color:#ecf0f1;
  width: 46px;
  line-height: 24px;
  height: 30px;
  z-index: 9999;
  border-radius:100%;
  animation:item 0.8s ease;
  box-shadow: 0 2px 2px -2px black;
  text-shadow: 0 1px 2px black;
}
#portfolio a{
  display:block;
  color:#444444;
  font-size:15px;
  font-style:italic;
  text-decoration:none;
}
#portfolio a:hover{
  text-decoration:underline;
}
#portfolio img{
  width:100%;
  display:block;
  position:relative;
  overflow:hidden;
  z-index:3;
}
#portfolio img{
  /*transition*/
  -webkit-transition:top 1s ease, left 1s ease;
  -moz-transition:top 1s ease, left 1s ease;
  -o-transition:top 1s ease, left 1s ease;
  transition:top 1s ease, left 1s ease;
}
#filter{
  font-size:16px;
  list-style:none;
  background:#e74c3c;
  margin:0;
  padding:0 0 0 0.5em;
  box-shadow: 0 4px 6px -6px black;
}
#filter li{
  display:inline-block;
  line-height:16px;
  list-style:none;
  color:#fff;
  text-shadow: 0 1px 2px #000;
}
#filter a{
  color:#c9ced1;
  text-decoration:none;
  display:inline-block;
  text-shadow: 0 1px 2px #34495e;
  padding:0.5em 0.7em;
  margin:0;
}
#filter li.current a,#filter a:hover{
  background:#c0392b;
  color:#ecf0f1;
  text-decoration:none;
  transition: background 0.8s ease-out,color 1s ease-in;
}


@keyframes move{
  from{margin-top:13em;}
}
@keyframes item{
  0%{top:12em;left:3em;}
  50%{top:5em;left:6em;}
}

/*  = only example
-----------------------------*/
@media all and (min-width: 500px){
  #portfolio li{width:25%;}
}
@media all and (min-width: 500px){
  #portfolio li{width:27%;}
}
@media all and (min-width: 520px){
  #portfolio li{width:28%;}
}
@media all and (min-width: 768px){
  #portfolio li{width:29%;}
}
(function(){
  'use strict';
  
  $('ul#filter a').click(function(){
    // Remove class
    $('ul#filter .current').removeClass('current');
    // Add parent class
    $(this).parent().addClass('current');
    // find same class of menu
    var filterVal = $(this).text().toLowerCase().replace(' ','-');
    if(filterVal == 'all') {
      // If click all execute this
      $('ul#portfolio li').animate({
        opacity: 1,
        rotateY:'360deg'
      },1000,'ease-in');
    }else{
      // Each all and filter values
      $('ul#portfolio li').each(function() {
        // Hide 
        if(!$(this).hasClass(filterVal)) {
          $(this).animate({
            opacity: 0.1,
            rotateY:'0deg'
          },1000,'ease-out');
          // Show
        }else{
          $(this).animate({
            opacity: 1,
            rotateX:'360deg'
          },1000,'ease-in');
        }
      });
    }
    return false;
  });
}).call(this);
html
  body
    ul#filter
      li Filtered by:
      li.current
        a(href='#') All
      li
        a(href='#') Design
      li
        a(href='#') Development
      li
        a(href='#') CMS
      li
        a(href='#') Integration
    ul#portfolio
      li.cms.design.portfolio-item
        img(src='http://placehold.it/200x200/2980b9/FFFFFF')
        | Portfolio Name
      li.integration.portfolio-item
        img(src='http://placehold.it/200x200/8e44ad/FFFFFF')
        | Portfolio Name
      li.cms.design.portfolio-item
        img(src='http://placehold.it/200x200/f1c40f/FFFFFF')
        | Portfolio Name
      li.design.portfolio-item
        img(src='http://placehold.it/200x200/1abc9c/FFFFFF')
        | Portfolio Name
      li.cms.design.portfolio-item
        img(src='http://placehold.it/200x200/2ecc71/FFFFFF')
        | Portfolio Name
      li.design.portfolio-item
        img(src='http://placehold.it/200x200/3498db/FFFFFF')
        | Portfolio Name
      li.cms.development.portfolio-item
        img(src='http://placehold.it/200x200/9b59b6/FFFFFF')
        | Portfolio Name
      li.cms.design.portfolio-item
        img(src='http://placehold.it/200x200/2980b9/FFFFFF')
        | Portfolio Name
      li.integration.portfolio-item
        img(src='http://placehold.it/200x200/8e44ad/FFFFFF')
        | Portfolio Name
      li.cms.design.portfolio-item
        img.superbox-img(src='http://placehold.it/200x200/16a085/FFFFFF')
        | Portfolio Name
      li.design.development.portfolio-item
        img(src='http://placehold.it/200x200/27ae60/FFFFFF')
        | Portfolio Name
      li.cms.design.portfolio-item
        img(src='http://placehold.it/200x200/f1c40f/FFFFFF')
        | Portfolio Name
      li.integration.portfolio-item
        img(src='http://placehold.it/200x200/1abc9c/FFFFFF')
        | Portfolio Name
      li.design.development.portfolio-item
        img(src='http://placehold.it/200x200/2980b9/FFFFFF')
        | Portfolio Name
      li.design.portfolio-item
        img(src='http://placehold.it/200x200/8e44ad/FFFFFF')
        | Portfolio Name