<commit_before><%
  if(typeof user === 'undefined') user = null;
  if(typeof css === 'undefined') css = [];
  if(typeof pageTitle === 'undefined') pageTitle = null;
  if(typeof isAdmin === 'undefined') isAdmin = false;
  var userAdmin = user ? user.admin : false, userMod = user ? user.moderator || userAdmin : false;
  var renderNavItem = function(name, itemPath, icon = null) {
      let isCurrentPage = itemPath == path || (isAdmin && itemPath == "/admin");
      let iconPrefix = icon ? `<i class="fa fa-${icon} fa-fw"></i>` : "";
      return `<li ${isCurrentPage ? " class=\"active\"" : ""}>` +
        `<a href="${itemPath}">${iconPrefix}${name} ${isCurrentPage ? " <span class=\"sr-only\">(current)</span>" : ""}</a>` +
      "</li>";
  }
%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title><% if(pageTitle) { %><%= pageTitle %> &middot; <% } %>Place 2.0</title>

    <meta property="og:title" content="Place 2.0">
    <meta property="og:url" content="https://place.dynastic.co">
    <meta property="twitter:card" content="summary">
    <meta property="twitter:title" content="Place 2.0">

    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">

    <link href="/css/global.css" rel="stylesheet">

    <% css.forEach(function(cssFilename) { %>
      <link href="<%= cssFilename %>" rel="stylesheet">
    <% }) %>

    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body class="fixed-navbar<% if(user) { %> signed-in<% } %>" data-user-is-mod="<%= userMod %>" data-user-is-admin="<%= userAdmin %>" data-user-id="<%= user ? user._id : ""; %>">
    <nav class="navbar navbar-default navbar-fixed-top<% if(isAdmin) { %> navbar-inverse<% } %>">
      <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/">Place 2.0 <span class="label label-warning beta-label">beta</span><% if(config.debug) { %> <span class="label label-danger beta-label">debug</span><% } %></a>
        </div>

        <div class="collapse navbar-collapse" id="navbar-collapse">
          <ul class="nav navbar-nav">
            <%- renderNavItem("Home", "/", "home"); %>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users fa-fw"></i>Community <span class="caret"></span></a>
              <ul class="dropdown-menu">
                <%- renderNavItem("Official Subreddit", "https://www.reddit.com/r/place20", "reddit-alien"); %>
                <%- renderNavItem("Chat on Discord", "https://discord.gg/CgC8FTg", "comments"); %>
                <%- renderNavItem("Internet World Congress", "https://discord.gg/nQ4m2Gv", "globe"); %>
              </ul>
            </li>
            <%- renderNavItem("Donate", "https://www.paypal.me/AppleBetasPay", "money"); %>
            <% if(user && userMod) { %><%- renderNavItem(userAdmin ? "Admin" : "Moderator", "/admin", "gavel"); %><% } %>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <% if(user) { %>
              <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user fa-fw"></i><%= user.usernameSet ? user.name : "" %> <span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <%- renderNavItem("Account details", "/account", "pencil-square-o"); %>
                  <li role="separator" class="divider"></li>
                  <%- renderNavItem("Sign out", "/signout", "sign-out"); %>
                </ul>
              </li>
            <% } else { %>
              <%- renderNavItem("Sign in", "/signin", "sign-in"); %>
              <%- renderNavItem("Sign up", "/signup", "user-plus"); %>
            <% } %>
          </ul>
        </div>
      </div>
    </nav>
<commit_msg>Made the username in navbar editable by JS :)<commit_after><%
  if(typeof user === 'undefined') user = null;
  if(typeof css === 'undefined') css = [];
  if(typeof pageTitle === 'undefined') pageTitle = null;
  if(typeof isAdmin === 'undefined') isAdmin = false;
  var userAdmin = user ? user.admin : false, userMod = user ? user.moderator || userAdmin : false;
  var renderNavItem = function(name, itemPath, icon = null) {
      let isCurrentPage = itemPath == path || (isAdmin && itemPath == "/admin");
      let iconPrefix = icon ? `<i class="fa fa-${icon} fa-fw"></i>` : "";
      return `<li ${isCurrentPage ? " class=\"active\"" : ""}>` +
        `<a href="${itemPath}">${iconPrefix}${name} ${isCurrentPage ? " <span class=\"sr-only\">(current)</span>" : ""}</a>` +
      "</li>";
  }
%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title><% if(pageTitle) { %><%= pageTitle %> &middot; <% } %>Place 2.0</title>

    <meta property="og:title" content="Place 2.0">
    <meta property="og:url" content="https://place.dynastic.co">
    <meta property="twitter:card" content="summary">
    <meta property="twitter:title" content="Place 2.0">

    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">

    <link href="/css/global.css" rel="stylesheet">

    <% css.forEach(function(cssFilename) { %>
      <link href="<%= cssFilename %>" rel="stylesheet">
    <% }) %>

    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body class="fixed-navbar<% if(user) { %> signed-in<% } %>" data-user-is-mod="<%= userMod %>" data-user-is-admin="<%= userAdmin %>" data-user-id="<%= user ? user._id : ""; %>">
    <nav class="navbar navbar-default navbar-fixed-top<% if(isAdmin) { %> navbar-inverse<% } %>">
      <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/">Place 2.0 <span class="label label-warning beta-label">beta</span><% if(config.debug) { %> <span class="label label-danger beta-label">debug</span><% } %></a>
        </div>

        <div class="collapse navbar-collapse" id="navbar-collapse">
          <ul class="nav navbar-nav">
            <%- renderNavItem("Home", "/", "home"); %>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users fa-fw"></i>Community <span class="caret"></span></a>
              <ul class="dropdown-menu">
                <%- renderNavItem("Official Subreddit", "https://www.reddit.com/r/place20", "reddit-alien"); %>
                <%- renderNavItem("Chat on Discord", "https://discord.gg/CgC8FTg", "comments"); %>
                <%- renderNavItem("Internet World Congress", "https://discord.gg/nQ4m2Gv", "globe"); %>
              </ul>
            </li>
            <%- renderNavItem("Donate", "https://www.paypal.me/AppleBetasPay", "money"); %>
            <% if(user && userMod) { %><%- renderNavItem(userAdmin ? "Admin" : "Moderator", "/admin", "gavel"); %><% } %>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <% if(user) { %>
              <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user fa-fw"></i><span name="user-dropdown"><%= user.usernameSet ? user.name : "" %></span> <span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <%- renderNavItem("Account details", "/account", "pencil-square-o"); %>
                  <li role="separator" class="divider"></li>
                  <%- renderNavItem("Sign out", "/signout", "sign-out"); %>
                </ul>
              </li>
            <% } else { %>
              <%- renderNavItem("Sign in", "/signin", "sign-in"); %>
              <%- renderNavItem("Sign up", "/signup", "user-plus"); %>
            <% } %>
          </ul>
        </div>
      </div>
    </nav>

{'fraction_non_alphanumeric': 0.21668021129622106, 'fraction_numerical': 0.006095083299471759, 'mean_word_length': 2.8607843137254902, 'pattern_counts': {'":': 0, '<': 239, '<?xml version=': 0, '>': 239, 'https://': 18, 'lorem ipsum': 0, 'www.': 4, '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': '5728617', 'n_tokens_mistral': 3275, 'n_tokens_neox': 3092, 'n_words': 584}