<commit_before>extends layout

block content
  div.newPostHeader
    a(href="/Text" style="width: 33.33%;text-decoration:none;font-size:25px;")
      div.newPostButton(style="background:#e7adff;") New Text Post
    a(href="/Image" style="width: 33.33%;text-decoration:none;font-size:25px;")
      div.newPostButton(style="background:#adffe2;") New Image Post
    a(href="/Search" style="width: 33.33%;text-decoration:none;font-size:25px;")
      div.newPostButton(style="background:#BBBBBB;") Search By Tag
  div.postContainer
    - for (var i = count-1; i >= 0; i--) {
      - if (post[i].type == "text") {
      div.postBox
        div.titleBox
          div.bigTitle!=post[i].title
          div.normalText!="VIEWS: "+post[i].views
        div.normalText!=post[i].content
        div.tagContainer
        - for (var j = 0; j < post[i].tags.length; j++) {
          - if (post[i].tags[j] != "") {
            a.tag(href="/tag/"+post[i].tags[j])!="#"+post[i].tags[j]+"  "
          - }
        - }
        br
        a.urlLink(href="/postId/"+post[i]._id)!="Permanent URL Link"
      - }
      - if (post[i].type == "image") {
      div.postBox
        div.titleBox
          div.bigTitle!=post[i].title
          div.normalText!="VIEWS: "+post[i].views
        - for (var j = 0; j < post[i].content.length; j++) {
          a.imgLink(href=post[i].content[j])
            img.postImg(src=post[i].content[j] style="max-width:100%;")
        - }
        div.normalText!=post[i].caption
        div.tagContainer
        - for (var j = 0; j < post[i].tags.length; j++) {
          - if (post[i].tags[j] != "") {
            a.tag(href="/tag/"+post[i].tags[j])!="#"+post[i].tags[j]+"  "
          - }
        - }
        br
        a.urlLink(href="/postId/"+post[i]._id)!="Permanent URL Link"
      - }
    - }
    - if (pageIdentifier == "paginated") {
      a.pageButton(href="page/"+(page+1))!="Next Page"
      - if (page > 1) {
        a.pageButton(href="page/"+(page-1))!="Previous Page"
      - }
    - }<commit_msg>add ability to check for child posts on single post load, include id in posts, include references on top of posts<commit_after>extends layout

