Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                %html{'ng-app' => 'ionicApp'}
  %head
    %link{:href => 'https://code.ionicframework.com/1.0.0-beta.6/css/ionic.css', :rel => 'stylesheet'}
    %script{:src => 'https://code.ionicframework.com/1.0.0-beta.6/js/ionic.bundle.js'}
  %body.color{'ng-controller' => 'appCtrl'}
    %ion-side-menus.color
      %ion-side-menu{'width' => '200','side' => 'left'}
        %ion-scroll{}
          %div{'ng-init' => "names=['home','wifi','settings','options','search','cloud','stopwatch','apps','map','locate','compass','create','call']", 'overflow-scroll' => 'true', 'direction' => 'y'}
            %ion-item.slide_effect{'ng-repeat' => 'x in names'} 
              %i.icon{:class => 'ion-android-{{x}}'} 
              <span>{{x}}</span><span class="sub">This is a sub title</span>
      %ion-side-menu-content
        %ion-scroll
          %div.pad
            %i.logo.icon.ion-ionic
            %h1 Easy Ionic Side Menu Transitions
            %h2 Just adding some css rules can really spice up your ionic side menus, go ahead, pull out the menu or click the buttons below for different effects...
            %a.download{:href => 'https://www.jamiecoulter.co.uk/dev/easyIonic/easyIonicMenuTransitions.css',:target => '_blank'} 
              <i class="icon ion-code-download"></i> <span>Get it now</span>
            %a.follow{:href => 'https://codepen.io/jcoulterdesign/',:target => '_blank'} 
              <i class="icon ion-social-codepen-outline"></i> <span>Follow me on codepen</span>
            %h3 Effect
            %button.b_slide_effect.active{'ng-click' => 'slide("slide_effect")'} Slide Left
            %button.b_scale_effect{'ng-click' => 'slide("scale_effect")'} Scale Up
            %button.b_fade_effect{'ng-click' => 'slide("fade_effect")'} Simple Fade
            %button.b_slide_up{'ng-click' => 'slide("slide_up")'} Slide Up
            %button.b_wave{'ng-click' => 'slide("wave")'} Wave
            %button.b_drop_in{'ng-click' => 'slide("drop_in")'} Drop In

              
            
!

CSS

              
                /*===============================================

Easy Ionic Side Menu Transitions

===============================================*/

