<commit_before>extends user/user-base
- load staticfiles
- load gravatar
- load list_processor
- load markdown_trois_tags
- load rating
- load i18n
block user_media
    style.
        a.edit-profile {
            float: right;
            padding-top: 1em;
        }

        .user-problem-group h3 {
            font-weight: bold;
            font-size: 1.25em;
            margin-bottom: -10px;
            max-height: 20%;
            line-height: 2.5em;
        }

        .user-problem-group ul {
            -webkit-columns: 300px 4;
            -moz-columns: 300px 4;
            columns: 300px 4;
            list-style-type: none;
            margin-top: 0;
            margin-left: -20px;
            margin-bottom: 0;
        }

        .user-problem-group a img {
            max-width: 1em;
            margin-right: 3px;
            padding-bottom: 1px;
            vertical-align: middle;
        }

        .user-info-cell {
            padding-left: 15px;
            border-left: 1px solid #CCC;
        }

        .contest-history-cell {
            border-left: 1px solid #CCC;
            padding: 0 0.5em;
        }

        table td {
            margin: 0;
            vertical-align: top;
        }

        .strike {
            text-align: right;
            overflow: hidden;
        }

        .strike > span {
            position: relative;
            display: inline-block;
        }

        .strike > span:before {
            content: "";
            position: absolute;
            top: 50%;
            width: 100000px;
            height: 1px;
            background: rgba(0, 0, 0, 0.2);
            right: 100%;
            margin-right: 5px;
        }

        .pp {
            font-weight: 600;
            font-size: 1.4em;
        }

        .pp-scaled {
            font-size: 0.8em;
        }

        .pp-weighted {
            color: #777;
        }

        td.sub-pp {
            text-align: right;
        }

        .breakdown-header {
            font-weight: 600;
            font-size: 1.7em;
            margin-bottom: 0.2em;
        }

block user_js_media
    script(type='text/javascript').
        $(function () {
            register_update_relative(function () {
                return $('.pp-table').find('span.time');
            }, function (when) {
                return Math.abs(moment().diff(when, 'years')) < 1;
            });
        });
        window.show_pp_base = 0;
        window.load_more_pp = function() {
            $.get('{% url "user_pp_ajax" user.user.username %}', {
                start: window.show_pp_base * 25,
                end: (window.show_pp_base + 1) * 25
            }).done(function (data) {
                $('table.pp-table').append(data);
                window.show_pp_base++;
            });
        };

block title_ruler

block title_row
    - var user_tab = 'problems'
    include user/user-tabs

