Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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

              
                {{#unless level}}
    <nav class="container-grid navbar navbar-dark navbar-expand-md"><a href="" class="link-container"><span class="text-element text-1"><span class="text-text-1">219</span>WestMain.com</span></a><a class="glyph navbar-toggler" href="#" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"><i class="coffeecup-icons-menu7"></i></a>
      <nav class="container-grid collapse navbar-collapse" id="navbarNav">
        <ul class="list-container navbar-nav">
{{/unless}}

        {{#each items}}
          
        {{#checkIf this.items.length '>' 0}}
        {{#checkIf this.level '==' 2}}
              <!-- top of a drop down -->
        {{setVar "arrayCount" this.items.length}}
          
                  <li class="list-item-container nav-item dropdown">
            <a class="link-text nav-link dropdown-toggle"
                href="{{menuUrl}}"
                  {{#if title}}
                     title="{{title}}"
                  {{/if}}
                  {{#if target}}
                     target="{{target}}"
                  {{/if}}
                  {{#if rel}}
                     rel="{{rel}}"
                  {{/if}}
                id="navbarDropdownMenuLink" role="button" data-toggle="dropdown">{{label}}</a>
            <nav class="container-grid dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
            {{/checkIf}}
          {{/checkIf}}

          {{#checkIf this.items.length '==' 0}}
            {{#checkIf this.level '>' 2}} <!-- 3+ -->
              <!-- drop down items -->

              <!-- 1st drop down item -->
          {{#checkIf @index '==' 0}}

            <a class="link-text dropdown-item"
                href="{{menuUrl}}"
                  {{#if title}}
                     title="{{title}}"
                  {{/if}}
                  {{#if target}}
                     target="{{target}}"
                  {{/if}}
                  {{#if rel}}
                     rel="{{rel}}"
                  {{/if}}
                >{{label}}</a>

          {{/checkIf}}

              <!-- last drop down item -->
          {{#checkIf (math @root.arrayCount '-' 1) '==' @index}}

            <a class="link-text dropdown-item"
                href="{{menuUrl}}"
                  {{#if title}}
                     title="{{title}}"
                  {{/if}}
                  {{#if target}}
                     target="{{target}}"
                  {{/if}}
                  {{#if rel}}
                     rel="{{rel}}"
                  {{/if}}
                >{{label}}</a>
          </nav>
          </li>

          {{/checkIf}}

              <!-- otherwise drop down item -->
          {{#checkIf @index '!=' 0}}
          {{#checkIf (math @root.arrayCount '-' 1) '!=' @index}}

            <a class="link-text dropdown-item"
                href="{{menuUrl}}"
                  {{#if title}}
                     title="{{title}}"
                  {{/if}}
                  {{#if target}}
                     target="{{target}}"
                  {{/if}}
                  {{#if rel}}
                     rel="{{rel}}"
                  {{/if}}
                >{{label}}</a>

          {{/checkIf}}
          {{/checkIf}}

            {{/checkIf}}
          {{/checkIf}}

          {{#checkIf this.items.length '==' 0}}
            {{#checkIf this.level '==' 2}}
              <!-- normal menu link -->
              <li class="list-item-container nav-item">
              <a class="link-text nav-link"
                href="{{menuUrl}}"
                  {{#if title}}
                     title="{{title}}"
                  {{/if}}
                  {{#if target}}
                     target="{{target}}"
                  {{/if}}
                  {{#if rel}}
                     rel="{{rel}}"
                  {{/if}}
                >{{label}}</a>
              </li>
            {{/checkIf}}
          {{/checkIf}}

            {{#if items}}
               {{> menu}}
            {{/if}}

        {{/each}}

   {{#unless level}}
    </ul>
   </nav>
   {{/unless}}

              
            
!

CSS

              
                
              
            
!

JS

              
                setVar: function(nName, vValue, options) {
    if (!options.data.root) {
        options.data.root = {};
    }
        options.data.root[nName] = vValue;
    }
              
            
!
999px

Console