<commit_before>﻿<div id="BrowseContent" class="content">
    @await Html.PartialAsync("_BrowsePartial")
</div>
<div id="BlameContent" class="content">
    @await Html.PartialAsync("_BlamePartial")
</div>
<div id="PlayContent" class="content">
    @await Html.PartialAsync("_PlayPartial")
</div>
<div id="SnitchContent" class="content">
    @await Html.PartialAsync("_SnitchPartial", ViewData["SnitchUrl"])
</div>

@section MenuItems
{
    <li onclick="showBrowse();" style="cursor: pointer;">
        <a>Browse</a>
    </li>
    <li onclick="showBlame();" style="cursor: pointer;">
        <a>Blame</a>
    </li>
    <li onclick="showPlay();" style="cursor: pointer;">
        <a>Play</a>
    </li>
    <li onclick="showSnitch();" style="cursor: pointer;">
        <a>Snitch</a>
    </li>
}

@section Scripts
{
    <script>
        $(init);

        function init() {
            initThreeJS();
            const url = '@ViewData["StorageUrl"]';
            initReplay(url);

            showContent("BlameContent");
        }

        function showContent(id) {
            const contents = document.getElementsByClassName("content");
            const count = contents.length;
            for (let i = 0; i < count; i++) {
                const content = contents[i];
                content.hidden = content.id !== id;
            }
        }

        function showBrowse() {
            showContent("BrowseContent");
        }

        function showBlame() {
            showContent("BlameContent");
        }

        function showPlay() {
            showContent("PlayContent");
        }

        function showSnitch() {
            showContent("SnitchContent");
        }
    </script>
}<commit_msg>refactoring navigation<commit_after>﻿<div class="content" data-content="browse">
    @await Html.PartialAsync("_BrowsePartial")
</div>
<div class="content" data-content="blame">
    @await Html.PartialAsync("_BlamePartial")
</div>
<div class="content" data-content="play">
    @await Html.PartialAsync("_PlayPartial")
</div>
<div class="content" data-content="snitch">
    @await Html.PartialAsync("_SnitchPartial", ViewData["SnitchUrl"])
</div>

@section MenuItems
{
    <li onclick="changeView(this);" data-content="browse">
        <a href="#">Browse</a>
    </li>
    <li onclick="changeView(this);" data-content="blame">
        <a href="#">Blame</a>
    </li>
    <li onclick="changeView(this);" data-content="play">
        <a href="#">Play</a>
    </li>
    <li onclick="changeView(this);" data-content="snitch">
        <a href="#">Snitch</a>
    </li>
}

@section Scripts
{
    <script>
        $(init);

        function init() {
            initThreeJS();
            const url = '@ViewData["StorageUrl"]';
            initReplay(url);

            changeView();
        }

        function changeView(li) {
            const c = (li && li.dataset.content) || "blame";
            const contents = document.getElementsByClassName("content");
            const count = contents.length;
            for (let i = 0; i < count; i++) {
                const content = contents[i];
                content.hidden = content.dataset.content !== c;
            }
        }
    </script>
}
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.0006253908692933083, 'mean_word_length': 2.4140875133404482, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 55, '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': '2889683', 'n_tokens_mistral': 993, 'n_tokens_neox': 973, 'n_words': 188}