<commit_before>extends ../layouts/main

block content
  .row
    .columns.large-8.medium-10.large-centered.medium-centered
      #forum
        //
          Used by tests, also nice for non-js-peeps (rofl)
        for post in posts
          article.post
            header
              h1
                a(href="/forum/{{oid}}")
                  = post.title
              .meta
                .row
                  .columns.small-9
                    span.byline
                      a(href="/users/" + post.creator._id)= post.creator.name
                    time.created(datetime=post.created)= post.created
              .content
                .row
                  .columns
                    != marked(post.mdtext)

  script#template(type="text/ractive")
    form.newpost(method="POST" on-submit="addPost")
      h1 Nytt innlegg
      label(for="title") Tittel
      input#title(name="title" type="text")
      label(for="mdtext") Innhold
      textarea#mdtext(name="mdtext")
      label(for="permissions") Rettigheter
      select#permissions(name="permissions")
        +permission_options(active_user.groups, active_user.friends)
      button.small Lagre
      button.small.secondary(type="reset") Avbryt

    a#newpost.small.button Nytt innlegg

    | {{#posts}}
    |   {{>post}}
    | {{/posts}}

    | {{^gotall}}
    a.getmore(on-click="fetchPosts") Hent flere innlegg
    | {{/gotall}}

    // {{>post}}
      article
        header
          h1
            a(href="/forum/{{oid}}") {{title}}
          .meta
            .row
              .columns.small-9
                span.byline
                  a(href="/users/{{creator._id}}") {{creator.name}}
                time.created(datetime="{{isodate(created)}}") {{shortdate(created)}}
              .columns.small-3.text-right.creator
                i.fa.fa-globe(title="Tilgjengelig for alle")
                i.fa.fa-users(title="Tilgjengelig for alle medlemmer")
                i.fa.fa-user(title="Tilgjengelig bare for deg")
                a(title="Slett innlegget" on-click="deletePost")
                  i.fa.fa-trash-o

          .content
            .row
              .columns {{{marked(mdtext)}}}
    // {{/post}}

block javascript<commit_msg>Revert bad indent intended elsewhere<commit_after>extends ../layouts/main

block content
  .row
    .columns.large-8.medium-10.large-centered.medium-centered
      #forum
        //
          Used by tests, also nice for non-js-peeps (rofl)
        for post in posts
          article.post
            header
              h1
                a(href="/forum/{{oid}}")
                  = post.title
              .meta
                .row
                  .columns.small-9
                    span.byline
                      a(href="/users/" + post.creator._id)= post.creator.name
                    time.created(datetime=post.created)= post.created
              .content
                .row
                  .columns
                    != marked(post.mdtext)

  script#template(type="text/ractive")
    form.newpost(method="POST" on-submit="addPost")
      h1 Nytt innlegg
      label(for="title") Tittel
      input#title(name="title" type="text")
      label(for="mdtext") Innhold
      textarea#mdtext(name="mdtext")
      label(for="permissions") Rettigheter
      select#permissions(name="permissions")
        +permission_options(active_user.groups, active_user.friends)
      button.small Lagre
      button.small.secondary(type="reset") Avbryt

    a#newpost.small.button Nytt innlegg

    | {{#posts}}
    |   {{>post}}
    | {{/posts}}

    | {{^gotall}}
    a.getmore(on-click="fetchPosts") Hent flere innlegg
    | {{/gotall}}

    // {{>post}}
    article
      header
        h1
          a(href="/forum/{{oid}}") {{title}}
        .meta
          .row
            .columns.small-9
              span.byline
                a(href="/users/{{creator._id}}") {{creator.name}}
              time.created(datetime="{{isodate(created)}}") {{shortdate(created)}}
            .columns.small-3.text-right.creator
              i.fa.fa-globe(title="Tilgjengelig for alle")
              i.fa.fa-users(title="Tilgjengelig for alle medlemmer")
              i.fa.fa-user(title="Tilgjengelig bare for deg")
              a(title="Slett innlegget" on-click="deletePost")
                i.fa.fa-trash-o

        .content
          .row
            .columns {{{marked(mdtext)}}}
    // {{/post}}

block javascript
{'fraction_non_alphanumeric': 0.13635344247589146, 'fraction_numerical': 0.004036779546983628, 'mean_word_length': 1.6189078097475045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3195702', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1316, 'n_words': 219}