<commit_before>- title "#{@protip.title} (Example)"
- meta canonical: slug_protips_url(id: @protip.public_id, slug: @protip.slug)
- meta keywords: @protip.tags
- meta description: protip_summary
- meta author: profile_url(username: @protip.user.username)
- meta twitter: { creator: @protip.user.twitter }           if @protip.user.twitter
- meta twitter: { creator: { id: @protip.user.twitter_id} } if @protip.user.twitter_id
- meta twitter: { image: avatar_url(@protip.user) }         if @protip.user.avatar
- meta og:      { image: avatar_url(@protip.user) }         if @protip.user.avatar

.container[@protip]
  .hide= time_tag @protip.created_at, itemprop: "datePublished"
  .hide= time_tag @protip.updated_at, itemprop: "dateModified"
  .hide[:name]= @protip.public_id

  .clearfix
    .sm-col.sm-col.sm-col-12.md-col-8
      .clearfix.mt0.mb1
        .sm-right
          %a.no-hover.diminish.inline.mr1{href: slug_protips_url(id: @protip.public_id, slug: @protip.slug)}=@protip.display_date
          %span.xs-hide
            &middot;
            .diminish.inline.mx1
              =icon("eye")
              =number_to_human(@protip.views_count, precision: 4)
          &middot;
          %span.mx1=link_to @protip.user.username, profile_path(username: @protip.user.username)
          .avatar[:image]{style: "background-color: #{@protip.user.color};"}=avatar_url_tag(@protip.user)

      .card.p1{style: "border-top:solid 5px #{@protip.user.color}"}

        - if signed_in? && current_user.can_edit?(@protip)
          .clearfix.mb2.mt2
            .right.mr1
              =link_to(icon('trash'), protip_path(@protip), method: :delete, class: 'diminish', 'data-confirm': 'This makes us very sad. Are you sure?')
              %a.ml1.btn.rounded.bg-green.white{href: edit_protip_path(@protip)}
                Edit Protip

        - cache ['v2', @protip] do
          %h1.mt4.mb2.center[:headline]=@protip.title
          .center.mr1[:keywords]
            -<EMAIL> do |tag|
              %h6.diminish.inline.px1=link_to tag, popular_topic_path(topic: tag)
          .content.p3.mt4[:articleBody]
            = preserve(sanitize(CoderwallFlavoredMarkdown.render_to_html(@protip.body)))


          .clearfix.mt1.mb3.mx2.py2
            .clearfix.border-bottom[:author]
              %h4
                Written by
                %a.bold[<EMAIL>.user]{href: profile_path(username: @protip.user.username)}
                  %span.blue[:name]=@protip.user.display_name

            .clearfix.mt1
              .btn.btn-small.pl0.mr1.mb1.xs-block
                = react_component 'HeartButton', props: { heartableId: @protip.dom_id,
                  href: protip_likes_path(@protip),
                  labels: ['Recommend', 'Recommended'] }

              %a.btn.btn-small.pl0.mb1.mr1.xs-block{href: "http://twitter.com/home?status=#{protip_tweet_message}", target: 'twitter'}
                %span.fixed-space-4=icon('twitter', class: 'aqua h4')
                %span Say Thanks

              .btn.btn-small.pl0.mb1.mr1.xs-block
                = react_component 'ProtipSubscribeButton'

              - if !signed_in?
                %a.btn.btn-small.pl0.mb1.mr1.xs-block{ href: sign_up_path }
                  %span.fixed-space-4= icon('comment-o', class: 'black h4')
                  Respond


        .clearfix
          -if signed_in?
            #new-comment.new-comment.mt2.mb2.px2
              -if flash[:error]
                .clearfix.mb2.mt1.bg-red.white.py2.center.bold.rounded=flash[:error]
              = form_for Comment.new do |form|
                = invisible_captcha
                .border.rounded
                  = form.hidden_field :article_id, value: @protip.id
                  = form.text_area :body, rows: 1, class: 'field block col-12 focus-no-border focus-pb3', placeholder: "Share a response", style: 'border: none; outline: none', value: flash[:data]
                  .text-area-footer.px1.py1.font-sm
                    Markdown is totally
                    =icon('thumbs-o-up')
                .clearfix.mt2
                  %button.rounded.border.border--silver.px2.py1.green.bg-white.bold{type: 'submit'} Respond

          -if @protip.comments.present?
            .clearfix.mt3.px2
              %h4
                =pluralize(@protip.comments.size, 'Response')
                .right.hide
                  .btn.btn-small.green Add your response
              =render @protip.comments

    .sm-col.sm-col.sm-col-12.md-col-4
      -if @protip.related_topics.present?
        .clearfix.sm-ml3.mt3.p1.pb3
          %h5.mt0.mb1
            =icon('folder-o', class: 'mr1')
            Filed Under
          %hr
          -@<EMAIL>.related_topics.each do |topic|
            .topic.clearfix.py1
              %a{href: popular_topic_path(topic: topic)}
                .bold=t(topic, scope: [:categories, :long])


        = react_component 'Sponsors'

      - cache ['v3', @protip, 'featured-jobs', expires_in: 1.day ] do
        .clearfix.sm-ml3.mt3.p1
          .clearfix<commit_msg>show sponsors even if there are no related topics<commit_after>- title "#{@protip.title} (Example)"
