<commit_before>extends ../layout
include ../mixins/delete


block content
    include ../partials/joinsite

    if !filteredUser
        .page-header
            h4= title
                if page > 1
                    small
                        |  · Page #{page}
                if user
                    a.btn.btn-primary.btn-sm.pull-right(href='/news/submit') Submit News
    else
        .row.user-profile
            .col-lg-6
                if userProfile
                    h1
                        if userProfile.picture
                            img(src='#{userProfile.picture}')
                        if userProfile.name
                            | #{userProfile.name}
            .col-lg-6
                dl.pull-right
                    dt GitHub:
                    dd
                        a(href='http://github.com/#{filteredUser}', target='_blank') http://github.com/#{filteredUser}
                    br
                    dt Contributions:
                    dd
                        span#contribution-count
                    br
                    if userProfile.location
                        dt Location:
                        dd= userProfile.location
                        br
                    if userProfile.website
                        dt Website:
                        dd
                            if (!userProfile.website.match(/^http[s]?:\/\//))
                                - userProfile.website = 'http://' + userProfile.website

                            a(href='#{userProfile.website}', target='_blank') #{userProfile.website}
        .page-header
          ul.nav.nav-tabs
            li.active
              a(href='#news', data-toggle='tab')
                h4 News Submitted
            li
              a(href='#user-comments', data-toggle='tab')
                h4 Comments

    div.tab-content
      div#news.tab-pane.fade.in.active
        ul
            li.row.headers.hidden-xs
                div.col-sm-2.col-lg-1.text-muted #
                div.col-sm-1 Votes
                div.col-sm-6.col-lg-7 Title
                if !filteredSource
                    div.col-sm-3 Source
            each item, index in items
                li.row.news-item
                    div.col-xs-2.col-sm-2.col-lg-1.upvote-wrapper
                        span.hidden-xs.text-muted= index + 1
                        if !item.votedFor
                            form(action='/news/' + item._id, method='POST', class='upvote-form')
                                input(type='hidden', name='amount', value='1')
                                button(type='submit', class='upvote')
                                    i.fa.fa-chevron-up
                    div.col-xs-2.col-xs-pull-2.col-sm-1.col-sm-pull-0.vote-count-wrapper
                        span.badge.vote-count= item.votes
                    div.col-xs-10.col-xs-push-2.col-sm-6.col-sm-push-0.col-lg-7.title
                        a(href=item.url)
                            | #{item.title}
                        if item.summary
                            | &nbsp;
                            a(href="#", class="show-summary")
                                | ...
                        br
                        span
                            small.submit-date(title="#{item.created}")= timeago(item.created)
                            small.hidden-xs #{' '}by#{' '}
                            if item.poster
                                a.poster(href='/news/user/' + item.poster.username)<commit_msg>make all the upvote arrows line up<commit_after>extends ../layout
include ../mixins/delete


block content
    include ../partials/joinsite

    if !filteredUser
        .page-header
            h4= title
                if page > 1
                    small
                        |  · Page #{page}
                if user
                    a.btn.btn-primary.btn-sm.pull-right(href='/news/submit') Submit News
    else
        .row.user-profile
            .col-lg-6
                if userProfile
                    h1
                        if userProfile.picture
                            img(src='#{userProfile.picture}')
                        if userProfile.name
                            | #{userProfile.name}
            .col-lg-6
                dl.pull-right
                    dt GitHub:
                    dd
                        a(href='http://github.com/#{filteredUser}', target='_blank') http://github.com/#{filteredUser}
                    br
                    dt Contributions:
                    dd
                        span#contribution-count
                    br
                    if userProfile.location
                        dt Location:
                        dd= userProfile.location
                        br
                    if userProfile.website
                        dt Website:
                        dd
                            if (!userProfile.website.match(/^http[s]?:\/\//))
                                - userProfile.website = 'http://' + userProfile.website

                            a(href='#{userProfile.website}', target='_blank') #{userProfile.website}
        .page-header
          ul.nav.nav-tabs
            li.active
              a(href='#news', data-toggle='tab')
                h4 News Submitted
            li
              a(href='#user-comments', data-toggle='tab')
                h4 Comments

    div.tab-content
      div#news.tab-pane.fade.in.active
        ul
            li.row.headers.hidden-xs
                div.col-sm-2.col-lg-1.text-muted
                    div.col-sm-1 #
                div.col-sm-1 Votes
                div.col-sm-6.col-lg-7 Title
                if !filteredSource
                    div.col-sm-3 Source
            each item, index in items
                li.row.news-item
                    div.col-xs-2.col-sm-2.col-lg-1.upvote-wrapper
                        span.hidden-xs.text-muted.col-sm-1= index + 1
                        if !item.votedFor
                            form(action='/news/' + item._id, method='POST', class='upvote-form')
                                input(type='hidden', name='amount', value='1')
                                button(type='submit', class='upvote')
                                    i.fa.fa-chevron-up
                    div.col-xs-2.col-xs-pull-2.col-sm-1.col-sm-pull-0.vote-count-wrapper
                        span.badge.vote-count= item.votes
                    div.col-xs-10.col-xs-push-2.col-sm-6.col-sm-push-0.col-lg-7.title
                        a(href=item.url)
                            | #{item.title}
                        if item.summary
                            | &nbsp;
                            a(href="#", class="show-summary")
                                | ...
                        br
                        span
                            small.submit-date(title="#{item.created}")= timeago(item.created)
                            small.hidden-xs #{' '}by#{' '}
                            if item.poster
                                a.poster(href='/news/user/' + item.poster.username)
{'fraction_non_alphanumeric': 0.10762581904363586, 'fraction_numerical': 0.00808587759654259, 'mean_word_length': 0.8566252587991718, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4587789', 'n_tokens_mistral': 1921, 'n_tokens_neox': 1771, 'n_words': 286}