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>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
  <title>Ionic : Side Bar menu Custom</title>
  <!-- Google Fonts-->
  <link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,900" rel="stylesheet">

  <link href="https://code.ionicframework.com/1.0.0-beta.6/css/ionic.css" rel="stylesheet">
  <script src="https://unpkg.com/ionicons@4.2.2/dist/ionicons.js"></script>
  <script src="https://code.ionicframework.com/1.0.0-beta.6/js/ionic.bundle.js"></script>
</head>

<body>
  <div ng-controller="AppController">
    <ion-nav-view></ion-nav-view>
  </div>

  <script id="app.html" type="text/ng-template">
    <ion-side-menus>

      <ion-side-menu-content>
        <ion-nav-bar class="bar-Prple">
          <ion-nav-back-button class="button-icon ion-arrow-left-c">
          </ion-nav-back-button>
        </ion-nav-bar>
        <ion-nav-buttons side="left">
          <button class="button button-icon button-clear ion-navicon" ng-click="toggleLeft()">
            </button>
        </ion-nav-buttons>
        <ion-nav-view name="appContent"></ion-nav-view>
      </ion-side-menu-content>

      <ion-side-menu side="left" id="loggedOutMenu">
        <ion-header-bar class="bar-assertive">
          <h1 class="title">LOGO</h1>
        </ion-header-bar>
        <ion-content>
          <ion-list>
            <button ion-item menuClose class="SideBar_Clk"><ion-icon name="compass"></ion-icon> Location</button>
          </ion-list>
          <ion-list>
            <button ion-item menuClose class="SideBar_Clk"><ion-icon name="bookmarks"></ion-icon> Bookmarks</button>
          </ion-list>
          <ion-list>
            <button ion-item menuClose class="SideBar_Clk"><ion-icon name="contact"></ion-icon> Contact</button>
          </ion-list>
          <ion-list>
            <button ion-item menuClose class="SideBar_Clk"><ion-icon name="logo-buffer"></ion-icon> Collections</button>
          </ion-list>

        </ion-content>
      </ion-side-menu>
    </ion-side-menus>
  </script>

  <script id="home.html" type="text/ng-template">
    <ion-view title="Side bar menu Template">
      <ion-content padding="true">
        <ion-purchase></ion-purchase>
      </ion-content>
    </ion-view>
  </script>
</body>

</html>
              
            
!

CSS

              
                * {
  font-family: Poppins !important;
}
/* ------------------- Side Nav bar customization ----------------------- */
ion-header-bar.bar.bar-assertive {
  border-color: #ffffff;
  background-color: #ffffff;
  color: #000;
  height: 90px;
  padding: 4px 0px;
  border-bottom: 1px solid #ddd;
  .title {
    color: #000;
    font-weight: 900;
    font-size: 26px;
    top: 50%;
    transform: translateY(-50%);
  }
}

ion-list {
  padding: 14px 18px;
  display: inline-block;
  width: 100%;
  &:first-child {
    margin-top: 60px;
  }
  .SideBar_Clk {
    background: transparent;
    border: none;
    margin: 0px;
    font-size: 15px;
    font-weight: 600;
    ion-icon {
      font-size: 20px;
      vertical-align: top;
      margin-right: 12px;
    }
  }
}

/* top navigation bar*/
.bar {
  &.bar-Prple {
    background: #5c00ff;
  }
  .title {
    color: #fff;
  }
}

/* Card design */
.Cst_card {
  .card {
    box-shadow: 0 9px 2.5rem rgba(0, 0, 0, 0.11);
    border-radius: 6px;
    .item {
      border: none;
      &.item-avatar {
        border-bottom: 2px solid #eee !important;
      }
      &.item-body {
        p {
          margin: 0 0 15px 0;
          line-height: 1.6rem;
          font-weight: 300;
          font-size: 14px;
        }
      }
    }
  }
}

.tpTlle{
  font-size: 1.5rem;
  font-weight: 100;
  padding: 10px 0px 10px 14px;
  margin: 0px 10px -10px 10px;
  background: #eee;
  border-radius: 4px;
  ion-icon{
    color:#5c00ff;
    vertical-align:middle;
  }
}

              
            
!

JS

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

  .config(function($stateProvider, $urlRouterProvider) {
  $stateProvider
    .state("app", {
    url: "/app",
    abstract: true,
    templateUrl: "app.html"
  })
    .state("app.home", {
    url: "/home",
    views: {
      appContent: {
        templateUrl: "home.html",
        controller: "HomeController"
      }
    }
  });

  $urlRouterProvider.otherwise("/app/home");
})

  .controller("AppController", function($scope, $ionicSideMenuDelegate) {
  $scope.toggleLeft = function() {
    $ionicSideMenuDelegate.toggleLeft();
  };
})

  .controller("HomeController", function($scope) {})

  .controller("CartController", function($scope) {
  $scope.data = {
    items: []
  };
})

  .directive("ionPurchase", function() {
  return {
    restrict: "E",
    template:
    '<div class="row"><div class="col"><p class="tpTlle"><ion-icon name="alert"></ion-icon> Check this in your Mobile version also</p></div></div><div class="row Cst_card responsive-sm"><div class="col col-25"><div class="list card"><div class="item item-avatar"><img src="https://ionicframework.com/img/docs/mcfly.jpg" /><h2>Marty McFly</h2><p>November 05, 1955</p></div><div class="item item-body"><p>This is a "Facebook" styled Card. The header is created from a Thumbnail List item,the content is from a card-body consisting of an image and paragraph text. The footer consists of tabs, icons aligned left, within the card-footer.</p><p><a href="#" class="subdued">1 Like</a><a href="#" class="subdued">5 Comments</a></p></div></div></div><div class="col col-25"><div class="list card"><div class="item item-avatar"><img src="https://ionicframework.com/img/docs/mcfly.jpg" /><h2>Marty McFly</h2><p>November 05, 1955</p></div><div class="item item-body"><p>This is a "Facebook" styled Card. The header is created from a Thumbnail List item,the content is from a card-body consisting of an image and paragraph text. The footer consists of tabs, icons aligned left, within the card-footer.</p><p><a href="#" class="subdued">1 Like</a><a href="#" class="subdued">5 Comments</a></p></div></div></div><div class="col col-25"><div class="list card"><div class="item item-avatar"><img src="https://ionicframework.com/img/docs/mcfly.jpg" /><h2>Marty McFly</h2><p>November 05, 1955</p></div><div class="item item-body"><p>This is a "Facebook" styled Card. The header is created from a Thumbnail List item,the content is from a card-body consisting of an image and paragraph text. The footer consists of tabs, icons aligned left, within the card-footer.</p><p><a href="#" class="subdued">1 Like</a><a href="#" class="subdued">5 Comments</a></p></div></div></div><div class="col col-25"><div class="list card"><div class="item item-avatar"><img src="https://ionicframework.com/img/docs/mcfly.jpg" /><h2>Marty McFly</h2><p>November 05, 1955</p></div><div class="item item-body"><p>This is a "Facebook" styled Card. The header is created from a Thumbnail List item,the content is from a card-body consisting of an image and paragraph text. The footer consists of tabs, icons aligned left, within the card-footer.</p><p><a href="#" class="subdued">1 Like</a><a href="#" class="subdued">5 Comments</a></p></div></div></div></div>'
  };
});

              
            
!
999px

Console