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


block content
    include ../partials/joinsite

    if !filteredUser
        .page-header
            h4= title
                if page > 1
                    small
                        |  · Page #{page}
    else
        .row.user-profile
            .col-md-6
                if userProfile
                    h1
                        if userProfile.picture
                            img(src='#{userProfile.picture}')
                        if userProfile.name
                            | #{userProfile.name}
            .col-md-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
                            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='#comments', data-toggle='tab')
                h4 Comments

    div.tab-content
      div#news.tab-pane.fade.in.active
        table.table.table-condensed
            thead
                tr
                    th.text-muted #
                    th
                    th Votes
                    th Title
                    if !filteredSource
                        th Source
            tbody.news-table
                each item, index in items
                    tr
                        td.text-muted= index + 1
                        td
                            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<commit_msg>Add http protocol to profile website if none exists<commit_after>extends ../layout
include ../mixins/delete


block content
    include ../partials/joinsite

    if !filteredUser
        .page-header
            h4= title
                if page > 1
                    small
                        |  · Page #{page}
    else
        .row.user-profile
            .col-md-6
                if userProfile
                    h1
                        if userProfile.picture
                            img(src='#{userProfile.picture}')
                        if userProfile.name
                            | #{userProfile.name}
            .col-md-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='#comments', data-toggle='tab')
                h4 Comments

    div.tab-content
      div#news.tab-pane.fade.in.active
        table.table.table-condensed
            thead
                tr
                    th.text-muted #
                    th
                    th Votes
                    th Title
                    if !filteredSource
                        th Source
            tbody.news-table
                each item, index in items
                    tr
                        td.text-muted= index + 1
                        td
                            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
{'fraction_non_alphanumeric': 0.08321937878491893, 'fraction_numerical': 0.0035163117796444617, 'mean_word_length': 0.7845939351690484, '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': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5592636', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1095, 'n_words': 236}