<commit_before>﻿@model FotM.Portal.ViewModels.ArmoryViewModel
@using FotM.Config

@{
    ViewBag.Title = "FotM";
}

@section scripts
{
    <!-- TODO: switch to release(minified) versions of scripts -->
    @Scripts.Render("~/bundles/activeView")
    <script src="~/signalr/hubs"></script>
    @*<script src="~/Scripts/Home/index_01.js"></script>*@
    @*<script src="~/Scripts/Home/main.js"></script>*@
    @Scripts.Render("~/bundles/3v3")
}

@section onReady
{
    var armory = @Html.Raw(Json.Encode(Model))
    var media = @Html.Raw(Json.Encode(ViewBag.Media))

    var main = new Main("@(RegionalConfig.Instance.Region)", 
        "@(RegionalConfig.Instance.BlizzardApiEndPoint)",
        armory, 
        media)
}

<div class="row pager">
    <a role="button" class="btn btn-lg btn-default"
       data-bind="css: { active: leaderboardSelected }, click: leaderboardClicked"
       id="leaderboardBtn">
        Leaderboard
    </a>
    <a role="button" class="btn btn-lg btn-default"
       data-bind="css: { active: playingNowSelected }, click: playingNowClicked"
       id="playingNowBtn">
        Playing now
    </a>
</div>

<div class="row" data-bind="visible: playingNowSelected">
    <div class="col-lg-12">
        <table class="table table-striped table-condensed table-responsive">
            <thead>
                <tr class="hidden-xs hidden-sm">
                    <th>#</th>
                    <th class="hidden-xs hidden-sm">Side</th>
                    <th></th>
                    <th>Rating</th>
                    <th class="hidden-xs hidden-sm">Change</th>
                    <th class="hidden-xs hidden-sm">Seen</th>
                </tr>
            </thead>

            <tbody data-bind="foreach: playingNowTeams">
                <tr>
                    <td class="centered" data-bind="text: Rank"></td>
                    <td class="hidden-xs hidden-sm vcentered">
                        <img data-bind="attr:{src: $root.media.toFactionImage(FactionId)}" alt="FactionImage" />
                    </td>

                    <td>
                        <div class="row">
                            <!-- ko foreach: Players -->
                            <div class="col-lg-4 col-md-4 col-sm-4 nopadding">
                                <a data-bind="attr: {href: $root.media.armoryLink($data)}" class="nolink">
                                    @Html.Partial("PartialCharacterView")
                                    <span class="hidden-sm hidden-md">-</span>
                                    <span class="hidden-sm hidden-md" data-bind="text: Realm"></span>
                                </a>
                            </div>
                            <!-- /ko -->
                        </div>
                    </td>

                    <td class="centered" data-bind="text: Rating, css: DeltaType"></td>
                    <td class="hidden-xs centered" data-bind="text: RatingChange, css: DeltaType"></td>
                    <td class="hidden-xs hidden-sm centered" data-bind="text: $root.toLocal(Updated), css: DeltaType"></td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