block content
  div.newPostHeader
    a(href="/Text" style="width: 33.33%;text-decoration:none;font-size:25px;")
      div.newPostButton(style="background:#e7adff;") New Text Post
    a(href="/Image" style="width: 33.33%;text-decoration:none;font-size:25px;")
      div.newPostButton(style="background:#adffe2;") New Image Post
    a(href="/Search" style="width: 33.33%;text-decoration:none;font-size:25px;")
      div.newPostButton(style="background:#BBBBBB;") Search By Tag
  div.postContainer
    - for (var i = count-1; i >= 0; i--) {
      - if (post[i].type == "text") {
      div.postBox
        - if (post[i].references != 0) {
          - for (var j = 0; j < post[i].references.length; j++) {
            a.references(href="/postId/"+post[i].references[j])!=post[i].references[j]+"> "
            br
          - }
        - }
        div.contentBox
          div.titleBox
            div.bigTitle!=post[i].title
            div.normalText!="VIEWS: "+post[i].views
          div.normalText!=post[i].content
        div.idText(style="margin-top:5px;")!="ID: "+post[i]._id
        - if (post[i].tags != 0) {
          div.tagContainer
          - for (var j = 0; j < post[i].tags.length; j++) {
            - if (post[i].tags[j] != "") {
              a.tag(href="/tag/"+post[i].tags[j])!="#"+post[i].tags[j]+"  "
            - }
          - }
        - }
        br
        a.replyLink(href="/Reply/"+post[i]._id)!="REPLY"
        br
        a.urlLink(href="/postId/"+post[i]._id)!="Permanent URL Link"
      - }
      - if (post[i].type == "image") {
      div.postBox
        - if (post[i].references != 0) {
          - for (var j = 0; j < post[i].references.length; j++) {
            a.references(href="/postId/"+post[i].references[j])!=post[i].references[j]+"> " 
            br
          - }
        - }
        div.contentBox
          div.titleBox
            div.bigTitle!=post[i].title
            div.normalText!="VIEWS: "+post[i].views
          - for (var j = 0; j < post[i].content.length; j++) {
            a.imgLink(href=post[i].content[j])
              img.postImg(src=post[i].content[j] style="max-width:100%;")
          - }
          div.normalText!=post[i].caption
        div.idText(style="margin-top:5px;")!="ID: "+post[i]._id
        div.tagContainer
        - for (var j = 0; j < post[i].tags.length; j++) {
          - if (post[i].tags[j] != "") {
            a.tag(href="/tag/"+post[i].tags[j])!="#"+post[i].tags[j]+"  "
          - }
        - }
        br
        a.replyLink(href="/Reply/"+post[i]._id)!="REPLY"
        br
        a.urlLink(href="/postId/"+post[i]._id)!="Permanent URL Link"
      - }
    - }
    - if (pageIdentifier == "single") {
      - if (count == 1 && postChild != null) {
        - for (var i = countChild-1; i >= 0; i--) {
          - if (postChild[i].type == "text") {
          div.postBoxComment
            - if (postChild[i].references != 0) {
              - for (var j = 0; j < postChild[i].references.length; j++) {
                a.references(href="/postId/"+postChild[i].references[j])!=postChild[i].references[j]+"> "
                br
              - }
            - }
            div.contentBox
              div.titleBox
                div.bigTitle!=postChild[i].title
                div.normalText!="VIEWS: "+postChild[i].views
              div.normalText!=postChild[i].content
            div.idText(style="margin-top:5px;")!="ID: "+postChild[i]._id
            div.tagContainer
            - for (var j = 0; j < postChild[i].tags.length; j++) {
              - if (postChild[i].tags[j] != "") {
                a.tag(href="/tag/"+postChild[i].tags[j])!="#"+postChild[i].tags[j]+"  "
              - }
            - }
            br
            a.replyLink(href="/Reply/"+postChild[i]._id)!="REPLY"
            br
            a.urlLink(href="/postId/"+postChild[i]._id)!="Permanent URL Link"
          - }
          - if (postChild[i].type == "image") {
          div.postBoxComment
            - if (postChild[i].references != 0) {
              - for (var j = 0; j < postChild[i].references.length; j++) {
                a.references(href="/postId/"+postChild[i].references[j])!=postChild[i].references[j]+"> " 
                br
              - }
            - }
            div.contentBox
              div.titleBox
                div.bigTitle!=postChild[i].title
                div.normalText!="VIEWS: "+postChild[i].views
              - for (var j = 0; j < postChild[i].content.length; j++) {
                a.imgLink(href=postChild[i].content[j])
                  img.postImg(src=postChild[i].content[j] style="max-width:100%;")
              - }
              div.normalText!=postChild[i].caption
            div.idText(style="margin-top:5px;")!="ID: "+postChild[i]._id
            div.tagContainer
            - for (var j = 0; j < postChild[i].tags.length; j++) {
              - if (postChild[i].tags[j] != "") {
                a.tag(href="/tag/"+postChild[i].tags[j])!="#"+postChild[i].tags[j]+"  "
              - }
            - }
            br
            a.replyLink(href="/Reply/"+postChild[i]._id)!="REPLY"
            br
            a.urlLink(href="/postId/"+postChild[i]._id)!="Permanent URL Link"
          - }  
        - }
      - }
    - }
    - if (pageIdentifier == "paginated") {
      a.pageButton(href="page/"+(page+1))!="Next Page"
      - if (page > 1) {
        a.pageButton(href="page/"+(page-1))!="Previous Page"
      - }
    - }
{'fraction_non_alphanumeric': 0.19653634216741012, 'fraction_numerical': 0.01102072946733141, 'mean_word_length': 1.8497196261682243, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 12, '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': '2799921', 'n_tokens_mistral': 2702, 'n_tokens_neox': 2606, 'n_words': 368}