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>

<script type="text/javascript">
  
  // REPLACE "leverdemo" WITH OUR OWN COMPANY NAME

url = 'https://api.lever.co/v0/postings/leverdemo?mode=json'

//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];
}
  
  
function createJobs(_data) {
  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 data-link="'+link+'" class="job '+team+' '+location+' '+commitment+'">' +
        '<h2 class="job-title" href="'+link+'"">'+title+'</h2>' +
        '<p class="tags"><span>'+team+'</span><span>'+location+'</span><span>'+commitment+'</span></p>' +
        '<p class="description">'+shortDescription+'</p>' +
      '</div>'  
    );
  }
}

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

//Making each job description a link
$("#jobs-container").on("click", ".job", function() {
    var link = $(this).data("link");
    window.location.href = link;
});

</script>
              
            
!

CSS

              
                @import "nib"

sectionPadding = 80px

body
  font-family: 'Lato', sans-serif
  background: #efefef
  color: #454545

p
  margin: 0 0 1em 0
  line-height: 1.4em

p>a
  color: #00A0DF
p>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: block
  margin: 20px 10px
  padding: 30px  
  background: white
  border: 1px solid #ebebeb
  text-decoration: none
  transition: all .2s
  border-bottom: 3px solid transparent
  p, span
    transition: color .2s
  cursor: pointer
  &:hover
    background: #ddd
    border-bottom: 3px solid darken(#ddd, 10%)
    p, span
      color: #454545

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

h2
  margin: 0

.job-title
  font-size: 24px
  text-decoration: none
  color: #454545

.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

              
                
              
            
!
999px

Console