Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              - var loggedIn = false
- var userName = "Txuritan"

doctype html
html.no-js(lang='en-US')
    head
        meta(charset='utf-8')
        meta(content='width=device-width, initial-scale=1, maximum-scale=1', name='viewport')
        title STAR
        block style
        link(rel='stylesheet', type="text/css", href='/css/star-framework.css')
        script(src='https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js')
    body
        .navbar.navbar-cDarkGray
            .navbar_left
                ul
                    li.item
                        a(href='/') STAR
            .navbar_right
                ul
                    if loggedIn
                        li.item
                            a(href='/profile/settings/') #{userName}
                        li.item
                            a(href='/sign-out/') Sign Out
                    else
                        li.item
                            a(href='/sign-in/') Sign In
                        li.item
                            a(href='/sign-up/') Sign Up
        .navbar.navbar-cBlue
            .navbar_left
                ul
                    li.item
                        a(href='/story/') Stories
                    li.item
                        a(href='/community/') Communities
                    li.item
                        a(href='/forum/') Forum
        .content
            form.form#form(method='post', action='')
                label.input_label(for='username') Username
                input.input.input-cLightGray#username(name='username', placeholder='Username')
                label.input_label(for='email') Email
                input.input.input-cLightGray#email(name='email', placeholder='Email')
                label.input_label(for='password') Password
                input.input.input-cLightGray#password(name='password', placeholder='Password')
                input.input.input-cLightGray#password(name='password' placeholder='Repeat Password')
                input.input.input-cRed#submit(type='submit', value='Submit')
        .footer.footer-cDarkGray
            .footer_center
                ul
                    li.item
                        a(href='/help') Help
                    li.item
                        a(href='/privacy/') Privacy
                    li.item
                        a(href='/terms-of-service/') Terms of Service
        .footer.footer-cDarkGray
            .footer_center
                ul
                    li.item
                        a(href='https://txuritan.github.io/') &copy; 2016-2017, Ian Cronkright.
        script(src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js')
        block script
        script(src='/js/star-framework.js')
            
          
!
            
              // .block {}
// .block_element {}
// .block-modifier {}

@color_teal: #1abc9c;
@color_teal-hover: #16a085;
@color_green: #2ecc71;
@color_green-hover: #27ae60;
@color_blue: #3498db;
@color_blue-hover: #2980b9;
@color_purple: #9b59b6;
@color_purple-hover: #8e44ad;
@color_darkGray: #34495e;
@color_darkGray-hover: #2c3e50;

@color_yellow: #f1c40f;
@color_yellow-hover: #f39c12;
@color_orange: #e67e22;
@color_orange-hover: #d35400;
@color_red: #e74c3c;
@color_red-hover: #c0392b;
@color_white: #ecf0f1;
@color_white-hover: #bdc3c7;
@color_lightGray: #95a5a6;
@color_lightGray-hover: #7f8c8d;

@padding: 14px;

* {
  box-sizing: border-box;
}

.content {
  .clearfix;
  background-color: @color_white;
  margin-left: @padding;
  margin-right: @padding;
  border-left: 1px solid @color_white-hover;
  border-right: 1px solid @color_white-hover;
}

.navbar {
  .clearfix;
  .navbar-color(@color_teal, @color_teal-hover, cTeal);
  .navbar-color(@color_green, @color_green-hover, cGreen);
  .navbar-color(@color_blue, @color_blue-hover, cBlue);
  .navbar-color(@color_purple, @color_purple-hover, cPurple);
  .navbar-color(@color_darkGray, @color_darkGray-hover, cDarkGray);
  .navbar-color(@color_yellow, @color_yellow-hover, cYellow);
  .navbar-color(@color_orange, @color_orange, cOrange);
  .navbar-color(@color_red, @color_red-hover, cRed);
  .navbar-color(@color_white, @color_white-hover, cWhite);
  .navbar-color(@color_lightGray, @color_lightGray-hover, cLightGray);
  &_left {
    float: left;
  }
  &_right {
    float: right;
  }
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    .item {
      display: inline-block;
      a {
        display: inline-block;
        line-height: 21px;
        padding: @padding;
        text-decoration: none;
      }
    }
  }
}

