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.

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

            
              div
  .container
    p#title
      | PROJECTS
    .row
      #root
            
          
!

CSS

            
              #title {
  font-size: 1.5rem;
  font-weight: 300;
}

.icon {
  font-size: .9rem;
  display: inline-flex;
  background: #D8D8D8;
  border-radius: 3px;
  margin-right: 5px;
  margin-bottom: 15px;
  span {
    border-radius: 5px;
    padding: 3px 5px;
  };
}

.react {
  background: #BAD5F5;
  span::after {
    content: "React.js";
  }
}

.express {
  background: #F2C986;
  span::after {
    content: "Express";
  }
}

.node {
  background: #E1C1C1;
  span::after {
    content: "Node.js";
  }
}

.python {
  background: #EADD86;
  span::after {
    content: "Python";
  }
}

.django {
  background: #AFEAE5;
  span::after {
    content: "Django";
  }
}

.card {
  a {
    padding-right: 15px;
  } 
}

.github {
  color: #739150;
}

.status {
  color: #7699C2;
}
            
          
!

JS

            
              // Dummy data placeholder. Replace with array of actual data objects to come from Airtable 
const data = [
  {
    "project": "Project X",
    "stack": ["react", "express", "node"],
    "description": "Some sample text giving project elevator pitch and blah blah and other stuff and goals and dreams and rainbows and butterflies and sunshine. ",
    "website": "https://www.google.com",
    "github": "https://www.github.com",
    "image": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/326643/Sample%20Logo.png",
    "needs": "People with super powers",
    "status": "In Development"
  },
  {
    "project": "Project XYZ",
    "stack": ["python", "django"],
    "description": "Some sample text giving project elevator pitch and blah blah and other stuff and goals and dreams and rainbows and butterflies and sunshine. ",
    "website": "https://www.google.com",
    "github": "https://www.github.com",
    "needs": "People with super powers, semi-super powers, or no powers at all",
    "image": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/326643/sample%20logo%202.png",
    "status": "Live"
  },{
    "project": "Project X",
    "stack": ["react", "express", "node"],
    "description": "Some sample text giving project elevator pitch and blah blah and other stuff and goals and dreams and rainbows and butterflies and sunshine. ",
    "website": "https://www.google.com",
    "github": "https://www.github.com",
    "image": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/326643/Sample%20Logo.png",
    "needs": "People with super powers",
    "status": "In Development"
  },
  {
    "project": "Project XYZ",
    "stack": ["python", "django"],
    "description": "Some sample text giving project elevator pitch and blah blah and other stuff and goals and dreams and rainbows and butterflies and sunshine. ",
    "website": "https://www.google.com",
    "github": "https://www.github.com",
    "needs": "People with super powers, semi-super powers, or no powers at all",
    "image": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/326643/sample%20logo%202.png",
    "status": "Live"
  },{
    "project": "Project X",
    "stack": ["react", "express", "node"],
    "description": "Some sample text giving project elevator pitch and blah blah and other stuff and goals and dreams and rainbows and butterflies and sunshine. ",
    "website": "https://www.google.com",
    "github": "https://www.github.com",
    "image": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/326643/Sample%20Logo.png",
    "needs": "People with super powers",
    "status": "In Development"
  },
  {
    "project": "Project XYZ",
    "stack": ["python", "django"],
    "description": "Some sample text giving project elevator pitch and blah blah and other stuff and goals and dreams and rainbows and butterflies and sunshine. ",
    "website": "https://www.google.com",
    "github": "https://www.github.com",
    "needs": "People with super powers, semi-super powers, or no powers at all",
    "image": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/326643/sample%20logo%202.png",
    "status": "Live"
  }
 ];

function Layout(props){
  return(
      <div className="row">{props.children}</div>
    )
}
 
class Card extends React.Component {
  render(){
    const style = {
      img: {
        maxWidth: "400px"
      }
    }
    return(
      <div className="col m4">
        <div className="card hoverable">
          <div className="card-image waves-effect waves-block waves-light">
            <img style={style.img} className="activator" src={this.props.data.image}/>
          </div>
          <div className="card-content">
            <div>
              <StackIcons data={this.props.data.stack}/>
            </div>
            <span className="card-title activator grey-text text-darken-4">
              {this.props.data.project}
              <i className="material-icons right">more_vert</i>
            </span>
            <div>
              <span><a href={this.props.data.website}>Website</a></span>
              <span><a className="github" href={this.props.data.github}>Github</a></span>
            </div>
          </div>
          <div className="card-reveal">
            <span className="card-title grey-text text-darken-4">{this.props.data.project}<i className="material-icons right">close</i></span>
            <div><span className="status">{this.props.data.status}</span></div>
            <p>{this.props.data.description}</p>
            <p><strong>Need:</strong></p>
            <p>{this.props.data.needs}</p>
          </div>
        </div>
      </div>
    )
  }
}

// Note: Empty span tag on line 115 is there as placeholder for
// the custom CSS to inject text based on stack item.
function StackIcons(props) {
  const array = props.data;
  const icons = array.map((item) => {
    return (
      <div key={item} className="icon">
        <span className={item}><span/></span>
      </div>
    );
  });
  return(
    <div> {icons} </div>
  )
}

function Projects(props){
  const projects = [];
  const data = props.data;
  data.forEach((item) => { projects.push( <Card data={item} /> )});
  return(
    <div>{projects}</div>
  )
}

ReactDOM.render(
  <Layout children={<Projects data={data} />} />,
  document.getElementById('root')
);
            
          
!
999px

Console