<commit_before><?php
$projects = $db->data('SELECT id, creator, name, slug, screen_count FROM project WHERE creator = ' . userid() . ' ORDER BY name ASC');
?>
<h3>Account<a class="btn-logout" href="<?= R ?>auth/?wipe=1">Logout</a></h3>
<div class="usermeta">
    <div class="avatar"><img src="<?= $_SESSION['user']['twitter']->profile_image_url ?>" width="48" height="48" /></div>
    <div class="info">
        <p class="username"><?= $_SESSION['user']['twitter']->name ?></p>
        <p>@<?= $_SESSION['user']['twitter']->screen_name ?></p>
    </div>
</div>
<h3>Projects<a class="btn-add-project" href="javascript:;">+ Add</a></h3>
<div class="add-project">
    <input class="project-name" type="text" placeholder="Project Name" />
    <input class="add-project-submit" type="button" value="Add Project" />
</div>
<? if (sizeof($projects) == 0) { ?>
<div class="notice">You don't have any projects yet.</div>
<? } ?>
<ul>
    <? foreach ($projects as $p) { ?>
    <? $notifications = $p['id'] == 5 ? '<span class="notifications">5</span>' : ''; ?>
    <li <?= $p['id'] == $project_id ? 'class="active"': '' ?>>
        <a href="<?= R ?>project/<?= $p['creator'] ?>/<?= $p['slug'] ?>/"><?= $p['name'] ?> <span class="count"><?= $p['screen_count'] ?></span><?= $notifications ?></a>
    </li>
    <? } ?>
</ul>
<!-- Project Settings -->
<? if ($project_id > 0) { ?>
<h3><?= $project['name'] ?></h3>
<ul>
    <li><a href="<?= R ?>guide/<?= $project_id ?>">Styleguide (Draft)</a></li>
    <li><a href="javascript:;" data-project="<?= $project_id ?>" class="btn-delete-project">Delete Project</a></li>
</ul>
<!-- Color Library -->
<h3>Color Library<a class="btn-export-sass" href="javascript:;">&#8677; SCSS</a><a class="btn-export-css" href="javascript:;">&#8677; LESS</a></h3>
<? $colors = $db->data("SELECT id, hex, name, name_css FROM project_color WHERE project = '" . $project_id . "' ORDER BY hue ASC"); ?>
<div class="colors">
    <? foreach ($colors as $color) { ?>
    <a href="javascript:;" rel="tooltip" title="<?= $color['name'] ?> – #<?= $color['hex'] ?>" data-less="@<?= $color['name_css'] ?>: #<?= $color['hex'] ?>;" data-sass="$<?= $color['name_css'] ?>: #<?= $color['hex'] ?>;" class="color color-<?= $color['id'] ?>" style="background: #<?= $color['hex'] ?>"><?= $color['hex'] ?></a>
    <? } ?>
</div>
<?php
    $collaborators = $db->data('SELECT id, email FROM project_collaborator WHERE creator = ' . userid() . ' AND project = ' . $project_id . ' ORDER BY email ASC');
    ?>
<h3>Collaborators<a class="btn-add-collaborator" href="javascript:;">+ Add</a></h3>
<div class="add-collaborator">
    <input class="collaborator-email" data-project-id="<?= $project_id ?>" type="text" placeholder="E-Mail" />
    <input class="add-collaborator-submit" type="button" value="Add User" />
</div>
<? if (sizeof($collaborators) == 0) { ?>
    <div class="notice">You don't have any collaborators yet.</div>
    <? } ?>
<ul class="collaborators">
    <? foreach ($collaborators as $c) { ?>
    <li>
        <a class="edit-collaborator" data-id="<?= $c['id'] ?>" href="#"><?= $c['email'] ?> <span class="remove">&times;</span></a>
    </li>
    <? } ?>
</ul>
<? } ?><commit_msg>added message for empty color library.<commit_after><?php
$projects = $db->data('SELECT id, creator, name, slug, screen_count FROM project WHERE creator = ' . userid() . ' ORDER BY name ASC');
?>
<h3>Account<a class="btn-logout" href="<?= R ?>auth/?wipe=1">Logout</a></h3>
<div class="usermeta">
    <div class="avatar"><img src="<?= $_SESSION['user']['twitter']->profile_image_url ?>" width="48" height="48" /></div>
    <div class="info">
        <p class="username"><?= $_SESSION['user']['twitter']->name ?></p>
        <p>@<?= $_SESSION['user']['twitter']->screen_name ?></p>
    </div>
