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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 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.

HTML

              
                <head>
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
</head>  


<section>
  <div class="container" id="jobs-container">
    <h1>Open jobs</h1>
    <div class="jobs-list">
    </div>
  </div>
</section>  

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
              
            
!

CSS

              
                @import "nib"

sectionPadding = 80px

body
  font-family: 'Lato', sans-serif;
  color: #999;
  line-height: 1.4em;

p
  margin: 0 0 1em 0

div>a
  color: #00A0DF
div>a:hover
  color: darken(#00A0DF, 10%)

*
  -webkit-box-sizing: border-box  /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box  /* Firefox, other Gecko */
  box-sizing: border-box

section
  position: relative
  padding: 30px

.container
  max-width: 960px
  margin: 0 auto

.job
  display: inline-block
  vertical-align: top
  width: 50%
  padding: (sectionPadding / 2) 30px

h1
  font-size: 48px
  color: #454545
  padding: 0 30px

.job-title
  font-size: 24px
  text-decoration: none
  color: #454545
  &:hover
    border-bottom: 1px solid #515357

.tags
  span
    color: #999
    font-size: 12px
    color: grayMediumDark
    &:after
      content: ', '
    &:last-of-type
      &:after
        content: ''    

.description
  color: #999

.btn
  display: inline-block
  padding: 7px 15px
  text-decoration: none
  font-weight: normal
  color: #999
  border: 2px solid #ebebeb
  border-radius: 4px
  background: #f9f9f9
  &:hover
    background: #ebebeb
    color: #555

              
            
!

JS

              
                // REPLACE "LEVERDEMO" WITH YOUR COMPANY NAME BELOW
url = 'https://api.lever.co/v0/postings/leverdemo?mode=json'


//Setting up the structure for each job posting
function createJobs(_data) {
  
  //Checking for potential Lever source or origin parameters
  var pageUrl = window.location.href;
  var leverParameter = '';
  var trackingPrefix = '?lever-'

  if( pageUrl.indexOf(trackingPrefix) >= 0){
    // Found Lever parameter
    var pageUrlSplit = pageUrl.split(trackingPrefix);
    leverParameter = '?lever-'+pageUrlSplit[1];
  }
  
  for(i = 0; i < _data.length; i++) {
    var posting = _data[i] 
    var title = posting.text
    var description = posting.description  
    //Making each job description shorter than 250 characters
    var shortDescription = $.trim(description).substring(0, 250)
    .replace('\n', ' ') + "...";
    var location = posting.categories.location
    var commitment = posting.categories.commitment
    var team = posting.categories.team
    var link = posting.hostedUrl+leverParameter

    $('#jobs-container .jobs-list').append(
      '<div class="job '+team+' '+location+' '+commitment+'">' +
        '<a class="job-title" href="'+link+'"">'+title+'</a>' +
        '<p class="tags"><span>'+team+'</span><span>'+location+'</span><span>'+commitment+'</span></p>' +
        '<p class="description">'+shortDescription+'</p>' +
        '<a class="btn" href="'+link+'">Learn more</a>' +
      '</div>'  

    );
  }
}

//Fetching job postings from Lever's postings API
$.ajax({
  dataType: "json",
  url: url,
  success: function(data){
    createJobs(data);}
});


              
            
!
999px

Console