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

              
                <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