block user_content
    if perms.judge.test_site
        if pp_breakdown
            h3.breakdown-header {% trans "Points Breakdown" %}
            table.pp-table.table#submissions-table
                colgroup
                    col.sub-result
                    col.sub-info
                    col.sub-pp
                tbody
                    - include 'user/pp-table-body.jade'
            a(href='javascript:load_more_pp();') {% trans "Load more" %}
        else
            i {% trans "This user has not yet solved any problems." %}

    if authored
        div.user-problem-group
            h3.unselectable.toggle.open
                span.fa.fa-chevron-right.fa-fw
                | {% trans "Authored Problems" %} (#{authored | length})
            ul.toggled
                each problem in authored
                    li
                        a(href='{% url "problem_detail" problem.code %}')= problem.name
                        |  (
                        a(href='{% url "ranked_submissions" problem.code %}') #{problem.points | floatformat}{% if problem.partial %}p{% endif %}
                        | )
    if request.user.is_authenticated and request.user != user.user
        .strike
            span
                form(name='form', action='', method='get')
                    input#hide_solved(style='vertical-align:middle', onclick="form.submit()", type='checkbox', name='hide_solved', checked=('checked' if hide_solved else undefined), value='1')
                    label(style='vertical-align:middle', for='hide_solved') {% trans "Hide problems I've solved" %}
    else
        hr<commit_msg>Hide pp loader when we're out; #536<commit_after>extends user/user-base
- load staticfiles
- load gravatar
- load list_processor
- load markdown_trois_tags
- load rating
- load i18n
block user_media
    style.
        a.edit-profile {
            float: right;
            padding-top: 1em;
        }

        .user-problem-group h3 {
            font-weight: bold;
            font-size: 1.25em;
            margin-bottom: -10px;
            max-height: 20%;
            line-height: 2.5em;
        }

        .user-problem-group ul {
            -webkit-columns: 300px 4;
            -moz-columns: 300px 4;
            columns: 300px 4;
            list-style-type: none;
            margin-top: 0;
            margin-left: -20px;
            margin-bottom: 0;
        }

        .user-problem-group a img {
            max-width: 1em;
            margin-right: 3px;
            padding-bottom: 1px;
            vertical-align: middle;
        }

        .user-info-cell {
            padding-left: 15px;
            border-left: 1px solid #CCC;
        }

        .contest-history-cell {
            border-left: 1px solid #CCC;
            padding: 0 0.5em;
        }

        table td {
            margin: 0;
            vertical-align: top;
        }

        .strike {
            text-align: right;
            overflow: hidden;
        }

        .strike > span {
            position: relative;
            display: inline-block;
        }

        .strike > span:before {
            content: "";
            position: absolute;
            top: 50%;
            width: 100000px;
            height: 1px;
            background: rgba(0, 0, 0, 0.2);
            right: 100%;
            margin-right: 5px;
        }

        .pp {
            font-weight: 600;
            font-size: 1.4em;
        }

        .pp-scaled {
            font-size: 0.8em;
        }

        .pp-weighted {
            color: #777;
        }

        td.sub-pp {
            text-align: right;
        }

        .breakdown-header {
            font-weight: 600;
            font-size: 1.7em;
            margin-bottom: 0.2em;
        }

block user_js_media
    script(type='text/javascript').
        $(function () {
            register_update_relative(function () {
                return $('.pp-table').find('span.time');
            }, function (when) {
                return Math.abs(moment().diff(when, 'years')) < 1;
            });
        });
        window.show_pp_base = 1;
        window.load_more_pp = function () {
            $.get('{% url "user_pp_ajax" user.user.username %}', {
                start: window.show_pp_base * 25,
                end: (window.show_pp_base + 1) * 25
            }).done(function (data) {
                $('table.pp-table').append(data);
                window.show_pp_base++;
                if (window.show_pp_base > 4) {
                    $('#load-more-link').hide();
                }
            });
        };

block title_ruler

block title_row
    - var user_tab = 'problems'
    include user/user-tabs

block user_content
    if perms.judge.test_site
        if pp_breakdown
            h3.breakdown-header {% trans "Points Breakdown" %}
            table.pp-table.table#submissions-table
                colgroup
                    col.sub-result
                    col.sub-info
                    col.sub-pp
                tbody
                    - include 'user/pp-table-body.jade'
            a#load-more-link(href='javascript:load_more_pp();') {% trans "Load more" %}
        else
            i {% trans "This user has not yet solved any problems." %}

    if authored
        div.user-problem-group
            h3.unselectable.toggle.open
                span.fa.fa-chevron-right.fa-fw
                | {% trans "Authored Problems" %} (#{authored | length})
            ul.toggled
                each problem in authored
                    li
                        a(href='{% url "problem_detail" problem.code %}')= problem.name
                        |  (
                        a(href='{% url "ranked_submissions" problem.code %}') #{problem.points | floatformat}{% if problem.partial %}p{% endif %}
                        | )
    if request.user.is_authenticated and request.user != user.user
        .strike
            span
                form(name='form', action='', method='get')
                    input#hide_solved(style='vertical-align:middle', onclick="form.submit()", type='checkbox', name='hide_solved', checked=('checked' if hide_solved else undefined), value='1')
                    label(style='vertical-align:middle', for='hide_solved') {% trans "Hide problems I've solved" %}
    else
        hr
{'fraction_non_alphanumeric': 0.11732812838863588, 'fraction_numerical': 0.018867924528301886, 'mean_word_length': 1.2789720780825302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '1765288', 'n_tokens_mistral': 2880, 'n_tokens_neox': 2569, 'n_words': 551}