</div>
<h3>Projects<a class="btn-add-project" href="javascript:;">+ Add</a></h3>
<div class="add-project">
    <input class="project-name" type="text" placeholder="Project Name" />
    <input class="add-project-submit" type="button" value="Add Project" />
</div>
<? if (sizeof($projects) == 0) { ?>
<div class="notice">You don't have any projects yet.</div>
<? } ?>
<ul>
    <? foreach ($projects as $p) { ?>
    <? $notifications = $p['id'] == 5 ? '<span class="notifications">5</span>' : ''; ?>
    <li <?= $p['id'] == $project_id ? 'class="active"': '' ?>>
        <a href="<?= R ?>project/<?= $p['creator'] ?>/<?= $p['slug'] ?>/"><?= $p['name'] ?> <span class="count"><?= $p['screen_count'] ?></span><?= $notifications ?></a>
    </li>
    <? } ?>
</ul>
<!-- Project Settings -->
<? if ($project_id > 0) { ?>
<h3><?= $project['name'] ?></h3>
<ul>
    <li><a href="<?= R ?>guide/<?= $project_id ?>">Styleguide (Draft)</a></li>
    <li><a href="javascript:;" data-project="<?= $project_id ?>" class="btn-delete-project">Delete Project</a></li>
</ul>
<!-- Color Library -->
<h3>Color Library<a class="btn-export-sass" href="javascript:;">&#8677; SCSS</a><a class="btn-export-css" href="javascript:;">&#8677; LESS</a></h3>
<? $colors = $db->data("SELECT id, hex, name, name_css FROM project_color WHERE project = '" . $project_id . "' ORDER BY hue ASC"); ?>
<? if (sizeof($colors) == 0) { ?>
    <div class="notice">You don't have any colors yet.</div>
<? } ?>
<div class="colors">
    <? foreach ($colors as $color) { ?>
    <a href="javascript:;" rel="tooltip" title="<?= $color['name'] ?> – #<?= $color['hex'] ?>" data-less="@<?= $color['name_css'] ?>: #<?= $color['hex'] ?>;" data-sass="$<?= $color['name_css'] ?>: #<?= $color['hex'] ?>;" class="color color-<?= $color['id'] ?>" style="background: #<?= $color['hex'] ?>"><?= $color['hex'] ?></a>
    <? } ?>
</div>
<?php
    $collaborators = $db->data('SELECT id, email FROM project_collaborator WHERE creator = ' . userid() . ' AND project = ' . $project_id . ' ORDER BY email ASC');
    ?>
<h3>Collaborators<a class="btn-add-collaborator" href="javascript:;">+ Add</a></h3>
<div class="add-collaborator">
    <input class="collaborator-email" data-project-id="<?= $project_id ?>" type="text" placeholder="E-Mail" />
    <input class="add-collaborator-submit" type="button" value="Add User" />
</div>
<? if (sizeof($collaborators) == 0) { ?>
    <div class="notice">You don't have any collaborators yet.</div>
<? } ?>
<ul class="collaborators">
    <? foreach ($collaborators as $c) { ?>
    <li>
        <a class="edit-collaborator" data-id="<?= $c['id'] ?>" href="#"><?= $c['email'] ?> <span class="remove">&times;</span></a>
    </li>
    <? } ?>
</ul>
<? } ?>
{'fraction_non_alphanumeric': 0.28241453649522635, 'fraction_numerical': 0.008777332922697875, 'mean_word_length': 4.579896907216495, 'pattern_counts': {'":': 0, '<': 247, '<?xml version=': 0, '>': 261, 'https://': 0, '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': '3220450', 'n_tokens_mistral': 2322, 'n_tokens_neox': 2311, 'n_words': 485}