<div class="row" data-bind="visible: leaderboardSelected">
    <div class="col-lg-3 col-md-3 col-sm-5">
        <!-- FILTERS -->
        <div class="btn-group btn-group-justified">
            <div class="btn-group btn-group-vertical">
                <div class="btn-group btn-group-sm"><span class="btn btn-block label">Class</span></div>
                <div class="btn-group btn-group-sm"><span class="btn btn-block label">Spec</span></div>
            </div>
            <!-- ko foreach: setupFilters-->
            <div class="btn-group btn-group-vertical">

                <div class="dropdown btn-group btn-group-sm">

                    <!-- Dropdown button -->
                    <button type="button" class="dropdown-toggle btn btn-default" data-toggle="dropdown"
                            data-bind="html: $root.filterClassView($index), attr: {disabled: $root.serverActionsDisabled()}"></button>

                    <!-- Dropdown menu -->
                    <ul class="dropdown-menu" role="menu">
                        <!-- ko foreach: $root.allClasses -->
                        <li>
                            <a data-bind="click: function() { $root.updateClassFilter($parentContext.$index, $data); }">
                                <img data-bind="attr:{src: $root.media.toClassImage($data)}" alt="ClassImage" />
                            </a>
                        </li>
                        <!-- /ko -->
                        <li class="notext">
                            <a data-bind="click: function() { $root.updateClassFilter($index, null); }">All</a>
                        </li>
                    </ul>
                </div>

                <div class="dropdown btn-group btn-group-sm">

                    <!-- Dropdown button -->
                    <button type="button" class="dropdown-toggle btn btn-default" data-toggle="dropdown"
                            data-bind="html: $root.filterSpecView($index), attr: {disabled: $root.serverActionsDisabled()}"></button>

                    <!-- Dropdown menu -->
                    <ul class="dropdown-menu" role="menu">
                        <!-- ko foreach: $root.specsFor($index) -->
                        <li>
                            <a data-bind="click: function() { $root.updateSpecFilter($parentContext.$index, $data); }">
                                <img data-bind="attr:{src: $root.media.toSpecImage(specId)}" alt="ClassImage" />
                            </a>
                        </li>
                        <!-- /ko -->
                        <li class="notext">
                            <a data-bind="click: function() { $root.updateSpecFilter($index, null); }">All</a>
                        </li>
                    </ul>
                </div>
            </div>
            <!-- /ko -->
        </div>
        
        <!-- FOTM TABLE -->
        <table class="table table-striped table-condensed table-responsive table-hover">
            <tbody data-bind="foreach: fotmSetups">
                <tr data-bind="click: $parent.showTeams, css: {success: $parent.isSetupSelected($data)}" class="notext">
                    <td class="hidden-md" data-bind="text: Rank"></td>
                    <!-- ko foreach: Specs -->
                    <td>
                        <img data-bind="attr:{src: $root.media.toClassImage(ClassId)}" alt="ClassImage" />
                        <img data-bind="attr:{src: $root.media.toSpecImage(SpecId)}" alt="SpecImage" />
                    </td>
                    <!-- /ko -->
                    <td data-bind="text: Percent"></td>
                </tr>
            </tbody>
        </table>

        <br/>

        @Html.Partial("DonateButton", RegionalConfig.Instance.Region)
    </div>

    <!-- FOTM SELECTED SETUP -->
    <div class="col-lg-9 col-md-9 col-sm-12">
        <table class="table table-striped table-condensed table-responsive">
            <tbody data-bind="foreach: fotmTeams">
                <tr>
                    <td class="centered" data-bind="text: Rank"></td>
                    <td class="hidden-xs">
                        <img data-bind="attr:{src: $root.media.toFactionImage(FactionId)}" alt="FactionImage" />
                    </td>
                    <td>
                        <div class="row">
                            <!-- ko foreach: Players -->
                            <div class="col-lg-4 col-md-4 col-sm-4">
                                <a data-bind="attr: {href: $root.media.armoryLink($data)}" class="nolink">
                                    <img data-bind="attr:{src: $root.media.toRaceImage(RaceId)}" alt="RaceImage" />
                                    <img class="hidden-xs" data-bind="attr:{src: $root.media.toClassImage(ClassId)}" alt="ClassImage" />
                                    <img data-bind="attr:{src: $root.media.toSpecImage(SpecId)}" alt="SpecImage" />
                                    <span data-bind="text: Name"></span>
                                </a>
                            </div>
                            <!-- /ko -->
                        </div>
                    </td>
                    <td data-bind="text: Rating" class="centered"></td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<commit_msg>Removed "flashing" effect on page load.<commit_after>﻿@model FotM.Portal.ViewModels.ArmoryViewModel
@using FotM.Config

@{
    ViewBag.Title = "FotM";
}

