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

              
                <!DOCTYPE html>

<head>
  <!-- This is the InPlayer Script. This makes the paywall work. -->
  <script type="text/javascript" src="https://assets.inplayer.com/paywall/v3/paywall.min.js">     </script>
  
    <!-- These are the button and menu's visual settings. They affect how the button and menu look like. You would normally need to change these so they can reflect your website's style. -->
    <style>
      button {
        width: 130px;  /* This controls the size of the Login button. */
        background-color: #fff;  /* This controls the colour of the button. (#fff is White) */
        border-radius: 5px;
        padding: 10px;
        font-size: 14px; /* This controls the size of the font in the Login button. */
        border: none;
        box-shadow: 0 0 2px rgb(204, 204, 204);
        margin-left: auto;
        cursor: pointer;
        height: 100%;
        
      }
   
      .dropdown {
        width: 130px; /* This controls the size of the My Account menu button. */
        display: block;
        margin-left: auto;
        background-color: #fff; /* This controls the size of the My Account menu button. (#fff is White) */
        border-radius: 5px;
        box-shadow: 0 0 2px rgb(204, 204, 204);
        transition: all .5s ease;
        position: relative;
        font-size: 14px; /* This controls the size of the font in the My Account menu. */
        color: #474747;
        height: 100%;
        text-align: center;

      }

      .dropdown .select {
        cursor: pointer;
        display: block;
        padding: 10px
      }

      .dropdown .select>i {
        font-size: 14px;
        color: #888;
        cursor: pointer;
        transition: all .3s ease-in-out;
        float: right;
        line-height: 20px
      }

      .dropdown:hover {
        box-shadow: 0 0 4px rgb(204, 204, 204)
      }

      .dropdown:active {
        background-color: #f8f8f8
      }

      .dropdown.active:hover,
      .dropdown.active {
        box-shadow: 0 0 4px rgb(204, 204, 204);
        border-radius: 5px 5px 0 0;
        background-color: #f8f8f8
      }

      .dropdown.active .select>i {
        transform: rotate(-90deg)
      }

      .dropdown .dropdown-menu {
        position: absolute;
        background-color: #fff;
        width: 100%;
        left: 0;
        margin-top: 1px;
        box-shadow: 0 1px 2px rgb(204, 204, 204);
        border-radius: 0 1px 5px 5px;
        overflow: hidden;
        display: none;
        max-height: 144px;
        overflow-y: auto;
        z-index: 9
      }

      .dropdown .dropdown-menu li {
        padding: 10px;
        transition: all .2s ease-in-out;
        cursor: pointer
      }

      .dropdown .dropdown-menu {
        padding: 0;
        list-style: none
      }

      .dropdown .dropdown-menu li:hover {
        background-color: #f2f2f2
      }

      .dropdown .dropdown-menu li:active {
        background-color: #e2e2e2
      }

    </style>
    
  </head>


  <body>
  
  <!-- 
Below, you will need to make the following changes:
1. Change the current Asset ID (72681) with the ID of your own asset (two instances).
2. Change the current Account UUID (c424a964-2c3f-47fc-b10e-b808efbde9e2) with your own Account UUID (one instance).
-->

  <!-- This div element is the code for the My Account menu button. Put it where you wish the button to appear.-->
    <div class="dropdown" id="account">
      <div class="select">
        <span>My Account</span>
        <i class="fa fa-chevron-left"></i>
      </div>
      <input type="hidden" name="gender">
      <ul class="dropdown-menu">
        <li class="inplayer-paywall-account">My Details</li>
        <li class="inplayer-paywall-ccm">Card Details</li>
        <li class="inplayer-paywall-logout">Logout</li>
      </ul>
    </div>

  <!-- This line is the code for the Login button. Put it where you wish the button to appear.-->
    <button type="button" name="button" class="button inplayer-paywall-login">Login</button>

    <div id="inplayer-72681"></div>

    <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>

    <script type="text/javascript">
      var paywall = new InplayerPaywall('c424a964-2c3f-47fc-b10e-b808efbde9e2',
        [{
          id: 72681,
          options: {
            noPreview: true
          }
        }], {
          hideUserMenu: true
        }
      )

      $('#account').hide();

      paywall.on('authenticated', function() {
        $('#account').show();
      });

      paywall.on('logout', function() {
        location.reload();
      });

      $('.dropdown').click(function() {
        $(this).attr('tabindex', 1).focus();
        $(this).toggleClass('active');
        $(this).find('.dropdown-menu').slideToggle(300);
      });
      $('.dropdown').focusout(function() {
        $(this).removeClass('active');
        $(this).find('.dropdown-menu').slideUp(300);
      });

    </script>

  </body>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console