// Ionic overwrites
ion-scroll{height:100vh;}
.loading.visible {opacity: 1;}
.scroll-bar-indicator{display: none;}
.view{background:#3A3A4F !important;}
.menu-content{background:#3A3A4F !important;}
.menu-content{box-shadow: none !important;}

// Easy Ionic Menu Animations

.menu-content.menu-animated {
  transition: transform 300ms cubic-bezier(0.42, 2.12, 0.35, 0.55);
}

.menu-open ion-side-menu .item.slide_effect{
  @for $i from 1 through 20{
    &:nth-of-type(#{$i}) i{
      animation: menu_pop .17s (0s + $i / 20) forwards !important;
    }
    &:nth-of-type(#{$i}) span{
      animation: menu_pop .17s (0.1s + $i / 20) forwards !important;
    }
  }
}

.menu-open ion-side-menu .item.scale_effect{
  @for $i from 1 through 20{
    &:nth-of-type(#{$i}){
      animation: menu_scale .3s (0s + $i / 16) cubic-bezier(0.42, 2.12, 0.35, 0.55) forwards !important;
    }
  }
}

.menu-open ion-side-menu .item.slide_up{
  @for $i from 1 through 20{
    &:nth-of-type(#{$i}){
      animation: slide_up .4s (0s + $i / 16) cubic-bezier(0.07, 0.65, 0, 0.96) forwards !important;
    }
  }
}

.menu-open ion-side-menu .item.wave{
  @for $i from 1 through 20{
    &:nth-of-type(#{$i}){
      animation: wave .8s (0s + $i / 16) cubic-bezier(0.43, 1.6, 0.57, 0.88) forwards !important;
    }
  }
}

.menu-open ion-side-menu .item.drop_in{
  @for $i from 1 through 20{
    &:nth-of-type(#{$i}){
      animation: drop_in .5s (0s + $i / 16) cubic-bezier(0.43, 1.6, 0.57, 0.88) forwards !important;
    }
  }
}

.menu-open ion-side-menu .item.fade_effect{
  @for $i from 1 through 20{
    &:nth-of-type(#{$i}) i{
      animation: menu_fade .2s (0s + $i / 16) forwards !important;
    }
    &:nth-of-type(#{$i}) span{
      animation: menu_fade .2s (0s + $i / 16) forwards !important;
    }
  }
}

.slide_up{
  top:1000px;

}
.slide_up.item i{
    opacity:1;
  }
.slide_up.item span{
    opacity:1;
  }
.wave{
  top:1000px;
}
.wave.item i{
    opacity:1;
  }
.wave.item span{
    opacity:1;
  }

.item.scale_effect{
  transform:scale(0);
  i,span{
    opacity:1;
  }
}
.item.drop_in{
  transform:scale(2);
  opacity:0;
  i,span{
    opacity:1;
  }
}

@keyframes menu_fade{
  from{opacity:0;}
  to{opacity:1;}
}
@keyframes slide_up{
  from{top:1000px;}
  to{top:0px;}
}
@keyframes wave{
  from{top:1000px;}
  to{top:0px;}
}
@keyframes menu_pop{
  from{left:-10px; opacity:0;}
  to{left:0px; opacity:1;}
}
@keyframes menu_scale{
  from{transform:scale(0);}
  to{transform:scale(1);}
}
@keyframes drop_in{
  from{transform:scale(2);}
  to{transform:scale(1);opacity:(1)}
}

/*===============================================

Page Theme - Not part of the Transitions effect

===============================================*/

// Fonts
@import url(https://fonts.googleapis.com/css?family=Nunito:400,700,300);

// Styles
a span{position: relative;top: -9px;}
a i{font-size: 40px;margin-right: 13px;}
.mono{}
.rainbow{}
a.download,a.follow{display: inline-block;padding: 16px 30px;background: #41EFB6;color: white;font-weight: 900;font-family: 'nunito';text-decoration: none;border-radius: 4px;margin-right:12px;}
a.follow{padding: 14px 30px;background: none;color: white;border:2px solid white;&:hover{color:#41EFB6;border-color:#41EFB6;}}
// Theme
body{
  .logo{
    color:white;
    font-size:60px;
    margin-top:100px;
    display:block;
  }
  h3{
    font-family: 'Nunito', sans-serif !important;
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 900;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    padding-bottom: 10px;
    line-height: 25px;
    margin-bottom: 30px;
  }
  h1{

    font-family: 'Nunito', sans-serif !important;
    color:#38F1CF;
    font-size:30px;
    line-height:25px;
    margin-bottom:30px;
  }
  h2{
    font-family: 'Nunito', sans-serif !important;
    color:white;
    font-size:18px;
    line-height:25px;
    margin-bottom:30px;
  }
}

.pad{
  width:80%;
  margin-left:100px;
  max-width:770px;
}
ion-side-menu{
  .item{padding:30px 15px;border-color: #F4F4F4;
    &:nth-of-type(1) i{
      color:#C856D4;
    }
    &:nth-of-type(2) i{
      color:#729AD0;
    }
    &:nth-of-type(3) i{
      color:#98CEA2;
    }
    &:nth-of-type(4) i{
      color:#E6CC38;
    }
    &:nth-of-type(5) i{
      color:#E29B29;
    }
    &:nth-of-type(6) i{
      color:#DE3B52;
    }
    &:nth-of-type(7) i{
      color:#A97637;
    }
    &:nth-of-type(8) i{
      color:#C856D4;
    }
    &:nth-of-type(9) i{
      color:#729AD0;
    }
    &:nth-of-type(10) i{
      color:#98CEA2;
    }
    &:nth-of-type(11) i{
      color:#E6CC38;
    }
    &:nth-of-type(12) i{
      color:#E29B29;
    }
    &:nth-of-type(13) i{
      color:#DE3B52;
    }
  }
  i{    font-size: 22px;
    padding: 10px;
    top: 28px;
    padding-left: 19px;
    opacity: 0;
    left:0;
    position: absolute;

  } 
  span{
    font-family: 'Nunito', sans-serif;
    text-transform:capitalize;
    font-size:14px;position:relative;opacity:0;
    display:inline-block;
    color: #5F5F71;
    float:left;    padding-left:40px;
    font-weight: 600;
  }
  .sub{
    display:block;
    clear:both;
    padding-left:40px;
    font-size:12px;
    color:#B1B1B5;
    float:left;
  }
}
button.active,button.t_active{
  border-color:#38F1CF;
  color:#38F1CF;
  &:hover{
    color:#38F1CF;
    background:none;
    box-shadow:none;
  }
}
button{
  padding:10px 25px;
  border:2px solid white;
  background:none;
  border-radius:100px;
  margin-bottom:12px;
  color:white;
  font-family: 'Nunito', sans-serif !important;
  font-weight:600 !important;
  transition:all .24s;
  margin-right:12px !important;
  display:inline-block;
  &:hover{
    background:white;
    color: #3A3A4F;
    box-shadow:0px 0px 0px 10px rgba(255,255,255,0.04);
  }
  &:active{
    box-shadow:0px 0px 0px 20px rgba(255,255,255,0.04);
  }
}


              
            
!

JS

              
                angular.module('ionicApp', ['ionic'])

/*======================

Controllers

========================*/

.controller('appCtrl', function($scope, $ionicSideMenuDelegate) {
  setTimeout(function(){
    $ionicSideMenuDelegate.toggleLeft();
  },600)
  var e = 'slide_effect,scale_effect,fade_effect,slide_up,wave,drop_in';
  $scope.slide = function(se) {
    $('.item').removeClass().addClass('item')
    $('.item').addClass(se);
    $('button').removeClass('active')
    $('.b_' + se).addClass('active');
    $ionicSideMenuDelegate.toggleLeft();
    if($ionicSideMenuDelegate.isOpen() == true){
      setTimeout(function(){
        $ionicSideMenuDelegate.toggleLeft();
      },700)
    }
  };
});

$('button').click(function(){
  $(this).addClass('active')
});
              
            
!
999px

Console