React

by Abdul Ahmad

HTML

<div id="app"></div>

SCSS

html, body {
  // background: #20262E;
  margin: 0;
  font-family: Helvetica;
  height: 100%;
  font-size: 14px;
}

#app {
  width: 100%;
  height: 100%;
  // border: 2px solid red;
  transition: all 0.2s;
  box-sizing: border-box;
}

.phone-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.phone {
  margin-top: -20px;
  width: 350px;
  height: 650px;
  border-radius: 20px;
  box-shadow: 0 3px 20px 0 rgba(212, 208, 220, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 15px;
  border: 1px solid #eee;
  position: relative;
  overflow: hidden;
}

.background-image {
    background-image: url(https://images.unsplash.com/photo-1444210971048-6130cf0c46cf?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2552&q=80);
  background-position: center;
  background-size: cover;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  // filter: blur(5px);
  // border: 1px solid red;
  box-sizing: border-box;
}

.app-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  // background-color: rgba(255, 255, 255, 0.7);
  background-color: rgba(0, 0, 0, 0.3);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.app-ui__body {
  flex-grow: 1;
  flex-shrink: 1;
  position: relative;
}

.app-name {
  color: white;
  font-weight: 100;
  margin: 40px auto 0;
  width: 150px;
  // border: 1px dashed white;
  text-align: center;
  font-size: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed white;
}

.app-ui__bottom-nav {
  flex-grow: 0;
  flex-shrink: 0;
  background: white;
  height: 50px;
}

.page-body {
  
}

.info-container {
  margin: 0 5px 0;
}

.info {
  background: rgba(255, 255, 255, 0.8);
  padding: 15px;
  box-sizing: border-box;
  border-radius: 3px;
  // color: white;
  margin: 10px 10px 0;
 ...

React

class PageBody extends React.Component {
	render() {
  	return (
    	<div className='page-body'>
    	  {
          /* <ul className='info-container'>
            <li className='info'>
              There are 3 soccer events in progress and 2 forming right now
            </li>
            <li className='info'>
              lorem ipsum dolor sit amet
            </li>
          </ul> */
        }
        <div className='app-name'>
          RSVIPI
        </div>
        <div className='info-circles'>
          <div className='info-circle'>
            <div className='main'>
              400 
            </div>
            <div className='sub'>
              Events happening now
            </div>
          </div>
          <div className='info-circle'>
            <div className='main'>
              29 
            </div>
            <div className='sub'>
              Events looking for people
            </div>
          </div>
        </div>
        <div className='actions__event-info'>
          <div className='button'>
            Browse events
          </div>
        </div>
        <div className='primary-actions'>
          <div className='action action__start-event'>
            <div className='text'>+</div>
          </div>
        </div>
    	</div>
    );
  }
}

class BottomNav extends React.Component {
	render() {
  	return (
    	<div className='bttom-nav'>
    	</div>
    );
  }
}

class AppUi extends React.Component {
	render() {
  	return (
    	<div className='app-ui'>
        <div className='app-ui__body'>
          <PageBody />
    	  </div>
    	  {
        /* <div className='app-ui__bottom-nav'>
                  <BottomNav />
                </div> */
        }
    	</div>
    );
  }
}


class App extends React.Component {
  render() {
    return (
      <div className='phone-container'>
        <div className='phone'>
          <div className='screen'>
            <div className='background-image' />
            <AppUi />
         ...