@section scripts
{
    <!-- TODO: switch to release(minified) versions of scripts -->
    @Scripts.Render("~/bundles/activeView")
    <script src="~/signalr/hubs"></script>
    @*<script src="~/Scripts/Home/index_01.js"></script>*@
    @*<script src="~/Scripts/Home/main.js"></script>*@
    @Scripts.Render("~/bundles/3v3")
}

@section onReady
{
    var armory = @Html.Raw(Json.Encode(Model))
    var media = @Html.Raw(Json.Encode(ViewBag.Media))

    var main = new Main("@(RegionalConfig.Instance.Region)",
    "@(RegionalConfig.Instance.BlizzardApiEndPoint)",
    armory,
    media)
}

<div class="hidden" data-bind="css: {hidden: false}">

    <div class="row pager">
        <a role="button" class="btn btn-lg btn-default"
           data-bind="css: { active: leaderboardSelected }, click: leaderboardClicked"
           id="leaderboardBtn">
            Leaderboard
        </a>
        <a role="button" class="btn btn-lg btn-default"
           data-bind="css: { active: playingNowSelected }, click: playingNowClicked"
           id="playingNowBtn">
            Playing now
        </a>
    </div>

    <div class="row" data-bind="visible: playingNowSelected">
        <div class="col-lg-12">
            <table class="table table-striped table-condensed table-responsive">
                <thead>
                    <tr class="hidden-xs hidden-sm">
                        <th>#</th>
                        <th class="hidden-xs hidden-sm">Side</th>
                        <th></th>
                        <th>Rating</th>
                        <th class="hidden-xs hidden-sm">Change</th>
                        <th class="hidden-xs hidden-sm">Seen</th>
                    </tr>
                </thead>

                <tbody data-bind="foreach: playingNowTeams">
                    <tr>
                        <td class="centered" data-bind="text: Rank"></td>
                        <td class="hidden-xs hidden-sm vcentered">
                            <img data-bind="attr:{src: $root.media.toFactionImage(FactionId)}" alt="FactionImage" />
                        </td>

                        <td>
                            <div class="row">
                                <!-- ko foreach: Players -->
                                <div class="col-lg-4 col-md-4 col-sm-4 nopadding">
                                    <a data-bind="attr: {href: $root.media.armoryLink($data)}" class="nolink">
                                        @Html.Partial("PartialCharacterView")
                                        <span class="hidden-sm hidden-md">-</span>
                                        <span class="hidden-sm hidden-md" data-bind="text: Realm"></span>
                                    </a>
                                </div>
                                <!-- /ko -->
                            </div>
                        </td>

                        <td class="centered" data-bind="text: Rating, css: DeltaType"></td>
                        <td class="hidden-xs centered" data-bind="text: RatingChange, css: DeltaType"></td>
                        <td class="hidden-xs hidden-sm centered" data-bind="text: $root.toLocal(Updated), css: DeltaType"></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="row" data-bind="visible: leaderboardSelected">
        <div class="col-lg-3 col-md-3 col-sm-5">
            <!-- FILTERS -->
            <div class="btn-group btn-group-justified">
                <div class="btn-group btn-group-vertical">
                    <div class="btn-group btn-group-sm"><span class="btn btn-block label">Class</span></div>
                    <div class="btn-group btn-group-sm"><span class="btn btn-block label">Spec</span></div>
                </div>
                <!-- ko foreach: setupFilters-->
                <div class="btn-group btn-group-vertical">

                    <div class="dropdown btn-group btn-group-sm">

                        <!-- Dropdown button -->
                        <button type="button" class="dropdown-toggle btn btn-default" data-toggle="dropdown"
                                data-bind="html: $root.filterClassView($index), attr: {disabled: $root.serverActionsDisabled()}"></button>

                        <!-- Dropdown menu -->
                        <ul class="dropdown-menu" role="menu">
                            <!-- ko foreach: $root.allClasses -->
                            <li>
                                <a data-bind="click: function() { $root.updateClassFilter($parentContext.$index, $data); }">
                                    <img data-bind="attr:{src: $root.media.toClassImage($data)}" alt="ClassImage" />
                                </a>
                            </li>
                            <!-- /ko -->
                            <li class="notext">
                                <a data-bind="click: function() { $root.updateClassFilter($index, null); }">All</a>
                            </li>
                        </ul>
                    </div>

                    <div class="dropdown btn-group btn-group-sm">

                        <!-- Dropdown button -->
                        <button type="button" class="dropdown-toggle btn btn-default" data-toggle="dropdown"
                                data-bind="html: $root.filterSpecView($index), attr: {disabled: $root.serverActionsDisabled()}"></button>

                        <!-- Dropdown menu -->
                        <ul class="dropdown-menu" role="menu">
                            <!-- ko foreach: $root.specsFor($index) -->
                            <li>
                                <a data-bind="click: function() { $root.updateSpecFilter($parentContext.$index, $data); }">
                                    <img data-bind="attr:{src: $root.media.toSpecImage(specId)}" alt="ClassImage" />
                                </a>
                            </li>
                            <!-- /ko -->
                            <li class="notext">
                                <a data-bind="click: function() { $root.updateSpecFilter($index, null); }">All</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <!-- /ko -->
            </div>

            <!-- FOTM TABLE -->
            <table class="table table-striped table-condensed table-responsive table-hover">
                <tbody data-bind="foreach: fotmSetups">
                    <tr data-bind="click: $parent.showTeams, css: {success: $parent.isSetupSelected($data)}" class="notext">
                        <td class="hidden-md" data-bind="text: Rank"></td>
                        <!-- ko foreach: Specs -->
                        <td>
                            <img data-bind="attr:{src: $root.media.toClassImage(ClassId)}" alt="ClassImage" />
                            <img data-bind="attr:{src: $root.media.toSpecImage(SpecId)}" alt="SpecImage" />
                        </td>
                        <!-- /ko -->
                        <td data-bind="text: Percent"></td>
                    </tr>
                </tbody>
            </table>

            <br />

            @Html.Partial("DonateButton", RegionalConfig.Instance.Region)
        </div>

        <!-- FOTM SELECTED SETUP -->
        <div class="col-lg-9 col-md-9 col-sm-12">
            <table class="table table-striped table-condensed table-responsive">
                <tbody data-bind="foreach: fotmTeams">
                    <tr>
                        <td class="centered" data-bind="text: Rank"></td>
                        <td class="hidden-xs">
                            <img data-bind="attr:{src: $root.media.toFactionImage(FactionId)}" alt="FactionImage" />
                        </td>
                        <td>
                            <div class="row">
                                <!-- ko foreach: Players -->
                                <div class="col-lg-4 col-md-4 col-sm-4">
                                    <a data-bind="attr: {href: $root.media.armoryLink($data)}" class="nolink">
                                        <img data-bind="attr:{src: $root.media.toRaceImage(RaceId)}" alt="RaceImage" />
                                        <img class="hidden-xs" data-bind="attr:{src: $root.media.toClassImage(ClassId)}" alt="ClassImage" />
                                        <img data-bind="attr:{src: $root.media.toSpecImage(SpecId)}" alt="SpecImage" />
                                        <span data-bind="text: Name"></span>
                                    </a>
                                </div>
                                <!-- /ko -->
                            </div>
                        </td>
                        <td data-bind="text: Rating" class="centered"></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

<noscript class="row">
    <div data-bind="css: {hidden: true}">
        <br />
        <div class="alert alert-warning col-lg-6">
            <strong>Sorry!</strong> This website requires
            <a href="http://www.enable-javascript.com/" target="_blank">
                enabling JavaScript
            </a>
        </div>
    </div>
</noscript>
{'fraction_non_alphanumeric': 0.1534790811230718, 'fraction_numerical': 0.002164021751192986, 'mean_word_length': 1.2670440251572328, 'pattern_counts': {'":': 0, '<': 360, '<?xml version=': 0, '>': 360, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '914154', 'n_tokens_mistral': 4899, 'n_tokens_neox': 4653, 'n_words': 883}