<commit_before>const React = require('react');

const Navbar = require('react-bootstrap/lib/Navbar');
const Nav = require('react-bootstrap/lib/Nav');
const NavItem = require('react-bootstrap/lib/NavItem');

const Grid = require('react-bootstrap/lib/Grid');
const Row = require('react-bootstrap/lib/Row');

class Layout extends React.Component {
  constructor(props) {
    super(props);
    this.state = { navExpanded: false };
  }
  render() {
    let button;
    if (this.props.auth && this.props.auth.isAuthenticated) {
      button = <NavItem href="/logout">{this.props.auth.username} 로그아웃</NavItem>;
    } else {
      button = <NavItem href="/login">로그인</NavItem>;
    }
    return (
      <html lang="ko">
        <head>
          <title>긴급 공지사항 등록 시스템</title>
          <meta name="viewport" content="width=device-width, user-scalable=no" />
          <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
          <link rel="stylesheet" href="/public/assets/client.bundle.css" />
        </head>
        <body>
          <Navbar expanded={this.state.navExpanded} onToggle={navExpanded => this.setState({ navExpanded })}>
            <Navbar.Header>
              <Navbar.Brand>긴급 공지사항 등록 시스템</Navbar.Brand>
              <Navbar.Toggle />
            </Navbar.Header>
            <Navbar.Collapse>
              <Nav activeKey={this.props.viewName}>
                {this.props.menus.map(menu => <NavItem eventKey={menu.viewName} href={menu.url}>{menu.title}</NavItem>)}
              </Nav>
              <Nav pullRight>{button}</Nav>
            </Navbar.Collapse>
          </Navbar>
          <Grid>
            <Row id="app-main" />
          </Grid>
          <script id="app-state" dangerouslySetInnerHTML={{ __html: this.props.state }} />
          <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" />
          <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" />
          <script src="https://unpkg.com/react@15.4.1/dist/react.min.js" />
          <script src="https://unpkg.com/react-dom@15.4.1/dist/react-dom.min.js" />

          <script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.30.7/react-bootstrap.min.js" />

          <script src="/public/assets/client.bundle.js" />
        </body>
      </html>
    );
  }
}

Layout.propTypes = {
  auth: React.PropTypes.object,
  state: React.PropTypes.string,
  viewName: React.PropTypes.string,
  menus: React.PropTypes.array,
};<commit_msg>“Fork me on Github”<commit_after>const React = require('react');

const Navbar = require('react-bootstrap/lib/Navbar');
const Nav = require('react-bootstrap/lib/Nav');
const NavItem = require('react-bootstrap/lib/NavItem');

const Grid = require('react-bootstrap/lib/Grid');
const Row = require('react-bootstrap/lib/Row');

class Layout extends React.Component {
  constructor(props) {
    super(props);
    this.state = { navExpanded: false };
  }
  render() {
    let button;
    if (this.props.auth && this.props.auth.isAuthenticated) {
      button = <NavItem href="/logout">{this.props.auth.username} 로그아웃</NavItem>;
    } else {
      button = <NavItem href="/login">로그인</NavItem>;
    }
    return (
      <html lang="ko">
        <head>
          <title>긴급 공지사항 등록 시스템</title>
          <meta name="viewport" content="width=device-width, user-scalable=no" />
          <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
          <link rel="stylesheet" href="/public/assets/client.bundle.css" />
        </head>
        <body>
          <Navbar expanded={this.state.navExpanded} onToggle={navExpanded => this.setState({ navExpanded })}>
            <Navbar.Header>
              <Navbar.Brand>긴급 공지사항 등록 시스템</Navbar.Brand>
              <Navbar.Toggle />
            </Navbar.Header>
            <Navbar.Collapse>
              <Nav activeKey={this.props.viewName}>
                {this.props.menus.map(menu => <NavItem eventKey={menu.viewName} href={menu.url}>{menu.title}</NavItem>)}
              </Nav>
              <Nav pullRight>{button}</Nav>
            </Navbar.Collapse>
          </Navbar>
          <Grid>
            <Row id="app-main" />
          </Grid>
          <script id="app-state" dangerouslySetInnerHTML={{ __html: this.props.state }} />
          <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" />
          <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" />
          <script src="https://unpkg.com/react@15.4.1/dist/react.min.js" />
          <script src="https://unpkg.com/react-dom@15.4.1/dist/react-dom.min.js" />

          <script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.30.7/react-bootstrap.min.js" />

          <script src="/public/assets/client.bundle.js" />

          <a href="https://github.com/ridibooks/viewer-notification" target="_blank"><img style={{ 'position': 'absolute', 'top': 0, 'right': 0, 'border': 0 }} src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" /></a>
        </body>
      </html>
    );
  }
}

Layout.propTypes = {
  auth: React.PropTypes.object,
  state: React.PropTypes.string,
  viewName: React.PropTypes.string,
  menus: React.PropTypes.array,
};
{'fraction_non_alphanumeric': 0.16939989187240945, 'fraction_numerical': 0.03369976572355379, 'mean_word_length': 2.639344262295082, 'pattern_counts': {'":': 0, '<': 86, '<?xml version=': 0, '>': 90, 'https://': 15, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2066491', 'n_tokens_mistral': 2007, 'n_tokens_neox': 1947, 'n_words': 256}