Pen Settings



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


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


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.


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.


                <div id="app">

<footer><p>Coded with <span>&hearts;</span> by <a href="">satinflame design</a></p></footer>


                body, html { background:#333; }
html, body {background-color:#001;
background-image: radial-gradient(#b54c68 15%, transparent 16%),
radial-gradient(#f99 15%, transparent 16%);
background-size:30px 30px;
background-position: 0 0, 15px 15px;}
.container { max-width: 800px; }
body { padding: 10px;}
table img { width:30px; height:30px; padding: 1px; border: 1px solid #ccc; margin-right:8px; }
td, th { background:#fff;}
table { border: 3px solid #000;}
caption { color:#fff; font-size:24px; padding:10px; background:rgba(0,0,0,.5); margin-top:10px; border: 5px solid #f99; border-bottom:0;}

.fancy {
  text-align: center;
  font-family: 'Kaushan Script'; 
}, { content: "\25bc"; float:right; font-size: 14px;   } 
th#recent, th#alltime { width:30%;  cursor:pointer;
table th {font-family: 'Kaushan Script'; font-size:1.6rem; }
footer { color:#ccc; font-family: 'Kaushan Script'; text-align:center;background:rgba(0,0,0,.5);padding:10px;  
  a, span{ color:#b54c68;}

table tr:first-of-type td { font-weight:bold; font-size:1.8rem; border-top: 3px solid #b54c68; border-bottom: 3px solid #b54c68;}
table.table-bordered.table td { vertical-align:middle;}
table.table-bordered.table td:first-child { text-align:center;}
table a {   color:#b54c68;}
#app table { border:5px solid #f99;}


                var Display = React.createClass({

  getInitialState: function() {    
    return {
      users: [],
      orderby: "recent",
      orderbyprev: "alltime"
    this.onClick = this.handleClick.bind(this);

  handleClick(e) {
    //console.log("e " +e);
    var passedState = e; // what is clicke
    var orderState = this.state.orderby; // what it currently is
    if ((passedState !== "alltime") && (orderState === "alltime")) {
        orderby: "recent",
        orderbyprev: "alltime"
    } else if ((passedState !== "recent") && (orderState === "recent")) {
        orderby: "alltime",
        orderbyprev: "recent"
    //console.log('click: '+ this.state.orderby);

  getData() {
      url: this.props.apiroot + this.state.orderby,
      dataType: 'json',
      cache: false,
      success: function(data) {
        var users = data;
          users: users
      error: function(xhr, status, err) {
        console.error(this.props.apiroot, status, err.toString());
  componentDidMount() {
  componentDidUpdate() {

  render: function() {
  var alltimeClass = (this.state.orderby === "alltime") ? 'active' : '';
    var recentClass = (this.state.orderby === "recent") ? 'active' : '';

    return (
      <div className="editor container">
        <div className="row">
          <div className="markdown-input col-sm-12"> 
              <table className="table-responsive table table-bordered">
                  <caption className="fancy"><span className="fa fa-free-code-camp" aria-hidden="true"></span> freeCodeCamp Leaderboard</caption>
                    <th id="recent" className={recentClass} onClick={this.handleClick.bind(this, "recent")}>Points in the past 30 days</th>
                    <th id="alltime" className={alltimeClass} onClick={this.handleClick.bind(this, "alltime")}>All-time Points</th>
                  users={this.state.users} />

var Output = React.createClass({
  render() {
    var count = 0;
    var userlist = {
      return (
        <UserDetails user={user} key={user.username} img={user.img} username={user.username} recent={user.recent} alltime={user.alltime} count={count} apiroot={this.props.apiroot} updatePage={this.props.updatePage}/>

    return (

function UserDetails(props) {
  return (
      <td><a href={""+props.username}><img src={props.img}/>{props.username}</a></td>

ReactDOM.render(<Display apiroot="" />, document.getElementById("app"));