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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <head>
  <link href="https://fonts.googleapis.com/css?family=Handlee|Quicksand|Rufina" rel="stylesheet">
</head>
<body>
  
<div id="root"></div>

</body>
              
            
!

CSS

              
                body{
  text-align: center;
  background: #eaeaea;
  margin-top: 1rem;
  font-family: 'Quicksand', cursive;
  color: #090d47;
}

/*navigation bar*/
button{
  float:right;
  background: #eaeaea;
  border: #eaeaea;
  display: block;
  padding: .7rem;
  color: #090d47;
  margin-top: -1rem;
}

 button:hover {
  background-color: #dbdbdb;
  text-decoration: none;
  transition: .7s background-color;
}

/*My name*/
h1{
  font-size: 3.5rem;
  font-family: 'Rufina', cursive;
  margin-top: 6rem;
  color: #00102b;
}

/*My picture*/
#photo{
  border-radius: 50%;
  padding: .5rem;
  border: 1px solid #dbdbdb;
  margin-top:2rem;
  width: 15rem;  
  animation-name: appear;
  animation-duration: 4s;
}

@keyframes appear{
  0%{opacity:0;}  
  100%{opacity:1;}
}

/*Body*/
ul {
  list-style-type: none;
    list-style-type: none;
  margin: 0;
  padding: 0;
  margin-top: -1rem;
  margin-left: auto;
  margin-right: 1rem; 
}

.show-grid{
  border: double #dbdbdb;
  height: 25rem;
  margin-top: 2rem;
}

.body{
  font-size: 1.3rem;
}


/*Fade-in/out... not working yet*/
.fade-enter {
  opacity: 0.01;
}

.fade-enter.fade-enter-active {
  opacity: 1;
  transition: 500ms ease-in all;
}

.fade-leave {
  opacity: 1;
}

.fade-leave.fade-leave-active {
  opacity: 0.01;
  transition: 300ms ease-in all;
}
              
            
!

JS

              
                //https://stackoverflow.com/questions/46737933/changing-text-on-button-push-react-js?rq=1
let Grid = ReactBootstrap.Grid;
let Row = ReactBootstrap.Row;
let Col = ReactBootstrap.Col;
const ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;

const styles = {
  transition: 'all 1s ease-out'
};

//Text to appear in the body when the user clicks
const texts = [
  [''],
  ['I first learned about coding alongside my 5th graders. After 8 years teaching English as a Second Language, I decided to switch careers. Today, I am proficient in regular expressions, HTML, CSS, JavaScript, jQuery, and ReactJS'],
  ['Work samples are available on my GitHub page: https://github.com/jennnico'],
  ['Please contact me on LinkedIn.'],
];

class Content extends React.Component{

//Set the state. Body is empty to begin.
constructor(props){
 super(props);
  this.state = {
      clickedText: [''],
      opacity: 0
    }
}
 
  //Set the state with a new text, based on index
  handleClick = (i) => {
        this.setState({ clickedText: texts[i], opacity: 1 });
  };
 

 render(){
    const { clickedText } = this.state;
    return(
      <div>
        {/* navigation buttons */} 
        <button key={3} onClick={() => this.handleClick(3)}>Contact</button>
        <button key={2} onClick={() => this.handleClick(2)}>Portfolio</button>
        <button key={1} onClick={() => this.handleClick(1)}>About</button>
        <button key={0} onClick={() => this.handleClick(0)}>Home</button>
        <br/>
      
        {/* Content */}
<Grid>
  <Row  className="show-grid">
      <Col md={6} mdPush={6}>
        <ul>
          {clickedText.map((t, i) => (
            <div> 
              {/* Heading */}
              <li id = "name" className = "body"><h1>Jennifer Grace</h1></li>
              <li className = "body"><h2>Front-End Developer</h2></li>

              {/* Fade-in text... not working yet */}
              <ReactCSSTransitionGroup
                   transitionName="fade"
                   transitionEnter={300}
                   transitionLeave={500}>
                {/* Text to fade in/out */}
                
              <li className = "body" className = "text" style={{...styles, opacity: this.state.opacity}} key={`text-${i}`}>{t}</li> 
              </ReactCSSTransitionGroup>
           
              </div>
          ))}
       </ul>
    </Col>
    {/* 2nd column: photo */}
    <Col md={6} mdPull={6}>
      <img id="photo" alt="" src = 'https://lh3.googleusercontent.com/BXUiAqbmNM-b5zE2H6nRjqpmdYCcbkK23XHEAxxenkj5Yzp9KXbYMsbRv2-ChTv98xXTqG1UskLOX0LAAHJsn77qN1gbPHC_clwqDrd1uqHH0H0HMUcSWmwHgJmWWajHYFZawaOQWw' />
    </Col>       
  </Row>
 </Grid>
        
      </div>
    );
  }
}

ReactDOM.render(
  <div>
    <Content></Content>
  </div>, document.getElementById('root'))

              
            
!
999px

Console