render: function() { var body; if (this.state.showloading) { body = <LoadingBody />; } else if (this.state.data[this.state.datakeytoshow]) { var entry = Data.get(this.state.datakeytoshow); var bodyContent; if (entry.content) { bodyContent = <div dangerouslySetInnerHTML={{__html: entry.content}} className="make-entry-content"></div>; } else if (entry.projecturl) { bodyContent = <div> <p dangerouslySetInnerHTML={{__html: entry.description}}></p> <p> <Link path={'/projects/' + entry.projecturl} className="button">Visit project ↬</Link> </p> </div>; } else { bodyContent = <div dangerouslySetInnerHTML={{__html: entry.description}}></div>; } var postedDate = new Date(entry.posted); body = <Fade className="make-body"> <div className="header-text">{entry.title}</div> {bodyContent} <div className="make-body-date"> <span className="make-body-date-label">date </span> <DateFormat date={postedDate} /> </div> </Fade>; } if (GlobalState.useMobileVersion()) { return ( <div className="body"> {body} <MakeSidebar entryurl={this.props.entryurl} /> </div> ); } return ( <div className="body"> <MakeSidebar entryurl={this.props.entryurl} /> <div className="body-with-sidebar"> {body} </div> </div> ); }
render: function() { if (GlobalState.useMobileVersion()) { return ( <div className="topbar"> <Link path="/" className="logo"> <img src="/img/logo-icon@2x.png" height={32} /> <span className="logo-text">paul shen</span> </Link> <a href="#" className="topbar-navigate" onClick={this.onMobileNavClick}> Navigate </a> <div className="topbar-menu" style={{height: this.state.mobileMenuHeight + 'px'}} onClick={this.onMobileMenuClick}> <div className="topbar-menu-inner" ref="menuinner"> <div><Link path="/projects">Projects</Link></div> <div><Link path="/make">Lab</Link></div> <div><Link path="/photos">Photos</Link></div> <div><Link path="/about">About</Link></div> <div><a href="http://instagram.com/_paulshen" target="_blank">Instagram</a></div> </div> </div> </div> ); } return ( <div className="topbar-wrapper"> <div className="topbar"> <div className="topbar-bg" /> <Link path="/" className="logo"> <img src="/img/logo-icon@2x.png" height={32} /> <span className="logo-text">paul shen</span> </Link> <ul className="topbar-menu"> <li><Link path="/projects">Projects</Link></li> <li><Link path="/make">Lab</Link></li> <li><Link path="/photos">Photos</Link></li> <li><Link path="/about">About</Link></li> <li><a href="http://instagram.com/_paulshen" target="_blank">Instagram</a></li> </ul> </div> </div> ); }