- meta canonical: slug_protips_url(id: @protip.public_id, slug: @protip.slug)
- meta keywords: @protip.tags
- meta description: protip_summary
- meta author: profile_url(username: @protip.user.username)
- meta twitter: { creator: @protip.user.twitter }           if @protip.user.twitter
- meta twitter: { creator: { id: @protip.user.twitter_id} } if @protip.user.twitter_id
- meta twitter: { image: avatar_url(@protip.user) }         if @protip.user.avatar
- meta og:      { image: avatar_url(@protip.user) }         if @protip.user.avatar

.container[@protip]
  .hide= time_tag @protip.created_at, itemprop: "datePublished"
  .hide= time_tag @protip.updated_at, itemprop: "dateModified"
  .hide[:name]= @protip.public_id

  .clearfix
    .sm-col.sm-col.sm-col-12.md-col-8
      .clearfix.mt0.mb1
        .sm-right
          %a.no-hover.diminish.inline.mr1{href: slug_protips_url(id: @protip.public_id, slug: @protip.slug)}=@protip.display_date
          %span.xs-hide
            &middot;
            .diminish.inline.mx1
              =icon("eye")
              =number_to_human(@protip.views_count, precision: 4)
          &middot;
          %span.mx1=link_to @protip.user.username, profile_path(username: @protip.user.username)
          .avatar[:image]{style: "background-color: #{@protip.user.color};"}=avatar_url_tag(@protip.user)

      .card.p1{style: "border-top:solid 5px #{@protip.user.color}"}

        - if signed_in? && current_user.can_edit?(@protip)
          .clearfix.mb2.mt2
            .right.mr1
              =link_to(icon('trash'), protip_path(@protip), method: :delete, class: 'diminish', 'data-confirm': 'This makes us very sad. Are you sure?')
              %a.ml1.btn.rounded.bg-green.white{href: edit_protip_path(@protip)}
                Edit Protip

        - cache ['v2', @protip] do
          %h1.mt4.mb2.center[:headline]=@protip.title
          .center.mr1[:keywords]
            -<EMAIL>.each do |tag|
              %h6.diminish.inline.px1=link_to tag, popular_topic_path(topic: tag)
          .content.p3.mt4[:articleBody]
            = preserve(sanitize(CoderwallFlavoredMarkdown.render_to_html(@protip.body)))


          .clearfix.mt1.mb3.mx2.py2
            .clearfix.border-bottom[:author]
              %h4
                Written by
                %a.bold[<EMAIL>]{href: profile_path(username: @protip.user.username)}
                  %span.blue[:name]=@protip.user.display_name

            .clearfix.mt1
              .btn.btn-small.pl0.mr1.mb1.xs-block
                = react_component 'HeartButton', props: { heartableId: @protip.dom_id,
                  href: protip_likes_path(@protip),
                  labels: ['Recommend', 'Recommended'] }

              %a.btn.btn-small.pl0.mb1.mr1.xs-block{href: "http://twitter.com/home?status=#{protip_tweet_message}", target: 'twitter'}
                %span.fixed-space-4=icon('twitter', class: 'aqua h4')
                %span Say Thanks

              .btn.btn-small.pl0.mb1.mr1.xs-block
                = react_component 'ProtipSubscribeButton'

              - if !signed_in?
                %a.btn.btn-small.pl0.mb1.mr1.xs-block{ href: sign_up_path }
                  %span.fixed-space-4= icon('comment-o', class: 'black h4')
                  Respond


        .clearfix
          -if signed_in?
            #new-comment.new-comment.mt2.mb2.px2
              -if flash[:error]
                .clearfix.mb2.mt1.bg-red.white.py2.center.bold.rounded=flash[:error]
              = form_for Comment.new do |form|
                = invisible_captcha
                .border.rounded
                  = form.hidden_field :article_id, value: @protip.id
                  = form.text_area :body, rows: 1, class: 'field block col-12 focus-no-border focus-pb3', placeholder: "Share a response", style: 'border: none; outline: none', value: flash[:data]
                  .text-area-footer.px1.py1.font-sm
                    Markdown is totally
                    =icon('thumbs-o-up')
                .clearfix.mt2
                  %button.rounded.border.border--silver.px2.py1.green.bg-white.bold{type: 'submit'} Respond

          -if @protip.comments.present?
            .clearfix.mt3.px2
              %h4
                =pluralize(@protip.comments.size, 'Response')
                .right.hide
                  .btn.btn-small.green Add your response
              =render @protip.comments

    .sm-col.sm-col.sm-col-12.md-col-4
      -if @protip.related_topics.present?
        .clearfix.sm-ml3.mt3.p1.pb3
          %h5.mt0.mb1
            =icon('folder-o', class: 'mr1')
            Filed Under
          %hr
          -@protip.related_topics.each do |topic|
            .topic.clearfix.py1
              %a{href: popular_topic_path(topic: topic)}
                .bold=t(topic, scope: [:categories, :long])


      = react_component 'Sponsors'

      - cache ['v3', @protip, 'featured-jobs', expires_in: 1.day ] do
        .clearfix.sm-ml3.mt3.p1
          .clearfix
{'fraction_non_alphanumeric': 0.13843567685157718, 'fraction_numerical': 0.01601898546425393, 'mean_word_length': 1.9790868924889544, 'pattern_counts': {'":': 0, '<': 8, '<?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': '1056851', 'n_tokens_mistral': 3489, 'n_tokens_neox': 3337, 'n_words': 535}