.navbar-color (@color_normal, @color_hover, @color_name) {
  &-@{color_name} {
    background-color: @color_normal;
    .item {
      color: contrast(@color_normal);
      &:hover {
        background-color: @color_hover;
      }
      a {
        color: contrast(@color_normal);
      }
    }
  }
}

.footer {
  .clearfix;
  .footer-color(@color_teal, @color_teal-hover, cTeal);
  .footer-color(@color_green, @color_green-hover, cGreen);
  .footer-color(@color_blue, @color_blue-hover, cBlue);
  .footer-color(@color_purple, @color_purple-hover, cPurple);
  .footer-color(@color_darkGray, @color_darkGray-hover, cDarkGray);
  .footer-color(@color_yellow, @color_yellow-hover, cYellow);
  .footer-color(@color_orange, @color_orange, cOrange);
  .footer-color(@color_red, @color_red-hover, cRed);
  .footer-color(@color_white, @color_white-hover, cWhite);
  .footer-color(@color_lightGray, @color_lightGray-hover, cLightGray);
  &_left {
    float: left;
  }
  &_right {
    float: right;
  }
  &_center {
    text-align: center;
  }
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    .item {
      display: inline-block;
      a {
        display: inline-block;
        line-height: 21px;
        padding: @padding;
        text-decoration: none;
      }
    }
  }
}

.footer-color (@color_normal, @color_hover, @color_name) {
  &-@{color_name} {
    background-color: @color_normal;
    .item {
      color: contrast(@color_normal);
      &:hover {
        background-color: @color_hover;
      }
      a {
        color: contrast(@color_normal);
      }
    }
  }
}

.details {
  border-bottom: 1px solid @color_white-hover;
  &_header {
    padding: @padding;
    &-sub {
      font-size: 0.9em;
      padding: 0 @padding @padding;
    }
  }
  &_summary {
    padding: 0 @padding @padding;
    &-sub {
      font-size: 0.9em;
      padding: 0 @padding @padding;
    }
  }
}

.form {
  padding: @padding;
}

.input {
  .clearfix;
  border-width: 0;
  border-radius: 0;
  padding: @padding;
  margin-bottom: @padding;
  margin-top: @padding;
  text-align: center;
  width: 100%;
  .input-color(@color_teal, @color_teal-hover, cTeal);
  .input-color(@color_green, @color_green-hover, cGreen);
  .input-color(@color_blue, @color_blue-hover, cBlue);
  .input-color(@color_purple, @color_purple-hover, cPurple);
  .input-color(@color_darkGray, @color_darkGray-hover, cDarkGray);
  .input-color(@color_yellow, @color_yellow-hover, cYellow);
  .input-color(@color_orange, @color_orange, cOrange);
  .input-color(@color_red, @color_red-hover, cRed);
  .input-color(@color_white, @color_white-hover, cWhite);
  .input-color(@color_lightGray, @color_lightGray-hover, cLightGray);
  &_label {
    display: block;
    text-align: center;
    width: 100%;
  }
}

.input-color (@color_normal, @color_hover, @color_name) {
  &-@{color_name} {
    background-color: @color_normal;
    color: contrast(@color_normal);
    &:hover,
    &:focus {
      background-color: @color_hover;
    }
  }
}

.story {
  padding: @padding;
}

hr {
  background-color: @color_white-hover;
  border-width: 0;
  color: @color_white-hover;
  height: 1px
}

.clearfix() {
  &:before, &:after {
    content: " ";
    display: table;
  }
  &:after {
    clear: both;
  }
  & {
    zoom: 1;
  }
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console